Electric Scooter Lighting Firmware
This repository contains the source code of firmware for the additional board, which installed on my electric scooter and used for lighting management, namely:
- Turning lights
- Stop signal
- Daytime running lights (DRL; front and back)
When the button, connected on left turn btn
is pressed - lamps (12V) connected to the left turn leds
will be blinks (about 500ms lightning will be on). The same with the right turn btn
and right turn leds
. Stop signal button do the then thing, but on separate pin's.
Arduino board and LEDs use the same power 12V line.
Additional features
- When stop button is pressed - DRL back light lamps will blinks together with the stop signal;
- Five clicks on stop signal button enables DRL lights (DRL switch alternative; mode is stored in non-volatile memory);
- Triple-click on stop signal button enables stroboscope mode for the front DRL lights (mode is stored in non-volatile memory);
Schematic & PCB
Front side | Back side |
---|---|
Project for EasyEDA can be found here.
Bill of Materials (BOM)
Type | Description | Quantity |
---|---|---|
Fuse | ~2A |
1 |
Fuse holder | - | 2 |
Resistor | 14 kOm (10..20 kOm ) |
4 |
Resistor | 10 kOm |
5 |
Resistor | 100 Om |
5 |
Mosfet | IRL3705N or any another analog |
5 |
Arduino | Nano |
1 |
Recommended software for flashing the Arduino board
make
arduino-cli
All what you need is:
- Edit
sketch.json
file (change theport
and/orfqbn
) - Execute
make
without any arguments or open this project in ArduinoIDE and press "Upload" button