CARVIEW |
Arduino R/C Lawnmower (painted)
introArduino R/C Lawnmower (painted)
This instructable will show you how to make your Arduino into an R/C interface that you can use for just about anything requiring remote control. I will also show you how I built an R/C lawnmower using my Arduino, a cheap R/C transmitter and receiver pair, and a couple of electric-wheelchair motors from Ebay. I have used this interface to control anything from basic LED's to Bipolar stepper motors, mini-robots, lifeless R/C cars from the thrift store, and even a 100lb lawnmower (all with appropriate motor controllers). It is very flexible and easy to change and very simple to set up.
Check it out in MAKE magazine in the April 2010 issue (#22) or here:
https://www.make-digital.com/make/vol22#pg1
UPDATE 3-24-10
New wheel-barrow bucket mounted on top with hinges so it can dump its contents.
UPDATE 3-10-10: NEW CODE
And new video of the Lawnbot400 moving a bunch of dirt from my truck to the flower beds across the yard, also I updated the code again.
.
I added some new code to the project that is safer, including a manual kill-switch and a Failsafe switch.
To implement the Failsafe, I used another Atmega168 (or an Arduino), to control a normally-open 60amp power relay. The relay disconnects the power to the motor-controller unless receiving a "good" signal from the 2nd microcontroller. This signal is updated 2 times every second and is either ON or OFF. If the bot gets out of range, it loses power to the motors. If I flip the kill-switch on the Transmitter, it loses power to the motors. This is also a handy way to disable it remotely if anything were to go near it that wasn't supposed to. The updated code for both microcontrollers is on the CODE page.
In addition to the failsafe, I changed the way the code reads the PPM signals to make it more reliable. Also, I realized that I was only able to run the bot at 80% speed with the old code, so now it is quite a bit faster and has more power (it can carry me across the yard @ 155lb).
Check out this new video of me riding the Lawnbot400, my wife driving it over a bunch of branches, then me making do some wheelies. Don't worry, the mower was turned off this time since the grass didn't need cutting, we were just having fun.
Disclaimer:
DANGER!!! This is a VERY dangerous piece of equipment if not handled appropriately. Since all the electronics have been home-built and the Arduino code is new, you MUST be very careful while operating anything heavy with this code. I have had 1 or 2 times during testing - and before adding a secondary failsafe - that the main Arduino jammed up and I temporarily lost control of the mower for a few seconds!!!! Though I have added several filters to discard unwanted signals and I rarely have any issues, an un-manned lawnmower IS STILL A POTENTIAL DEATH TRAP and I assume no responsibility for anything that happens as a result of your use of this code or this tutorial. This is meant as a guide for people who not only have the ability to build such a contraption, but the responsibiltity to operate it safely as well. Any suggestions or ideas on how to make this a safer project is always gladly accepted. Having said that, it's also awesome.
Background:
Most R/C equipment comes packaged for a single specific use, which makes it easy to use but is very limited in what you can do with it. So using the Arduino as an interpreter between the R/C system and the motor driver, I can use any motor controller that I want (depending on the size of the motor and power required), reprogramming the Arduino to supply the required signals.
What I ended up with:
After successfully hacking a few R/C cars from the thrift store, I got bored driving them around the driveway and I was having a hard time convincing my wife that there was any usefulness in the revived toy car. So I decided it was time to make my biggest chore at home, a whole lot easier and actually put my Arduino to work, and thats how I ended up building an R/C lawnmower.
While designing the lawnmower, I thought it would be cool to learn about the electronics that made it move, so I designed and built my own motor speed controller (or H-bridge) to power the lawnmower. I looked around at every H-bridge design I could find before deciding to go with a Mosfet h-bridge that uses both N-channel and P-channel Mosfets.
I built several different motor driver boards for this project, the first two were on Radio-Shack perf-board and the next 4 were designed using EagleCad and etched to a piece of copper-clad PCB, using the toner-transfer method. The most recent board is the one I use to mow the lawn as it has the ability to stay cool even while operating for long periods of time (30-40 mins straight) at 10-20amps and 24vdc. FWIW, I had to burn up a lot of Mosfets to find this out. If you want to see any of my other motor controllers, go to www.rediculouslygoodlooking.com and check out the Mosfet shield.
Here is what I bought already assembled:
FM R/C transmitter and receiver pair from ebay = $40
Arduino = $30
I already had a used push-mower = $60
Here is what I bought and assembled into the Lawnbot400 (as I call it):
(2) electric-wheelchair motors from ebay = $40 ea
(2) 12v marine deep cycle batteries - Walmart - $60 ea new (used batteries might work)
36" pieces of 2" angle-iron (2) and 1" square-tubing (2) from Home Depot = $8 ea
36" pieces of 1" angle-iron (2) and 1" flat steel bar (2) from Home Depot = $5 ea
(a lot) of nuts, bolts, washers, lock washers 3/8" or 1/2" with drill bit = $20
(2) caster wheels from Harbor Freight Tools = $14 ea
(2) drive wheels from Harbor Freight Tools = $8 ea
(36") 5/8" threaded rod with several 5/8" nuts and washers from Home Depot = $8
(2) sprockets from Allelectronics = $5 ea
#25 roller chain and a few universal links from Allelectronics = $10 for 3'
sprockets from Electronics Goldmine = $1.50 ea
(24) mosfets from Digikey = $1 ea
(there were quite a few small parts for building the H-bridge, they are listed later on)


To View All Steps on one page, Go Pro Today! |

1. Get R/C transmitter and receiver (I have tested FM and AM systems and they both work) 2. Upload code to Arduino (it is on the last page) 3. Make sure you are getting a good signal You will need an R/C radio transmitter(Tx) and receiver(Rx) pair, which is the most expensive part of the project, but can be used for every future project you might have involving R/C…

I built several motor drivers before finding a design that worked for my needs. For what it's worth, there are several nice products already out there that are fully assembled and require a lot less work if you are not interested in building your own electronics. The Open Source Motor Controller is an open source design that has been under constant community improvement…

First you need to mount the drive sprockets to the wheels. The EASY way: If you are smart and have more money, you can find a set of wheelchair motors that have the wheels mounted to them. The CHEAP way: I could not find any in my price range, so I went with just the motors, then bought wheels, then sprockets. Believing it would not be strong enough to mount the whe…

This is the difficult part to explain. You will likely have to have some mechanical ability and a good set of tools to build a large metal frame from scratch. And since this was a prototype, the dimensions are not all perfect, but luckily they don't need to be. The frame will be custom measured for your particular lawnmower, so I won't be giving you exact measurements.…

We now need to see how far down to mount the drive axle to make the frame level. So raise the rear of the frame up until the top of the frame is level with the ground (use your level). Now measure the distance from the top-rear of the frame to the ground, this is the frame height. Now we need to take into account the height that the wheels will raise the axle off the …

This was the most difficult part to plan out on the frame. We need the motors to be adjustable so we can adjust the tension of the chain, however they just have 4 holes in the bottom of each motor and nobody makes a mounting plate that I could find. The simplest way I could come up with was to mount the motors to an 8" long piece of 2" angle-iron, and then mount tha…

Next we need to mount the mower deck to the frame. Remember we made the frame wide enough that the edges of the frame would be centered on the lawnmower wheel shafts. All we have to do is cut 4 pieces of 1" angle-iron equal lengths so that the mower deck hangs evenly from the frame. So measure the height of the frame from the top to the ground. Now measure how high t…

This is the simple part. Go BIG. I only bought 1.. which I got at Walmart for $62. I got 2 car batteries (actually 1 marine deep cycle and 1 gel-cell car battery) both 12vdc. They together keep my lawnmower running strong for the duration of my front and back yard (I have about 1/2 acre of grass to cut and it is somewhat hilly). I slacked while trying to learn about ba…

Connect the electronics to the motors and batteries. The motor drive board has 1 connector for the main battery power and 1 power connector for the 80mm cooling fan that I would highly recommend you install directly above the mosfets. There is spacing for some long skinny bolts to hold a cooling fan. I bolted the motor driver above the Arduino breakout board to save spa…

I changed the code so that the Interrupt Service Routines (ISR) would run more quickly and the sketch would spend less time in the ISR. This means less overhead which means more signals are processed and smoother operation of the bot. I also added a 2nd sketch for the 2nd microcontroller to process 2 signals (you can add as many more as you want) using the pulseIn me…
52,022
views
published: Mar 11, 2010
related: arduino r, c lawnmower, lawnbot400, r, c interface, arduino, c lawn mower, remote control lawn mower
Arduino Contest Winners
by
Contest Robot
Wii Nunchuck as general purpose controller via Arduino board
by
XenonJohn
Electric Lawn Mower
by
susanta
Mac OS Foot Switch from a Guitar Amp Pedal.
by
aymans
Controlling an Arduino with Cocoa (Mac OS X) or C# (Windows)
by
computergeek
How to simply interface Lego Mindstorms NXT brick to Arduino by hacking sensors
by
wadodont
Fuse Beads NES Controller
by
Lalya
1 … more related »
What should i do with a 6.5 hp lawn mower engine?
Is it possible to control an Arduino with a computer?
I heard that arduino is based on C if I learn C++ will I still be able to pro…
Interfacing the arduino with the parallax RFID reader?

Humana Health by Design Contest
Enter to win one of 13 prizes!
Enter by May 23, 2010
Current Entries: 88
USB Contest
It works much better than the FM radio. I got it here:
https://www.superdroidrobots.com/shop/item.asp?itemid=923
motor control is L298 motor driver from solarbotics as i dont want to make the tripple8 and is going in a smaller robot more like the isotope 11 on your website
How are you powering the R/C reciever?
Try this code:
ftp://rediculouslygoodlooking.com/arduino/LawnBot400/4-19-10/Lawnbot400_relay_lights_check/Lawnbot400_relay_lights_2.pde
It uses a different method (pulseIn) to capture the R/C signals. It captures far fewer signals than with interrupts, but it is more stable and likely to grab good signals.... so try it out and see if you get consistent readings. I have a few more suggestions if this doesn't work, so let me know. BTW, this sketch is set to only read the signals and send them to the Serial monitor, I disabled the outputs for now.
1. Does your receiver work normally when you plug servo motors into it?
2. To verify, you are using digital pins 2 and 3 as inputs?
3. what kind of readings are you getting on the Serial Monitor in the Arduino IDE? (if they are very sporadic, take a screenshot for me)
My arduino mega works great with this code:
ftp://ftp.rediculouslygoodlooking.com/arduino/LawnBot400/4-19-10/Lawnbot400_Dx5e_default/Lawnbot400_Dx5e_default.pde
~JD
Hello,
It runs fine when I plug servos into it. I am using digital pins 2 and 3. They are the pins with pwm. The readings are sporadic. I will take a screen shot and send it to you around 10:30 am tomorrow when i am back on campus. Thank you so much for your help. Did you have to alter the values when using the arduino mega.
If so, congratulations!
and
https://www.rediculouslygoodlooking.com/site/osmc_jd.html
If you have the money, I would build 2 OSMC motor-controllers (about $120 for both). If not, the Triple8 dual motor-controller works perfectly for about $60, but it can only be used at 1kHz or below (as configured).
email me if you have any questions johndavid400 at gmail dot com
I use a Sabertooth 2x25 speed controller $125 it plugs directly into the receiver and has plenty of power for the application. The mower weighs 65lbs, the two marine batteries 130lbs, frame and motors 60lbs, that's 255lbs and I can ride it too, 160lbs, and it never misses a beat. The sabertooth is very versatile for the price and easy to use, the best thing out there for the money.
I use a plane transmitter. I didn't want to risk some kid in the neighborhood stealing control while he is playing with his R/C car. The sabertooth allows for tank style driving or single stick and cuts out when signal is lost.
My frame is welded so it really strong and I have a camera mounted, but it doesn't work great to mow from the camera.
My word of caution is that this is a potentially dangerous project. You are dealing with high current 24 volts @ 50amps will hurt. No matter how you make it it will be heavy and any heavy R/C vehicle can do real damage, I have a dent in my car door to prove it. There is always the risk of it doing something crazy, I've almost had my leg broken twice do to faulty wiring. Lastly keep your kids out of the yard once you get comfortable with it you can get too comfortable and forget you have a 255lb 6.5hp motor with whirling blades that will push over and slice up anything it can including the hand that built it.
Ill try to get my project up sometime. I procrastinated too long and you beat me. Nice mower.
By the way, AMAZING instructable and 5 stars!
https://www.spinlife.com/images/product/9359.jpg
I have one of these chairs and would like to convert it. Could I just wire into the old stick controller with the RC? The stick only has 5 wires.
But this way you can still use the joystick on the powerchair joystick to control the bot in addition to the R/C via the arduino microcontroller.
I did find other people who have converted chairs into mowers on the net. They either used servo's to the joystick, sabertooth 2x25, and one guy did this..
pull the joystick apart. inside the joystick, there'll be a coil of wires attached to the stick, and a disc with 4 or six coils attached to it.
pull the coils out and mount the single coil to a servo, and the disc to another servo.
now mount the two servos to a bracket to emulate the positions the peices had when they were inside the joystick housing.
You have no back EM protection, not even a diode, and the mosfets are too small in voltage, i used 100v mosfets with a 24vdc motor, 12A and they just exploded, all the protection died, and the microcontroller died. We measured the inductive peaks in approximately 200v, and you have 2 times the current here. You have no hardware protection to prevent both sides of the H-bridge from turning on at the same time.
We even used toric transformers and 100uf capacitors next to the motor and, even then, it exploded, with fire and everything.
The only solution that worked, after a year of trying (we didn't find something like a BTS7960 in my city, we looked for it) was to use a double inverter relay in series with 2 500v 8A mosfets in parallel, plus all the usual diode based protections, thermistor based protections, capacitor based protections, and, of course, optoisolated from the control logic.
that was for an electric wheelchair.
so, if your circuit worked, the motors are almost magic, you are extremely lucky, or you are omitting something.
i wish you the best
The mosfets I used are 50 amp and 60v.... I am also fairly new to mosfet theory, so I can't argue with you on much, but I do know that they have built in ESD protection diodes that are rated far above the 24 volts that I am using. I thought about adding additional diodes, but as it turns out, that is not necessary. My bot weighs over 100lbs and I can do very fast direction reversing and it does nothing to the mosfets or the microcontroller (It has had the same Atmega168 since I built it a few months ago). I was worried about the gate-source voltage spikes above 24 volts affecting the P-channel mosfets, but the mosfets I used have a Vgs max of 25v and they have performed very well so far at 24vdc.
I have used this controller with several different motors and it worked with each. Also it will carry me on top of my mower across the yard... so that is over 300lbs and it doesn't heat up at all. I may be very lucky, but it can handle anything I throw at it and it is very responsive, which is far more than I was expecting to get when I started.
I think 2 people have already made this board and said it worked... but I am designing a new board based on the OSMC schematic, so I will post it as a replacement when I am done.
A razor blade will fix the solder joints... very carefully
And some advice to others, DON'T DO THE H-BRIDGE ON PERFBOARD, it might be slightly cheaper but it is a lot harder to put together than it is to put it together on teh home made pcb's