This is kind of a side project my friend and I made based on Arduino micro-controller and MSP-430 micro-controller. And I would like to share the steps we took to come up with this accelerometer car.
Step 1: The Remote
For this you will
need:
1. RF Tx and Rx
2. Accelerometer Module
3. Arduino UNO
4. Jumper cables
5. Arduino USB cables
I'm using an Encoder board along with the RF Tx i.e. the HT-12E board.
Connect the Accelerometer Module Pin
X------Analog Pin ------ A1
Y------Analog Pin ------ A2
All GNDS and VCC should be short separately.
We won’t need the z-axis as am trying to use the module to replicate the actions of a real driving style.
So if,
1. RF Tx and Rx
2. Accelerometer Module
3. Arduino UNO
4. Jumper cables
5. Arduino USB cables
I'm using an Encoder board along with the RF Tx i.e. the HT-12E board.
Connect the Accelerometer Module Pin
X------Analog Pin ------ A1
Y------Analog Pin ------ A2
All GNDS and VCC should be short separately.
We won’t need the z-axis as am trying to use the module to replicate the actions of a real driving style.
So if,
I bend the board Forward the car moves Forward.
I tilt it Left/ Right the car moves Left/Right.
I bend the board Backwards the car Stops.
So on those lines we have to first get the readings of the module for various triggering points so that we can move the car accordingly when a trigger point has been hit.
I tilt it Left/ Right the car moves Left/Right.
I bend the board Backwards the car Stops.
So on those lines we have to first get the readings of the module for various triggering points so that we can move the car accordingly when a trigger point has been hit.
First run just the module on the Arduino and
note the readings of the various tilt positions.
Make sure u place all the components on some
sorta board so that your actions can be interpreted easily.
For me i got the trigger values for,
Forward----- x= xxx y>= 400
Stop---------- x= xxx y<= 300
Left----------- x<= 300 y= xxx
Right--------- x>= 380 y= xxx
'xxx' means dont' care because those values doesn't trigger in the directions we are looking for.
Once you got all these info,Go on and connect the Accelerometer Module and the RF Tx to the Arduino to the pins given below
Accelerometer Module
x--------- A1
y--------- A2
RF tx board
b0------- 7
b1------- 6
b2------- 5
b3------- 4
All GNDS and VCC should be short separately.
Place all the components on the same board.
You plug in the Arduino to the computer and dump the code on the Arduino.
(ACC-Rf-Tx code in the download file)
There you go, now you have the Remote READY.
NEXT STEP!!!!!
Step 2: The Car
For this u will need:
1. RF Tx and Rx
2. H-Bridge
3. MSP-430
4. Jumper cables
5. 4 AA Battery holder x 1
6. AA Battery x 4
7. MSP-430 USB cable
8. Car along with DC motors and wheels
I'm using a Decoder board along with the RF Rx i.e. the HT-12D board. I'm using Energia IDE for the MSP-430.
First assemble the car with the wheels and dc motors i.e. if you don't already have a car lying around.
Then you will have to do the following connections.
RF Rx
b0 -------- 7
b1 -------- 8
b2 -------- 13
b3 -------- 14
H-Bridge
The two wires of each dc motor is given to the output of each input on the board
and the input of the board is given to
taking A is for the right motor
inp A1 ------ 10
inp A2 ------ 9
taking B is for the left motor
inp B1 ------ 11
inp B2 ------ 12
The battery in connected to the h-bridge.
The enable pins of motor A and B are short to any Vcc pin.
P.S
The Gnd pins of all the boards involved are shorted separately and the Vcc pins of all the boards involved are shorted separately.
Once you are done with the setup, connect the MSP-430 to the computer and dump the code on to it.
(Acc-RF-Rx code in the download file)
Make sure all the components are properly connected and attached on to the chassis of the car and nothing is falling off.
You now have the car ready.
NOW TEST IT!!!!
1. RF Tx and Rx
2. H-Bridge
3. MSP-430
4. Jumper cables
5. 4 AA Battery holder x 1
6. AA Battery x 4
7. MSP-430 USB cable
8. Car along with DC motors and wheels
I'm using a Decoder board along with the RF Rx i.e. the HT-12D board. I'm using Energia IDE for the MSP-430.
First assemble the car with the wheels and dc motors i.e. if you don't already have a car lying around.
Then you will have to do the following connections.
RF Rx
b0 -------- 7
b1 -------- 8
b2 -------- 13
b3 -------- 14
H-Bridge
The two wires of each dc motor is given to the output of each input on the board
and the input of the board is given to
taking A is for the right motor
inp A1 ------ 10
inp A2 ------ 9
taking B is for the left motor
inp B1 ------ 11
inp B2 ------ 12
The battery in connected to the h-bridge.
The enable pins of motor A and B are short to any Vcc pin.
P.S
The Gnd pins of all the boards involved are shorted separately and the Vcc pins of all the boards involved are shorted separately.
Once you are done with the setup, connect the MSP-430 to the computer and dump the code on to it.
(Acc-RF-Rx code in the download file)
Make sure all the components are properly connected and attached on to the chassis of the car and nothing is falling off.
You now have the car ready.
NOW TEST IT!!!!
Step 3: Thank You
Thank
You for your patience and time for going through this instuctable.
Hope you liked it.
If you have any doubts or questions, mail them to me at,
shoeb20391@gmail.com
Here's the video of the working model =)
Ohh!!! I almost forgot, here are the code files.
Acc-test
Acc-Rf-Rx
Acc-Rf-Tx
If your car starts going in a different direction other than the prompted direction, then alter the codes and check the motor pins.
Waiting for your suggestion.
Hope you liked it.
If you have any doubts or questions, mail them to me at,
shoeb20391@gmail.com
Here's the video of the working model =)
Ohh!!! I almost forgot, here are the code files.
Acc-test
Acc-Rf-Rx
Acc-Rf-Tx
If your car starts going in a different direction other than the prompted direction, then alter the codes and check the motor pins.
Waiting for your suggestion.
No comments:
Post a Comment