EFeru / hoverboard-firmware-hack-FOC

With Field Oriented Control (FOC)
GNU General Public License v3.0
1.05k stars 876 forks source link

Brake light control #464

Open HenryNickel opened 5 months ago

HenryNickel commented 5 months ago

Variant

HOVERCAR

Control type

FOC

Control mode

Torque

What can we do to make the firmware better?

There's one crucial thing I'm missing here. I've got a finished kids' car, it runs great. But it lacks what every motorized vehicle should have. Brake lights. I almost hit my son in the back of the car a couple of times when he braked hard. I couldn't find anywhere on here how or where to attach the brake lights. Question. Is there somewhere to pull some control voltage for the brake light from the board?

Describe suggestions or alternatives you have considered

If not, I was thinking of an electronic switch with a low threshold voltage mosfet that opens somewhere around 1V and connect its base to the hall brake controller, where the voltage is 0.8 to 3.3V depending on brake wetting. At anything over 1V the mosfet would switch on and connect ground to the led lights. I found a suitable SMD Mosfet SI2302 SOT23, 20V, 3.0A with a low threshold voltage of 0.6V to 1.2V. Can anyone think of another simpler option to pull the signal for the brake lights from the board without an additional mosfet transistor?

Candas1 commented 5 months ago

Hi,

Have you checked in the wiki how hovercar variant uses one of the sideboards ? It should be using one of the LEDs when braking already.

HenryNickel commented 5 months ago

Anyone here have experience programming a side plate for brake lights? The Wiki says that LED5 is the brake and reverse indication. How does that work? Does it light up when the brake is applied and flash when in reverse, or how?

I haven't found a clear and obvious procedure for programming the side plate anywhere here. I have programmed the main board many times, but not the side board yet. I suppose I'm plugging the 4 pins programming into the side board. Can I then program by wiring +3.3V from the programmer or is +3.3V omitted as with the main board and must be wired from the 15V supply from the main board? Then depending on the type of processor on the board I choose the GD or STM variant. For the main board I have unpacked the ZIP in PLATFORMIO into a directory. Then I selected the variant in the PLATFORMIO.ini file and edited the Config.h configuration file. Exported to and uploaded via ST-Link to the board. How about the side board? Where can I find the full zip file? Or do I just edit the platformio.ini for the sideboard, export and upload to the sideboard? Do I need to set anything else on the main board to make the programmed sideboard work? Thank you in advance for the info

Candas1 commented 5 months ago

If you are not able to find the right wiki page, you can also use the github search... https://github.com/EFeru/hoverboard-firmware-hack-FOC/wiki/Sideboards