How to get active parking brake

I have a dissected but functional enertion Nano x remote and a winning remote. I believe the receiver goes to the winning remote but I’m not 100% positive so I’ll send both just to be safe. Only thing missing is the cable but I may have an extra laying in the bottom of the box of parts. Pm me your info.

4 Likes

That’s hilarious.

Thanks, I will :pleading_face:

I’ve started working on some more efficient parking brakes. It just doesn’t make sense to have so many amps running through when the motor wouldn’t move anyway.

It’s a pain, but I’m sure I’ll have it working nicely eventually. This way, no worrying about hot wires and eating your battery life.

1 Like

It’s actually not that bad. It brakes when there’s force, it stops braking when there’s no force. However, it’s still far from ideal because the approach is somewhat flawed.

Basically, I’m countering any movement with an RPM speed of the opposite direction. The issue is that the function that dictates the RPM of the motor also asks for a certain amount of current. At 0RPM and, lets say, 40 amps, it acts just like a handbrake. Give an RPM value and it’ll spin.

The issue then becomes that 40 amps is strong! And any force that’s pushing you may not be able to overcome the 40 amps at all (let alone need to be countered by rotation), so it starts to not know if there’s any force pushing against it.

Another flaw is that if something can overcome that amperage at 0RPM, it’ll probably overcome it at any other RPM. If you set an RPM and tell it to take as much amps as it wants, it ruins the whole idea.

All that said, I’ve coded my way around these issues for the most part. But it’ll sometimes stop braking when there’s still force applied, and it takes it a few seconds to recognize that there’s no force so it can stop braking.

Testing was with my foot on the wheel, so still needs field testing to properly gauge it.

Possible Better Approach: Set handbrake when RPM is detected and keep lowering amperage. If you can reach 0 amps and stay at 0RPM, then no braking needed. If amperage goes down and wheel starts to move, keep desired amperage. This may jerk you, but if done fast and precisely enough may be unnoticeable.

2 Likes

That said, if you’re encountering force moving you to begin with, it’s reasonable to assume you’ll keep encountering it up until you try to move again.

Perhaps the best solution is a simple solution. If movement is detected, activate the brake indefinitely - until the user leaves the braking PPM/ADC range to start moving again.

This way, even if you only needed the brake for a short while, you can stop it from braking simply by leaving the PPM/ADC range for the handbrake and going back down to it. As long as you have some dead-zone the board won’t move when adjusting it.

If the code I have no works fine in practical application I’ll keep it and post it. If not, then this simple approach will have to do.

1 Like

Here’s the “simple” approach code which is very simple. To change how sensitive it is, simply change minRPM. The higher the minRPM value, the faster the wheel has to travel before it activates the handbrake.

A value of 100 will pretty much activate at the slightest movement. A value of 1000 allows for a reasonable amount of play (at least with my 6" wheels) before activating. Lots of customizability with this value. Can even make it so that it only activates if you give the skateboard a nudge (as you can set the value to a higher RPM than an incline would invoke).

Also note that the safety feature of not activating the handbrake if you go to fast only checks if you’re going to fast when you enter the handbrake PPM/ADC range. Once you’ve slowed down enough and are in that range, the handbrake will activate at any RPM.

This only matters if you set the minRPM very high, the handbrake will engage at that minRPM no matter how fast.

Well, that was stupid, bed time.

; Only Change hz If You Need Faster Responsiveness
(define hz 100)
(define isBraking 0)

(define one 1)
(define zero 0)
; -------------------------------------------------

; RPM At Which To Activate HandBrake
(define minRPM 100)

; Braking Current  (CHANGE)
(define brakeVal 40)

; Input Range For Handbrake to engage
; inputTop is the top of the range, inputButtom is the bottom of the range

; Input Value Which AT/BELOW To Engage Handbrake (CHANGE)
; Negative Value Means Handbrake Will NEVER Engage
(define inputTop -0.975)

; Input Value Which AT/ABOVE To Engage Handbrake (CHANGE)
; Negative Value Means Handbrake Will Engage At Any Value Less Than inputTop
(define inputBottom -1.5)

; RPM At Which You'd Be Too Fast For Handbrake To Engage (CHANGE)
(define RPM 100)

; THIS IS FOR PPM INPUT
; FOR ADC, CHANGE ALL:
; (get-ppm) to (get-adc 0)


(print(get-ppm))
(print(get-rpm))

;(get-duty)
;(set-duty dutycycle)


;(get-rpm)
;(set-pos pos)
;(set-rpm rpm)
(defun brake()
    
  (progn
   (if (eq isBraking zero)
    (progn
       (app-disable-output -1)
       (define isBraking one)
    )
   )
   
   (define curRPM (abs (get-rpm)))
   
   (if (> curRPM minRPM)
     (set-handbrake brakeVal)
   )
   
  )
)

(defun unBrake()
     (progn
      
      (if (eq isBraking 1)
       (progn
        (set-handbrake 0)
        (app-disable-output 0)
        (define isBraking zero)
       )
      )
     )
)

(defun loop()

    (progn
        
        (define PPM (get-ppm))
        (if (and (< PPM inputTop) (> PPM inputBottom))
        
         (if (or (eq isBraking 1) (< (abs(get-rpm)) RPM)) 
          (brake)
         )
         
         (if (eq isBraking 1)
          (unBrake)
         )
         
        )
        
        (yield (/ 1000000 hz))
        (loop)
    )
)

(unBrake)
(loop)
2 Likes

Thanks @Venom121212 for the remote! It’ll be a big help, I appreciate it A LOT.

A personal update for anyone who cares, I’ll keep it snappy.

One foot pedal “works” but my original plan calls for 2-3 foot pedals (preferably pads) so that you can properly steer the board and not need constant pressure. However, it’ll have to wait as the remote is far easier and will help diagnose some minor issues with the board.

I’ve been working on other projects (the skateboard has always been the side project for me). With the money saved from buying a remote and getting my paycheck, I decided that I can no longer live without a 3D printer.

The amount of times a 3D printed part would have saved me hours if not days of headache with BETTER results is simply unbelievable. An example just this week, I went to Home Depot needing a 1-1/8" washer… doesn’t exist LMAO. I splurged and got the Ender 3 V2 - which is currently on sale for exactly $199 on their site. It’s usually nearly $300, couldn’t believe it and stole it right up. Worth it’s weight in gold.

Will have to wait on getting the ESC I need, but I can share ESCs with the skateboard while developing.

I don’t know when I turned this turned into a blog, but I’ll definitely stick to skateboard stuff on the forum from now on lmao. But a 3D printer is a godsend for any DIY project.

2 Likes

Just a heads up, if you live near a microcenter you can get an ender pro for $110 after tax with a deal they’re always running. But yes, 3d printers are the best. I’m on my 7th :muscle:

1 Like

I saw that deal and was frustrated there isn’t one nearby :rage:! But, since there was such a good deal on the Ender 3 V2, feels like I at least am getting something worthwhile for the extra money.

Jesus :joy: I wouldn’t know where to put them.

I should have sent you one with the remote :joy:

2 Likes

Now you’ll just spend the same amount of time and headache working on broken printers and fighting slicers and battling CAD :rofl:

6 Likes

Lmao! Ill take 3.

Heh, true. A problem I can solve sitting down is a problem I welcome though :joy:.

1 Like

So true. 3D printer has made DIY life much easier and way more interesting being able to come up with parts on your own, either by designing or downloading someone else’s design.

2 Likes

@Venom121212 Got the remote!

And I got the 3D printer. It’s a package-full day!

1 Like

I’m literally getting high off 3D printing. The quality is spectacular even with stock everything. Have some upgrades coming in tomorrow, but I’ve already put the printer to work.

1 Like

Was going to say be careful with the upgrading and don’t over do it with all the stuff people recommend. I’ve seen too many people lose print quality chasing that dragon.

Dual gear extruder, glass textured bed, and capricorn or similar quality tubing are more than enough for 99% of people.

Direct drive is the next big step where I see most people getting frustrated and losing quality.

Heh, I see. I have seen an overkill amount of suggested upgrades. I’m just getting better springs, PEI surface for the bed, all metal hot end, and all steel nozzles.

This way, I should be able to print PC filament.

I have heard about people losing their original quality trying to make it better, sad. I have occasional print quality issues, but I’m going for settings fixes as I know it’s capable of better.

@Venom121212 It was indeed not the taken apart remote, got it working pretty quickly :slight_smile: Thanks so much!!!

1 Like

Just came back from taking this board out. JESUS is this motor scary powerful. I just know that any wrong move of my thumb on the throttle wheel will send the board flying. It moves me around like I’m nothing. 5kW is something… And I was worried 1 motor wouldn’t be enough.

I was hoping there would be something to keep the board from accelerating like crazy all of a sudden. I’ll have to see if ramp up time will work this time with current control.

I need to know, what do you guys think of foot straps? I used foot straps and it just feels dangerous. I got use to them after a while, but I know if anything happens, I can’t ditch the board. Gonna take them off next time I ride it (I now have to make the board safe to ride because everything is thrown together LOL) and see how it feels.

But, I wanna know if you guys use foot straps or not 0-0

2 Likes

I’m a binding lover. The amount of extra turning and control I get vastly outweighs stacking it while attached to the board. You just have to accept there are only 2 ways to fall in bindings… If you fall toe side, land on hands and knees (should be padded), if you fall heel side, go full turtle and slide on your back. You don’t roll out of crashes anymore. The board often goes down with you and acts like an anchor. If you want real bindings, mbs F5 are the best. Pretty universal opinion here.

Some people have made open bindings that are less locked in and seem pretty well reviewed. Lots of adjustment points. @tomiboi made some and I believe still is.

5 Likes