I’m currently running a setup with vesc controlled via arduino. Would it be possible to drive the BMS e-switch via the arduino so I can power down the battery after idle timeout. Then use the inductive voltage generated by the motor to power up arduino long enough to re-activate the battery switch and turn on main power? I know there are a lot of self taught tinkerers here, but please post only if you have experience as an electrical engineering. Thank you.
That’s a pretty neat idea. I’m an electrical engineer too but they don’t teach me arduino stuff.
My understand of e-switch is pretty noob but since a solenoid behaves like a switch. Maybe you can connect the solenoid parallel to the e-switch so that it doesn’t matter if the e-switch is on/off, the solenoid can still deliver current to the bms and turns on the board? BTW the solenoid is controlled by the arduino and I think you can program it so that it can detect signals from the motor or the vesc?
Sorry if I’m wrong though.
@gee I’m don’t understand why a solenoid is necessary? In my mind the switch is replaced with an arduino controlled transistor or mossfet that opens the bms eswitch circuit (which reads 9V across when switch is off btw), thus deactivating the BMS. Right now when I kick push my board, it briefly powers up the vesc, and arduino. Hopefully this is enough juice to power up the transistor and thus re-activate the BMS. Could you confirm if this would work? Do I need any additional components besides a current limiting resistor between the gate and the arduino pin? My biggest concern is possible damage to the vesc or the BMS, this would not be easy for me to replace
OK I’m not that good at this lol. But from my understanding is that when you push start it will momentarily power the arduino and in turn power the transistor. This means that it allows current to follow from drain channel to source and effectively short circuit or allowing the current to follow thru the bms.
I don’t have an e-switch so I don’t really know how it works but shouldn’t you have to keep the transistor in an ON position? So I’m guessing powering it using the battery that power the arduino after the push.
What you proposed make sense to me. If you have a breadboard maybe you can try it out without the bms. I’m temped to try it but I need to look for a transistor first.
Edit: can you power arduino for a couple of sec and it still work?
I have a speaker hooked up to the arduino to make a tone during setup that I hear after every good push with the battery off. So should be long enough to activate the transistor if there is enough voltage/current(?) for it to do so. Will try and post back as soon as I have some time.
Would you mind sharing your code / libraries man? What exactly do you control with your arduino setup? Which functions?
I can’t share the code at the moment. I followed these instructions, its pretty much all you need: http://vedder.se/2015/10/communicating-with-the-vesc-using-uart/
I send bldc_interface_set_rpm() for acceleration; and bldc_interface_set_brake_current() in a custom PID loop for brakes bldc_interface_get_values() to poll the vesc for current state
You’re too advance for me. I barely understand after reading the site you linked.