Pages: [1]   Go Down
Author Topic: Edit: RC car with RFM12B transceivers and Custom Controller  (Read 2056 times)
0 Members and 1 Guest are viewing this topic.
Hillsboro, OR
Offline Offline
Jr. Member
**
Karma: 1
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Update: I started out using the Wii Nunchucks Accelerometer for control, but I quickly tired of it and wanted to make my own controller.

I've only been into arduino for about 6 months now, and this was kind of a bigger build for me, but it has been one of my goals since I first got my Uno. I built an RC car using an Uno, a breadboard arduino, two RFM12B wireless transceivers, and a Wii Nunchuck controller.

The transmitter side currently uses the Uno (will soon be swapped out for a breadboard arduino), the Nunchuck's accellerometer (library from todbot.com)for speed and direction control, and an RFM12B (using library from jeelabs).

The receiver side uses a breadboard arduino, and the other RFM12B. From there, a dc motor is driven from a TA8080K motor driver (forward and reverse, but no speed control). This will be swapped out for a motor controller board with PWM that's on the way from sparkfun. Steering is done with a servo, and the who thing is currently powered by a 9v into a 7805 5v regulator (will be switched to a AA pack in the future). I currently have it all mounted to a piece of plywood just to get it all working, but I have plans to move it to a real chassis in the future.

Here is a video of it running:
 


* 2013-03-15 14.27.10 (Small).jpg (44.22 KB, 640x361 - viewed 38 times.)

* 2013-03-15 14.27.05 (Small).jpg (44.03 KB, 640x361 - viewed 33 times.)
« Last Edit: April 12, 2013, 03:24:36 pm by cwhummel » Logged

"Beer is proof that god loves us and wants us happy" - a popular misquote of Benjamin Franklin, but true nonetheless.

Hillsboro, OR
Offline Offline
Jr. Member
**
Karma: 1
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Current Parts List:

1x Arduino Uno
1x ATMega Lite board kit w/ ATMega328P-PU from Surplus Gizmos http://www.surplusgizmos.com/AtMega-Lite-Development-Board-Made-By-GizmosUSAcom_p_2057.html
2x RFM12B-S2 Wireless transceivers from SparkFun
2x RFM12B breakout boards from digistump.com (these were designed for the digispark, but they work great on their own)
1x WiiChuck adapter from Sparkfun
1x Toshiba TA8080K motor driver
1x 7805 5V voltage regulator
1x Hitec HS-311 servo
6x 10K resistors
6x 4.7K resistors
2x 100nF capacitors
1x 334nF capacitor
Other stuff: A dc motor with gear assembly I found, a power switch, a plastic front wheel. I made the back wheels out of scrap wood with a hole saw.
Logged

"Beer is proof that god loves us and wants us happy" - a popular misquote of Benjamin Franklin, but true nonetheless.

Hillsboro, OR
Offline Offline
Jr. Member
**
Karma: 1
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

a found an old rc truck at goodwill for $5, pulled the guts out of it (except for the motor and rear axle), and mounted the servo up front for steering (it had a small dc motor/gear system). I bought a motor driver with PWM from sparkfun, and mounted/wired everything up on a radio shack PCB. After finding out that a single 9v couldnt power all three compontents (arduino, servo, motor), I ended up putting all three on their own power source. the arduino and servo both have a 9v going into a 7805 5v regulator, and the motor has 8 AA's. It still needs some work and a little rewiring, but i played with it out in the driveway today and it works pretty well. Next step is to shrink the Nunchuck contoller from using my Uno to a breadboard arduino with a battery 9(or just scrapping the nunchuck altogether and going with a joystick control, but for now, the nunchuck is kind of fun).


* 2013-03-16 15.38.21 (Medium).jpg (164.38 KB, 1362x768 - viewed 22 times.)

* 2013-03-21 15.21.29 (Medium).jpg (160.3 KB, 1362x768 - viewed 34 times.)

* 2013-03-24 14.51.43 (Medium).jpg (411.06 KB, 1362x768 - viewed 27 times.)
« Last Edit: March 24, 2013, 05:34:54 pm by cwhummel » Logged

"Beer is proof that god loves us and wants us happy" - a popular misquote of Benjamin Franklin, but true nonetheless.

Hillsboro, OR
Offline Offline
Jr. Member
**
Karma: 1
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Edit: attached the source code below

got most of the bugs worked out. The motor driver is a dual 1 amp driver from Sparkfun, and i wired it up  in parallel to provide up to 2 amps. It still doesnt have as much power as I'd like, but eventually someday I'll give some better battteries and swap out the motor and driver for a good brushless with an esc.

here is a video of it in action:


* NunchuckTransmitter.ino (2.76 KB - downloaded 26 times.)
* RecieverRcCar.ino (4.47 KB - downloaded 40 times.)
« Last Edit: April 20, 2013, 06:14:06 pm by cwhummel » Logged

"Beer is proof that god loves us and wants us happy" - a popular misquote of Benjamin Franklin, but true nonetheless.

Hillsboro, OR
Offline Offline
Jr. Member
**
Karma: 1
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I decided to drop the Wii Nunchuck as I just got tired of it(and the accelerometer in it sucks), and my plans exceeded its capabilities. I went ahead and made my own custom controller, with joysticks and pot triggers. I plan on also adding in better accelerometer for the fun of it, but neither that nor the necessary multiplexer board have arrived yet (because everything requires analog inputs). I haven't finished everything on the inside yet, but here is a good look of the outside.

The red covered switch is the "fire switch" which will be enabled in the future when I hook up the pan and tilt laser targeting nerf gun.


* image.jpg (733.34 KB, 2338x1397 - viewed 21 times.)

* image.jpg (871.2 KB, 2168x1662 - viewed 20 times.)

* image.jpg (727.19 KB, 2182x1413 - viewed 24 times.)
Logged

"Beer is proof that god loves us and wants us happy" - a popular misquote of Benjamin Franklin, but true nonetheless.

Hillsboro, OR
Offline Offline
Jr. Member
**
Karma: 1
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So my controller is pretty much done. I had plans to include an accellerometer in it as well, but that plan is on hold for now. I have more to do with the body of the rc car that I want to get done first. Since the previous post, I added in a power switch and external reset button, as well as an external programming port (becouse i never want to open that thing up again). I upgraded the wiring on the body of the truck and finally secured the batteries in place. It currently runs on 8 AA's (motor), and a 9v (arduino, servo).



* 2013-04-12 13.09.53 (Medium).jpg (160.97 KB, 1362x768 - viewed 13 times.)

* 2013-04-12 13.10.03 (Medium).jpg (199.92 KB, 1362x768 - viewed 8 times.)
« Last Edit: April 12, 2013, 03:39:55 pm by cwhummel » Logged

"Beer is proof that god loves us and wants us happy" - a popular misquote of Benjamin Franklin, but true nonetheless.

Hillsboro, OR
Offline Offline
Jr. Member
**
Karma: 1
Posts: 71
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I finally got the accelerometer added in. I had to add in a multiplexer as i needed more analog inputs. For some reason the accelerometer readings kept changing based on whether it was plugged in or just running on batteries, so I gave it it's own set of batteries and it works fine now. all i have left is to finish up painting the body and get the missile launcher (foam) working and mounted. Source code included below.


* JoystickControllerACC.ino (8.25 KB - downloaded 39 times.)
* JoystickRecieverACC.ino (6.15 KB - downloaded 41 times.)
Logged

"Beer is proof that god loves us and wants us happy" - a popular misquote of Benjamin Franklin, but true nonetheless.

Pages: [1]   Go Up
Jump to: