Introduction: HACK Your Vehicle Scooter
If your home is not too far away from the company, then riding a bike or walking is a good choice, healthy and environmentally friendly.
Because I am relatively lazy, so I chose another way, an electric scooter. This is a very cheap scooter, about 2000 yuan, which is 300 US dollars, only a very simple function, not even the speed and power display, just unscrew the switch then it run.
There's the National Day holiday in China recently, we have 7 days holiday, I intend to use this holiday to hack my scooter to make it more funny and useful.
In addition, in fact, you can use the same ideas to modify the electric motorcycle or the other means of transport.
Hope you will like this project.
Step 1: How Does It Work
I have done some of the more practical functions, mainly in the following:
- Speed is indicated by an LED Bar
- Through a simple voice recognition module for interactive control
- Through a digital tube module displays the battery voltage
- LED display working status
- There are two operating modes, Mode 1 and Mode 2
This is the default mode of operation, in this mode, your scooter ran when your screw the knob. If you have been screwed to the end, scooters will enter a high-speed mode, in high-speed cruise mode, you no longer need to screw the knob, scooters will hold the most high-speed operation. If you want to exit the high-speed cruise mode, you only need to screw the knob again. For safety reasons, in high-speed cruise mode, the buzzer will beep once every 2 seconds, to remind you to pay attention to safety.
You can enter mode 2 by voice control, the command is "Hicell, mode 2".
In Mode 2, you can keep cruising at a low speed. When you twist the knob to a value and release it, the scooter keeps the value you just screwed in. In this way, you can not suitable for some high-speed sections of the road to a very low speed cruise. For example, you can use a very slow speed, with others walking together, without having to screw the knob.
If you want to return to mode 1, you need to return via "Hicell, mode 1".
Step 2: What Do We Need
We need to use some electronic modules and other small parts.
Controller We chose a piece of Seeeduino Lotus, which is a fully compatible with the Arduino UNO control panel, which is characterized by a lot of Grove interface above, you can facilitate a variety of sensors on the street
- Numeric module - Grove - 4-Digit Display, for displaying the battery voltage
- LED matrix - Grove - LED Bar, used to display speed
- Speech Recognition Module - Grove - Speech Recognizer for entering commands
- DAC module, I was in Taobao purchased, you see similar modules in Adafruit
- 500mAh lithium battery
- Lithium Battery Charging Module - Lipo rider
- Relay - Grove - Relay
- 40V-5V voltage management module, from Taobao as well
In addition, we need these:
- 3M Sided adhesive
- Bicycle mobile phone bracket, used to specify the module
- Glue gun
- Electric iron
- Some lines
Step 3: Open Your Scooter
Next, it need to open the control system of your scooter, you may need a screwdriver or tool knife, in the demolition process may also need some violence. In any case, or be careful as well, bad hand injury or scraper broke.
We need to notice how many signal wires there is. Typically, at least the following signal lines are included:
- The positive pole of the battery
- Two switch lines, short boot, disconnect the shutdown
- A 5V power cord is used to power the weak system
- A control line, usually an analog signal, used to control the speed, my scooter on the analog signal has a Hall switch to produce.
Above is all the signal lines of my scooter. If your scooter is not controlled in this way, then you may want to think our a way, I think this should not be too difficult for you guys.
The next modification is mainly around how to connect the above lines.
Step 4: Fixed the Bracket and Module
Next, we attach the bracket to the handlebar of the scooter.
And the neat module with 3M adhesive stained above, which does not require too much skill, as long as you think the display can be a good-looking.
Step 5: Power Box
The battery voltage of my scooter is 40V, which is too high for the Arduino and sensor modules.
So I use a 40V to 5V power supply module to generate 5V, I try to use this module directly to the supply the system. I found that is not stable, often reset, I suspect that the scooter is running the process of voltage instability caused.
So I have to change a way. I made a power supply box, which contains lithium batteries, lithium battery management module and 40V to 5V power supply module. The use of lithium battery to the supply the system power, and through the 40V to 5V voltage generated by the lithium battery to charge. Although it looks a bit complicated, but this is a good solution to the problem of power supply instability.
About the connection diagram you can refer to the picture of the attachment.
Step 6: Hardware Connection
Because we use a lot of Grove modules, so the actual connection is not complicated. But you still need to do some welding work.
As for the connection, please refer to the attached diagram.
const int pin_buz = 8; const int pin_dis_clk = A0; // 4-digit display clock const int pin_dis_dta = A1; // 4-digit display data const int pin_bar_clk = 5; // led bar clock const int pin_bar_dta = 4; // led bar data const int pin_led_clk = 2; // Chainable led clock const int pin_led_dta = 3; // chainable led data const int pin_voice_rx = 6; // voice recognize rx const int pin_voice_tx = 7; // voice recognize tx const int pin_battery = A7; // to detect the battery of the bike const int pin_control = A2; // control voltage
Step 7: Software
Seeeduino Lotus is fully compatible with Arduino UNO. So if you had ever used Arudino, it's easy for you to make this step. If not please put hand on www.arduino.cc to getting started.
Click here to get more info about the board.
Click here to download the code.
1. When you get to the github page, find a Download ZIP button, click to download the code.
2. The code you downloaded is not an Arduino library, it's a sketchbook, which is include all the library the project need.
3. Unzip the file you had downloaded from github, you will get a folder namedArduinoPhone-master.
4. Open your Arduino IDE, click File > Preferences > Sketchbook Location, browse to the folder we had mentioned above - ArduinoPhone-master. Then click OK to save it.
5. Close and re-open Arduino IDE, click File > Sketchbook > Scooter, then the main code of this project is opened.
6. Choose the right board(Arduino UNO) and port to upload the code.
Step 8: Adjustment Parameters
Since each scooter is different, you need to adjust some parameters so that he can work properly. These parameters include:
#define CONTROL_ADC_MIN 187 #define CONTROL_ADC_MIN2 182 #define CONTROL_ADC_MAX 875
Step 9: Testing and Optimization
Then you can ride your scooter and see if it works. If there's anything wrong, you may need to modify your code or adjust some of the hardware. To MAKE is a very happy thing, these happiness include you will encounter many difficulties, and then solve it.
Of course if you have questions you want to get my answer, you can send me an e-mail: email@example.com.
If you have a number of features to upgrade and optimize, please give me pull-request at Github.
We have a be nice policy.
Please be positive and constructive.