3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Hexabot: Build a heavy duty six-legged robot!

Step 16Electronics time

Electronics time
With the heavy-duty construction out of the way, it's time to focus on electronics.

Since I didn't have budget for a motor controller, I decided to use relays to control the motors. Relays only allow for the motor to run at one speed, but that's the price you pay for a cheap controller circuit (no pun intended).

For the robot's brain, I used an Arduino mircocontroller, which is a cheap, open source microcontroller. Tons of documentation exists for this controller, and it is very easy to use (speaking as a mechanical engineering student who had no microcontroller experience prior to this past semester).

Since the relays being used are 12 V, they can't just be controlled with a direct output from the Arduino (which has a max voltage output of 5 V). Transistors connected to pins on the Arduino must be used to send the 12 V (which will be pulled from the lead acid batteries) to the relays.

You can download the motor control schematic below. The schematic was made using CadSoft's EAGLE layout program. It is available as freeware. The wiring for the joystick and switches/buttons is not included because it is very basic (the joystick just triggers four switches; a very simple design). There's a tutorial here if you're interested in learning how to properly wire a switch or push button into a microcontroller.

You'll notice there are resistors connected to the base of each transistor. You'll need to do some calculations to determine what value this resistor should be. This website is a good resource for determining this resistor value.

*Disclaimer* I'm no electrical engineer. I have a somewhat cursory understanding of electronics, so I'm going to have to gloss over the details in this step. I did learn a lot from my class, Making Things Interactive, as well as tutorials like this one from the Arduino Website. The motor schematic, which I drew, was actually designed by CMU Robotics Club Vice President Austin Buchan, who assisted me a great deal with all of the electrical aspects of this project.
motor_schematic.pdf(792x612) 13 KB
« Previous StepDownload PDFView All StepsNext Step »
10 comments
May 6, 2011. 6:11 AMmanojkumar6027 says:
sir please send microcontroler circuit
Nov 13, 2010. 9:34 PMkarankochhar13 says:
can u upload a pdf file of microcontroler and relays because i am not good in electronics and it is confusing and i am new in robotics
Jul 12, 2010. 9:04 PMbanksviolette says:
I loved your project, and your presentation/explanation was very clear and well laid out, so thanks. I'm just starting to use arduino, and learning about motor control. One question I have about how you handled wiring the controller has to do with the amperage and how you bridge the low current of the arduino and the high current of the motor/battery? I get the general idea, but maybe you could give some specifics on the transistors used, the amp rating on the motor, etc? I'm following you thru most of this but get lost on that point (sorry: I'm only just learning this stuff). Thanks for any help you can give
Jul 14, 2010. 5:19 AMbanksviolette says:
Thanks so much - I've been scanning through a number of different sites/forums/etc, trying to figure out out how to increase the amperage btwn the arduino and the motor. I'm pretty sure I pieced it together, but your explanation is (again) really helpful. My apologies if any of my question felt remedial or anything. Again, I'm really new to this, so thanks for being patient and explaining this so clearly. Again: great project.
Feb 27, 2010. 9:20 PMmushroomdude says:
(removed by author or community request)
May 28, 2009. 11:10 PMDon.Jambo says:
The automotive relays are have 4 pins or more?
Apr 6, 2009. 4:58 AMDon.Jambo says:
And about the joystick: any joystick is good (PC gaming, alarm systems, toys, machinery) or you have to use a wheel chair joystick? Thx
Apr 6, 2009. 4:52 AMDon.Jambo says:
Which Arduino mircocontroller did you use?! the Arduino Mega or the Arduino Duemilanove? I cannot see that in the pics, and you didn't specify what model! Please let me know as soon as possible, cause I want to order it! Thanks, and Great Project! DonJambo

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
30
Followers
3
Author:rpantaleo
Mechanical Engineer