|
Autodesk Fusion 360Autodesk
|
|
|
arduino IDEArduino
|
|
|
Simplify 3D |
|
|
EasyEDA |
|
|
TinkerCad |
Led Direction Indicator for electric scooter
PRESENTATION
I'm Tommaso, I'm 15 years old and i'm from Italy. I attend the second year of the high school I.T.I. OMAR in Novara (Piedmont)
THE IDEA
The idea of my project: "Led Direction Indicator for electric scooter" was born because using the scooter I realized that it was necessary to signal the turn left or right. However, I found that it was very difficult to signal the turn with the arm due to the small handlebar on the scooter which made riding unstable. So I thought of a way to signal the turning point and I had the idea to build the direction arrows. At first I was undecided where to place them. My ideas were to place them on the helmet, or make a jacket and finally I decided to mount behind the rear wheel fender, where there were already two holes to screw this little piece of plastic.
DESIGN AND USE OF COMPONENTS
In my project I used an Arduino Pro Mini 5V 16MHz. I chose this type of Arduino because it is very small, perfect for this project. I also decided to use an already assembled Arduino board for easier component availability.
For the representation of the two arrows I used 28 LEDs, the first prototype
is composed of 5mm 3v LEDs, each connected to a digital pin of the Arduino, with the exception of the 14 LEDs that make up the arrow heads. They are all connected in parallel with each other to the respective pin 2 and pin 13 of the Arduino. Instead the new prototype built on PCB also uses 28 LEDs, but they are orange and SMD, the model is 3528. I also inserted a Buzzer inside the circuit on pin A1 to understand when the arrow is on.
POWER
In the first prototype I used an external circuit to charge the battery, the TP4056 with micro-usb connector without protection circuit. Instead in the new pcb I decided to insert a TP4056 charger with Usb-C and also with the protection circuit.
I power the circuit with a 500mAh 3.7V Li-Po battery.
DIAGRAM DESIGN
For the drawing of the scheme I used easyeda.com. First I inserted the Arduino Pro Mini, then 28 orange 3528 LEDs. I connected the common ground of the LEDs with the ground of the Arduino. Then I connected the positive pin of each LED to each digital pin of the Arduino, with the exception of 2 pairs of 7 LEDs, connected in parallel to the first and last digital pin, used for the tip of the arrow. Then I inserted an 82db analog buzzer, connecting it to the Arduino's A1 analog pin. Between pin A0 and ground I connected a 2k resistor to read data 0 on the analog port. Finally I put a switch to turn the circuit on and off by interrupting the Vcc incoming from the charging circuit.
I used two tactile buttons to light up the arrows. I connected pin 2 of the first button with pin 2 of the second button, and these are connected to Arduino pin A0. Then I connected pin 4 of the first with pin 4 of the second through a 2k resistor. Finally I connected the first resistor in series with the second, then connecting it to ground. In this way on the analog pin we will have two different values that we will use to activate the right and left arrows.
To power the circuit I used a 500mAh Li-Po battery. To recharge the battery, I inserted the TP4056 charging circuit on the pcb. I also plugged in a USB-C connector for charging.
PCB DESIGN
For the arrangement of the components on the PCB I used easyeda.com
In the first prototype I used 5mm LEDs inserted on a 3d printed mask, instead in the new circuit I decided to solder smd LEDs directly on the pcb, giving the circuit the shape of two opposite arrows.
On the TOP side of the PCB I only inserted the smd leds. while on the BOTTOM side of the pcb I have inserted all the components necessary for the functioning of the circuit.
SKETCH
For writing the Sketch I used the Arduino IDE programming software, with C ++ programming language.
int DXState = LOW; //Stores the status of the LED (on or off)
int SXState = LOW; //Stores the status of the LED (on or off)?
bool flag; // Memorize button press and refractory fine changes to next loop turn (avoid multiple readings)
int buzzer = A1;
void setup() {
pinMode(13, OUTPUT); // pin declaration
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
pinMode(8, OUTPUT);
pinMode(7, OUTPUT);
pinMode(6, OUTPUT);
pinMode(5, OUTPUT);
pinMode(4, OUTPUT);
pinMode(3, OUTPUT);
pinMode(2, OUTPUT);
pinMode(buzzer, OUTPUT);
flag=true; // set Flag as true
}
void loop() {
if ((DXState=LOW)&&(SXState=LOW)){ //If all state = low light on the
analogWrite(7, 50);
}
int v = analogRead(A0); // read the value from analog pin A0 (values depend on the resistors connected to the switches)
if ( (v>=620 && v<=720 && (flag == true)) ) { // if v value is included from 620 to 720, recognizes right button press
DXState = !DXState; // Reverses the state (from ON to OFF, or from OFF to ON)
SXState=LOW; // Switch-off left arrow
flag=false; // flag=false to avoid multiple activation (change of state) when switch is pressed for a long time
} else if ( (v>=450 && v<=550 &&(flag == true)) ) { // if v value included from 450 to 550, recognizes left button press
SXState = !SXState; // Reverses the state (from ON to OFF, or from OFF to ON)
DXState=LOW; // Switch-off rigth arrow
flag=false; // flag=false to avoid multiple activation
}else if ( (v>=0 && v<=10 &&(flag == false)) ) { // If no switch is pressed
flag=true; // it returns the flag = true otherwise if you press at length it still performs the inversion SXState =! SXState or DXState =! DXState
}
delay(20); // time to set the variable
if (DXState == HIGH) { // IF DXstate=true play the right arrow animation
for(int x = 12; x >= 2; x--) { // start animation
digitalWrite(x, HIGH);
int v = analogRead(A0); // during the animation read analog switch to control if a switch is pressed
if ( (v>=620 && v<=720 && (flag == true)) ) { // if v value included from 450 to 550, recognizes right button press
flag = false; // prevent it from repeating
DXState = !DXState; // Reverses the state (ON to OFF, OFF to ON)
SXState=LOW; // TURN OFF LEFT
} else if ( (v>=450 && v<=550 && (flag= true)) ) { // ("LEFT"); if i press left arrow
flag = false; // prevent it from repeating
DXState = LOW;
SXState=HIGH;
}
delay(30); //pause
}
for(int x = 13; x >= 2; x--) { //IF SXstate=true play the Left arrow animation
digitalWrite(x, LOW);
int v = analogRead(A0);
if ( (v>=620 && v<=720 && (flag == true)) ) {
flag = false; // prevent it from repeating
DXState = !DXState; // Reverses the state (ON to OFF, OFF to ON)
SXState=LOW;
} else if ( (v>=450 && v<=550 && (flag=true)) ) { // ("LEFT"); if i press left arrow
DXState = LOW;
SXState=HIGH;
flag = false; // prevent it from repeating
}
delay(30);
}
tone(buzzer, 800); // buzzer sound
delay(200);
noTone(buzzer);
delay(100);
}
if (SXState == HIGH) { //IF SXstate=true play the Left arrow animation
for(int x = 3; x <= 13; x++) {
digitalWrite(x, HIGH);
int v = analogRead(A0);
if ( (v>=450 && v<=550 && (flag == true)) ) {
flag = false; // prevent it from repeating
SXState = !SXState; // Reverses the state (ON to OFF, OFF to ON)
DXState=LOW;
} else if ( (v>=620 && v<=720 && (flag=true)) ) {
flag = false; // prevent it from repeating i
DXState = HIGH;
SXState=LOW;
}
delay(30);
}
for(int x = 3; x <= 13; x++) {
digitalWrite(x, LOW);
int v = analogRead(A0);
if ( (v>=450 && v<=550 && (flag=true)) ) {
flag = false; // prevent it from repeating
SXState = !SXState; // Reverses the state (ON to OFF, OFF to ON)
DXState=LOW;
} else if ( (v>=620 && v<=720 && (flag=true)) ) {
flag = false; // prevent it from repeating
SXState=LOW;
DXState=HIGH;
}
delay(30);
}
tone(buzzer, 1000); // buzzer sound
delay(100);
noTone(buzzer);
delay(50);
tone(buzzer, 500);
delay(100);
noTone(buzzer);
delay(25);
}
}
3D DESIGN
For the box that contains the circuit I used the 3D design program "Fusion 360"
In the first prototype I created a rear box that screws onto the fender of the scooter. Inside the box is contained the Arduino Pro Mini, the buzzer, the battery with the charging circuit. In the front part I created a mask with 28 5mm holes to insert the red LEDs. They are connected with cables to the respective pins of the arduino board.
This is the support to fix the box to the scooter.
For the 3d design of the control panel for the lights, I removed the protection on the scooter and I redesigned it by inserting two buttons with the resistors.
COST
For the realization of this project I spent:
€ 1 for the 28 leds
€ 2.50 for the Arduino Pro Mini 5v 16Mhz
€ 0.50 for the TP4056 charging circuit
€ 2 for the 3.7v 500mAh battery
€ 1 for buttons / switches and resistors and buzzers
€ 4 for the 3D PETG filament
€ 0.10 for screws and bolts
For a total of about: 11 €
VIDEO
CONCLUSIONS
In conclusion, I am very satisfied with the final result of my directional arrows for electric scooter (also for bicycle). On the internet I could not find any products to put on my scooter, so I decided to create them as I preferred. I hope you also appreciate my idea and in the cable you would like to replicate it, do not hesitate to contact me.
Led Direction Indicator for electric scooter
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(6)
- 4 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
-
10design
-
10usability
-
10creativity
-
10content
-
10design
-
10usability
-
10creativity
-
10content
-
10design
-
10usability
-
10creativity
-
10content
-
9design
-
9usability
-
10creativity
-
10content
More by Tommy Aggiustatutto
-
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
153 1 1 -
-