What this is:

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.

See a slightly different version of the Lawnbot400 in my new book "Arduino Robotics" , as well as a DIY Segway and several other bots.

Check it out in MAKE magazine in the April 2010 issue (#22) or here:

UPDATE 3-24-10

New wheel-barrow bucket mounted on top with hinges so it can dump its contents.


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.

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.


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)

Step 1: Setting up

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 went with a 6-channel FM system, but  I have tested a 27mHz AM transmitter/receiver and it works just as well. The beauty of the Arduino is that if you want to adjust the deadband or the motor-speed at turn-on, (unlike commercial ESC's) it is all easy changed in the Arduino IDE.

Once you have your radio, all you need to do is upload the code to your Arduino, plug in the 2 channels that you want to use from your radio receiver into Digital pins 2 and 3 of the Arduino (these are the 2 external interrupt pins on the Arduino) and you are ready to control whatever you want. If you don't have a batter pack for the receiver, you can run jumper wires from the Arduino +5v and GND to the R/C receiever for power, you only need to supply a single channel with GND and +5v (it is not necessary to power every channel).

Upload the code using the Aruino IDE (I am using version 0016 on Ubuntu).

I started by controlling 3 LED's with 1 channel on a breadboard. I wired a red LED to be Forward (digital pin 9), a yellow LED for Reverse(digital pin 5), and a green LED for Neutral (digital pin 12). This allows you to adjust the code to fit the needs of your radio system. You will have smooth 0-100% PWM control of both LED's and the neutral light will turn on when the control stick is centered. If needed, you can widen the deadband for Neutral, but doing so will increase the speed at turn-on (which starts at 0%, so that would likely be desirable). See pictures.


The code has 4 PWM outputs for motor control:

channel 1 Forward = Arduino digital pin 9
channel 1 Reverse = Arduino digital pin 5
channel 2 Forward = Arduino digital pin 10
channel 2 Reverse = Arduino digital pin 6

2 outputs for Neutral indicator lights:

channel 1 = digital pin 12
channel 2 = digital pin 13

The 2 INPUTS from the R/C receiver should go to:

channel 1 = digital pin 2
channel 2 = digital pin 3


If you are interested to see your readings, turn on your Serial Monitor in the Arduino IDE (set to 9600bps) and you can see the actual real-time pulse readings for each channel, they should read:

full forward = 2000 (2 milliseconds)
center = 1500 (1.5 ms)
full reverse = 1000 (1 ms)

These readings reflect the number of microseconds that the pulse signal from the R/C receiver stays HIGH (or at 5v). The typical Servo signal that comes from an R/C receiver is a pulse whose length varies from approximately 1 ms to 2 ms with 1.5 ms being Neutral (which should also be the position that the control stick returns to when you let it go). The transmitter reads the position of the control stick and sends that pulse length about once every 20milliseconds. So it is constantly updating for precise control (for more info, look up PPM on wikipedia).  If you push the transmitter control stick forward, the reading should go up to 2000, if you push it backward it should go down to 1000. You can also use a voltage meter at this point to see that Digital Pins 5, 6, 9, & 10 will be changing from 0-5v depending on the position of the control sticks on the R/C transmitter.

If you care to know, the code uses the Arduino's 2 external interrupts to capture when the Rx signal pin changes states (goes from HIGH to LOW or vice versa), when it does at the beginning of each signal, it calls the interrupt function which reads the digital state of the pin and if HIGH, it records the microseconds value on the Arduino system timer0. It then returns to the loop until the pin goes LOW, at which point it subtracts the previously recorded microsecond value from the new current microsecond value to determine how long the pulse stayed HIGH (which tells us the position of the Transmitter control stick). It then does that over and over really fast.

I have the values constrained from 600-2400 in the Arduino code to keep things simple. Once it receives the signal and constrains it, it maps that value to be proportionally between 0 and 511, where 255 will be Neutral. The code then determines when the value changes and uses a function to determine the appropriate 0-255 PWM value in the appropriate direction and each direction has it's own PWM output pin to control the H-bridge.

On a side note:

To make things easier, I built an Arduino-based breakout board using Radio-Shack perf-board, a 28pin DIP socket, a 16mhz oscillator, and a bit of wire. I also added a set of female-headers in such a way that I can plug my R/C receiver directly onto the breakout board. For secure connections while mowing grass, I added screw-terminals on each Output pin and each of the 6 channels from the receiver. It also has a built in 5v regulator to power both the Atmega168 from the Arduino and the R/C receiver (which gets power when you plug it onto the breakout board). So you just route jumper wires from the channels you want to use on the receiver, to the Atmega digital pins 2 and 3. I also added 2 LED lights that are hard wired to the digital pins 12 and 13 for the Neutral lights for each channel so I can easily see when I am in neutral.

Since this bot is a Tank steer setup with 1 drive motor on each wheel, the coding is very straightforward where the left stick controls the left motor and the right stick controls the right motor. Both sticks forward means lawnmower goes straight forward, both backward and it goes in reverse. If you push the left forward and the right backward, it does a zero-turn circle. As you can imagine, mowing the grass is really fun now.

<p>Here is a unit I built from scratch with a track drive and complete stainless construction. It is fully functional but I have yet to add the lawnmower accessory to the front of it. If you have questions...feel free to ask. It has tons of torque. Two wheelchair batteries and two wheelchair motors and a sabretooth controller. I am thinking I may want to sell it if anyone is interested.</p>
That is awesome! Where did you get the tracks?
<p>Can you provide a more detailed schematic of how everything is connected to the arduino?</p>
<p>I built your H-bridge for a project im working on. Not sure if i made a mistake or if its working as designed. I connect motors to the triple8 and when i apply power to the board the motors both start. was not sure if it should default to stopped or running. I am also curious how to connect this to a standard arduino. Most of the refrences I can find show 3 wires per motor and this obviously only has two. Any help would be greatly apprieciated.. thanks!</p>
<p>This is genius! A beautifully executed idea with so much potential for other applications. Very good instructable.</p>
<p>Hi! First of all congrats to this great instructable! Very well documented, and very genius ideas.<br>However, I would be concerned with the parallel connected mosfets. Not one electronic part is equal (exactly the same characteristics). So if you take two LED's for example they will not be perfectly identical. This is the case for mosfets as well. So if one of them opens faster then it will have to handle amperage which it can't handle...<br>This is just a thought....:)</p><p>THank you and best regards,</p><p>Lorant</p>
Anyone have a copy of the .brd files the link is dead. I was looking forward to making this, but I dont want to buy the parts if there's no instructions to go with them
i am seeing your schematic, and, sorry to say, it's wrong. All the P-channel mosfets are reversed, you have a pair of p-channel mosfets on each H-bridge disconnected from the power. But apparently you fixed those two things on your PCB, it's a trap for beginners, you should fix it.<br /> <br /> 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&nbsp; 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.<br /> We even used toric transformers and 100uf capacitors next to the motor and, even then, it exploded, with fire and everything. <br /> <br /> 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.<br /> <br /> that was for an electric wheelchair.<br /> <br /> so, if your circuit worked, the motors are almost magic, you are extremely lucky, or you are omitting something.<br /> <br /> i wish you the best<br />
<p>Hey</p><p>you seem to be a expert on this field. I need some help. I made a remote lawn mover with wheel chair motors and 2x25A. It caught on fire after over heating. Now I am looking for a powerful MOSFET H bridge. Could you please send me a schematic with high power H bridge if you have got one. I am doctor in profession therefore minimal knowledge in electronics, need good good explanatory schematic. my email is Isuru7777wg@yahoo.com. Thank you for your help.</p>
sorry about any schematic and board differences... I am a beginner in Eagle, so I made the .brd file before the .sch file. <br /> <br /> The mosfets&nbsp; 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&nbsp;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.&nbsp;&nbsp;<br /> <br /> 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.<br /> <br /> I&nbsp;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&nbsp;I am done.<br />
maybe those mosfets are extremely good and more resistant to transient voltages than normal ones (IRFxxx), normally mosfets are very sensitive to overvoltages, and they are good with high currents.
<p>This is the best Instructable on Instructables. Pure genious. I think I first found this on RC Groups and then Googled around until I ended up here. I searched on eBay and Craigslist for wheelchair motors. They were all way to expensive. ($300 for a set). But I just found an old guy that rebuilds wheelchairs in his garage. I got a set of motors and wheels, some castor wheels, battery boxes, and several other things for $50! I'll be FPV-RC lawn mowing by spring!</p>
<p>Hi! Great job. I have a question. I'm in a similar project. what are the engine specifications?</p>
<p>Wow, Great job! Do you have a steering mechanism for the front wheels (IE a servo etc) or is all the turning done by the rear motors and the front wheels just pivot?</p><p>Thanks :-)</p>
<p>I want to make one with a bit more features :D</p><p>one with a good webcam or 2 and computer control ;P (me being a programmer)</p><p>it would be the pinnacle of lazy lawn mowing especially if i could turn it on from my computer. :D</p>
<p>Does anyone have the schematic or .brd file? None of the links seem to work.</p>
<p>One more thing. What kind of arduino did you use? Will an Uno work? Thanks!</p>
<p>Hi! I'm lazy and don't feel like doing the math on how much it is going to cost to make. Do you have a good minimum to maximum price range on building this thing? Thanks!</p>
<p>How do you pull and hold the throttle cable?</p>
<p>I took the spring off of the switch on the motor that the throttle cable pulls... then used a zip-tie to hold the switch open so it would allow me to crank the mower and it stay running. Then connected 2 wires to the contacts on the cutoff switch, connected to a relay to turn it off.</p>
<p>amaizing... maybe you can tech me how to make it..beocuse i'm newbe</p>
You have inspired me to create one! On the search for wheel chair! Thanks for laying the ground work and doing all the hard work.
<p>Sorry to bug you all again, another question. I am having an issue finding a 6ch Transmitter Reciever for a car. Does it need to be 6 channel, can it be more or less. Or is that for expansion of future stuff?</p>
<p>Hello, i have recently had this project rekindled in things to build. I have wanted to do something like this for a long time. And with the recent snows this year i have had a thought to put a snow scoop on the front of it to shovel. I have one maybe two questions for you. All the RC transmitter reciever pairs i am finding on ebay are in the GHZ range. I am new to arduino and not sure if this will work. And i guess the second question is, I see alot about the scooter motors, wheel chair motors are pretty expensive versus the scoter motors. Do you think the scooter motors handle mowing the lawn, hauling dirt and or a person around, and shoveling snow? Thank you in advanced for any comments</p>
You can view a video and pictures of my remote controlled lawnmower at: <br> <br>http://www.instructables.com/id/Remote-Controlled-Lawnmower/ <br> <br>Currently, the mower is controlled by a Futaba 4YF transmitter. The 2 receivers mounted on the mower receive signals from the Futaba transmitter and send commands via 2 Astro-flight 208d Reversing Controllers to 2 12volt wheel chair motors, which drive the mower. <br> <br>I want to interface my Windows 7 PC to allow the following 2 steps: <br> <br>Step #1-Learn Mode <br>Control the 2 Astro-flight 208d Reversing Controllers on the mower via the PC keyboard or PC joystick and record the sequence of commands to the PC. <br> <br>Step #2-Playback Mode <br>Place the mower in the same start position and send commands recorded on the PC in Step #1 to the mower. <br> <br>Is there a way to plug the 2 Astro-flight 208d Reversing Controllers into an Arduino board that can be controlled by my Windows 7 PC? <br> <br>specs on the Astro-flight controllers can be viewed at: <br>http://www.astroflight.com/208d.html <br> <br>Is there is an easier way to accomplish Steps#1 &amp; #2, please suggest. <br> <br>Thank you, <br>Bob Bowie
John, <br> <br>I would like to have one already built if you could please email private. I dont have any background in elec to confidence in building this bot. Please contact me. Thanks.
I been reading the arduino r/c lawnmower and am looking into building it. Just have a question, do u have a schematic for the pcb, or layout, with the receiver on it. The pcb under the moter driver board. Not sure how to connect the components on the board to the receiver and the to the power board and to the h-bridge board
I have ordered your book 'Arduino Robotics' and am looking forward to creating some of your robots.
Hi. Great instructable! Especially the 3x8 HBridge! I am going to use that one for my arduino powered dalek. <br> <br>I ordered the parts list first from this instructable. Then i checked out your github for the files. (STUPID me! First check all the files and then order your stuff). It turned out that the parts list here and the .sch and .brd files don't fit together. The V3 version only has 1 elco in the middle, instead of the 4 on the rest of the pictures. Do you perhaps have the originals also somehwere that match the partlist here :-). <br>Thanks <br>ramses
Does it mow grass?
I challenge you. Show me when it's done!
Wow, I had no idea that you could do a remote control lawn mower! We've been searching for someone that does <a href="http://mcnamaralawncare.com" rel="nofollow">lawn mowing in Bridgewater</a>. We never have time to do it ourselves. But I think I could find the time if it was remote controlled!
One day....
Hey John, sorry to ask again, am trying to get ahold of a schematic of the trasmitter board, and it seems that none of the links in the comments are working anymore. I need some idea on how to put it together and whats on it. Would love to see them, am disabled and am facsinated with this idea. Have all the time in the world to play with and build stuff. Ty in advanced.
or anyone that might allready have them.
wow, I am amazed at how awesome this is! have you ever used this lawn mower commercially? I am wondering how it would work for <a href="http://mcnamaralawncare.com" rel="nofollow">a lawn mowing company in bridgewater</a>?
Please Help Fund This Project!!! <br> <br>http://www.indiegogo.com/MicroMissile?show_todos=true&amp;a=1626754
I'm going to build something similar to this, but I'm going to make it so not only can I suspend the mower, but mount it on top for longer cut on rocky terrain. <br> <br>I don't like the sprocket and chain system though, but I haven't done enough research or know for sure I can do it any other way. I'm worried the chain is too complex and something weeds and twigs will get caught in. <br> <br>The main problem I'm having is I can't find these wheelchair motors for a reasonable price. I live in Australia and there don't seem to be any local cheap ebay auctions for these, and shipping on these suckers from the USA is $100-$200. I can't even find a cheap old wheelchair. <br> <br>Is there a more... retail... kind of product I can use? Something like a servo/actuator I can order? I have no idea what I'd need to look for in terms of torque though. What sort of specs would I need to ensure in such a product to make it work with this project? <br> <br>I need it to go up steep hills (30 degrees?) in long grass on rough ground. I'm already getting hardier wheels, larger drive wheels, and I found a company in Australia called Fallshaw that makes puncture-proof semi-pneumatic castors (though I can't find a price!), I will check out one of their stockists soon. <br> <br>Because I need to mow my rocky terrain sooner rather than later, I might build the frame and use it like a push mower until I can get the motors and retrofit the electronics. <br> <br>Any suggestions on alternatives to wheelchair motors would be appreciated.
i used e300 razor scooter motors they are 280w each (there are larger sizes of motors up to 500w that i have seen so far) and the ones i got were off ebay and i only paid about $65 for the pair they are working well so far i have not had any trouble with them and the sprocket size on them is #25. if you are comfortable with drilling your own holes there is #25 sprockets on amazon for pretty cheap they also have #25 size chain (10ft for $12). Hope this helped
with those razor motors would i still be able to move dirt in an wheelbarrow like attachment?
i have a 72 tooth sprocket on my 10 inch wheels (still goes fast with about an aproxamatly 5:1 ratio, but that is besides the point ) i put a wagon behind it and it was able to pull me (160 lbs. ) with ease and it struggled a little (like it might not do hills) with me and my 2 cousins in it ( about 350 lbs.), but if you change the gear ratio to a higher ratio then mine then it should be able to pull alot more then what i did, mine is too fast even with that gear ratio so i'm thinking about changing mine, but if you are using a 72 tooth sprocket on the wheels it should be able to pull about 200-300 pounds without it having much trouble but once you go over about 350 pounds then it will struggle. Make sure you are using 24v (for the torque) , and dont hit rocks with it (i did and i was sorry for about 2 hours of work [with the blade not the mower itsself] ) :) <br><br>If you have any more questions feel free to ask me, i would upload a video but i finished it then pulled out all the electronics in the back pannel to install an alternator.
Do you have any pictures/videos of the design using E300 motors?
( sorry i was working on the mower at my grandparents and i did not see the message) yes i do have a video of the but it is not the clearest :) but i will send it to you
You must have gotten lucky, the cheapest on eBay right now is $157 for the pair.
look at motor99motor his ebay page has the E300 motors for 26.90 a piece, that is who i ordered them from and they got to my house in a buisness week, Good luck
With shipping they're $124 for the pair, he knocks $30 off shipping for buying two. I guess I'll go with those, thanks.
what wattage of motor did you get?

About This Instructable


1,137 favorites


Bio: I have always been one to take things apart to figure out how they work, so most of what I own has been dismantled. If ... More »
More by johndavid400: Arduino controlled Bluetooth-bot Core3duino Arduino R/C Lawnmower (painted)
Add instructable to: