Introduction: Voice Prompt Electric Bike

Picture of Voice Prompt Electric Bike

According to the electric bike has no sound effect and blur back-light issue, My friends and i decided to make a change.

1. Add a sound effect to this E-BIKE.

2. Change the back-light with 8x8 RGB matrix

3. Getting Power from 48V Power supply from the battery and convert it to 5v to the Arduino Pro mini.

Step 1: Step 1: Find a E-bike First.

Picture of Step 1: Find a E-bike First.

This is my friend's old e-bike.

Step 2: Step 2: What Do We Need in This Project?

Picture of Step 2: What Do We Need in This Project?

1x E-Bike

1x Arduino Pro mini

1x 8x8 RGB LED Matrix

1 x screw driver

1 x soldering iron

1 x 5w Speaker

some wire and some electrical bandage.

1 x glue gun kit

1 x mini mp3 module

Step 3: Step 2: Open the Head of E-bike

Picture of Step 2: Open the Head of E-bike

At the first, you have to clean up the mess of the wire's function, for example, which wire is the light, which wire is the buzzer, which wire is the break signal and so on.

Step 4: Step 4: Make a DCDC to Convert 48v to 5v

Picture of Step 4: Make a DCDC to Convert 48v to 5v

it is very important thing that we need to convert 48v to 5v due to the Arduino Pro mini need 5v power supply.

_______________________________________________________________________________________

Caution:

48V is higher than Human safe voltage, Please be careful.

_______________________________________________________________________________________

At the same time, try to test Arduino pro mini and speaker. Copy the MP3 music to TF card and insert it into MP3 module, connect VCC, GND to Arduino pro mini and the music will change when the A0-A9 pin is ground, so you can connect A0-A9 pin of MP3 module to Arduino Pro mini module, and through programming the Arduino Pro mini to control the music changing.

Step 5: Step 5: Test Arduino Pro Mini With 8*8 RGB LED Matrix

Picture of Step 5: Test Arduino Pro Mini With 8*8 RGB LED Matrix

You can just plug the 8*8 RGB LED matrix with Arduino Pro mini according to the picture or you can learn it from this wiki.

You can edit this code in your Arduino IDE. just copy it and paste it to your IDE and compile it, upload it to your Arduino Pro mini ( it may need a FTDI module to help you upload the code).

Open an Arduino IDE and paste this code and upload to your Arduino board.

#include <SPI.h>

static uint8_t data[4] = {0x0, 0x0, 0x0, 0x0};

static uint8_t i = 1;

const int CE = 10;

void heartbig() {

int j;

int x = 2;

static uint8_t heart[8] = {0x00, 0x66, 0xFF, 0xFF, 0xFF, 0x7E, 0x3C, 0x18};


for ( j = 0; j < 8; j++) {

data[0] = ~heart[j];

data[2] = 0xFF;

data[1] = 0xFF;

data[3] = 0x01 << j ;

digitalWrite(CE, LOW);

SPI.transfer(data[0]);

SPI.transfer(data[2]);

SPI.transfer(data[1]);

SPI.transfer(data[3]);

digitalWrite(CE, HIGH);

delay(x);

}

};


void heartsmall() {

int j;

int x = 2;

static uint8_t heart[8] = {0x00, 0x00, 0x24, 0x7E, 0x7E, 0x3C, 0x18, 0x00};

for ( j = 0; j < 8; j++) {

data[0] = ~heart[j];

data[2] = 0xFF;

data[1] = 0xFF;

data[3] = 0x01 << j ;

digitalWrite(CE, LOW);

SPI.transfer(data[0]);

SPI.transfer(data[2]);

SPI.transfer(data[1]);

SPI.transfer(data[3]);

digitalWrite(CE, HIGH);

delay(x);

}

};

void matrixoff() {

int j;

int x = 2;

static uint8_t heart[8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};

for ( j = 0; j < 8; j++) {

data[0] = ~heart[j];

data[2] = 0xFF;

data[1] = 0xFF;

data[3] = 0x01 << j ;

digitalWrite(CE, LOW);

SPI.transfer(data[0]);

SPI.transfer(data[2]);

SPI.transfer(data[1]);

SPI.transfer(data[3]);

digitalWrite(CE, HIGH);

delay(x);

}

};

void setup() {

pinMode(CE, OUTPUT);

SPI.begin();
}

void loop() {

int m = 10;

for ( m = 10; m > 0; m--) {

heartbig();

};

matrixoff();

delay(100);

for ( m = 10; m > 0; m--) {

heartsmall();

};

matrixoff();

delay(100);

}

Step 6: Step 6: Assemble It!!

Picture of Step 6: Assemble It!!

The back-light is replaced by 8*8 RGB LED matrix. and you can see that shining sign for safety.

I'm sorry for lack of the images for the speaker assembling....

we've connected the speaker and Arduino Pro mini, and let the start key to control the music play on the background, it's a Farari car's engine sound, when you break, you can heard a sound warning: " I am going to crash~~~!!" and when you turn left, it will be a sound " Careful, I am going to turn left!" . when you turn right.

it will be a sound " Careful, I am going to turn right!" .

That's all, thanks for your watching, if you like my tutorial, please subscribe it and press " heart button" .

Have fun~

Comments

About This Instructable

1,620views

5favorites

Bio: I am a linux fan, a maker, a boy who like make thing and have fun with my friends.
More by yoyojacky:RPI-NetSpider-BT-music-boxAcrylic DIY Retro Game Arcade Kit Assemble TutorialRemote-Boombox-Pi
Add instructable to: