Let's Make Robots!

Arduino Robotics Reference Manual for School

G'day again all.

As some of you are aware I volunteer every Friday at a local high school to teach a robotics class. These lessons have been going for 6 months now and we have covered quite a lot. I have made a few robots along the way to help teach the concepts (Ben and James) of robotics, allowing the kids to build these robots and program them.

Their holidays just ended and we had our first lesson back for the semester last Friday. In this lesson I discussed with the kids what they understood from last semester, what they didn't and how good they thought I was as a teacher. It took them a little while to warm up, but after some friendly banter I got the ball rolling. I found that the kids had a very good grasp on the basics of electricity, especially with none of them having any previous knowledge. The kids could name and tell me how components worked and also how to hook it up to the Arduino. There was one thing that they all said however that they didn't understand properly, that was programming.

For the next few weeks we will be going through programming and not touching the hardware aspects as much. The problem I always found through school was that when you finish a topic, the teachers never really referenced to it again. So by the time you eventually came back to that topic, I had forgotten most of it. To combat this I have started to write some what of a book, or what I like to call as a reference manual.

This reference manual will house all the information that we have covered in the lessons and will also have more advanced tutorials and robot builds for the kids who like a challenge.

At the moment it is just shy of 5000 words with plenty more to do. I am hoping to finish this by the end of this month so that it will be ready when we tie everything that we have learnt in these lessons together.

I am posting it here so as perhaps some interested users could read it and tell me their thoughts and opinions on both my writing and the information included. Ofcourse I have written it so there are bound to be some errors. I would be honoured if you could take the time to have a quick look over it and tell me what you think.

Just in case the file attachment doesn't work here is the link to the manual: https://www.dropbox.com/s/r0iq4i1mehc7f12/Reference%20guide%20for%20School.pdf

Thanks for your time.

Jaidyn "chickenparmi" Edwards.

AttachmentSize
Reference_guide_for_School.pdf718.77 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I think it is a misunderstanding. You can power everything off the same power supply, just not through the Uno. A 500mAh battery will supply 500mA for an hour, but it can actually supply 1A for a half an hour. And so on up to it's rated "C" value. I don't think it is perfectly linear, but that is the rule of thumb for battery ratings. The "C" discharge rating is actually the output of the battery. So if your 500mAh battery was rated 10C, then it could safely supply 5A to the circuit (500mAh x 10) although your battery would be dead in about 6 minutes. But I agree, definitely NOT through the Uno.

Thanks JerZ. It seems I was getting confussed with the mah meaning, sorry about that, proves I need to do a lot more homework. Thanks for taking the time to look at it :)

I should mention that the "C" ratings mentioned above are for Li-Po's, I'm not sure about the grading convention for other flavors.

Wow, very nice CP. One thing I saw that I'm not sure is completely accurate is the NEED for separate power supplies. I've never needed one, and if it is the "proper" size I'm not sure if you do either. To try to confirm this, I looked up the most demanding bot I could think of, Chopsticks, and alas it also uses a single power supply. I would certainly double check this information with "the gurus", but I just wanted to bring this up since you are creating a guide that MANY will use as absolute fact material. Certainly it is good practice to use a separate supply, but I don't think it is absolutely necessary in every most situations. Keep up the good work, this is really useful stuff.

True, I can't say it is needed, I'm no expert in the matter, but here is my reasoning (may be compeltly wrong).

The regulator on the Arduino Uno supplies about 500(?)mah of current max to the 5V rail (the arduino uses some of this aswell). The particular continous rotation servos I use can draw maximum of 400mah each (but is usually 120), so with two that could be 800mah! I figure better to be safe then sorry and power them off a seperate battery pack. The battery pack I use can only deliver 500mah aswell and I haven't had any problems, but if I run into a problem, I don't want to wreck the brains aswell. 

I hope someone else can comment here and clear the matter.

Thanks for taking a look at it JerZ and I am glad you liked it :)

I believe you are confusing your units.  A ma is the amount of current being drawn at any instant.  A mah is drawing one ma for an hour.  They are two different things.  At any given moment your servo may draw 400 ma, 120 ma, 0 ma, or anything in between.  If it draws 120 ma continuously for an hour, that will be 120 mah.  If it draws 400ma for 1 second then 120 mA for 3 seconds and repeats over and over that comes out to 190 mah after an hour of use (400 ma * 1 hour * 25% duty cycle + 120 ma * 1 hour * 75% duty cycle).  A battery rated at 800mah may easily be able to provide an instantaneoud current of 2 amps, depending on type and construction.  But it would only be able to provide that for a max of 24 minutes ( 2000 ma * 24 min / 60 min per hour = 800 mah) but probably less because batteries are less efficient at high current draw.  

The two main reasons for NOT using a single power supply are "noise" and voltage sags.

Voltage sag:  A battery has resistance, just like everything else.  When a high current load like a motor turns on it draws even higher current than when running.  A motor might take 2 or 3 times as much current to start as when running.  This high current draw creates a voltage drop inside the battery due to the battery resistance, so a 9 volt battery drops to say 6 volts.  Start an old car (pre electronic) with the headlights on and watch the lights dim when the starter turns.  Same effect.  The sensitive electronic circuitry get really upset with the sudden low voltage, causing microcontrollers to reset and other nasty effects.  Lots of capacitance to store energy for these short, high current loads is often enough to counteract that particular effect.

"noise":  I put that in quotes because technically it isn't really noise.  What is often referrred to as noise is actually unwanted signals.  When a DC motor operates, the coils are disconnected and connected several times during each revolution to switch the polarity of the power (commutation) so that it can continue to rotate.  This switching causes lots of electrical signals to be generated (you normally connect a "kickback" or "flyback" diode on a motor, right?) that propagates through the power lines to other circuitry.  Proper isolation, filtering, and shielding can prevent these signals from reaching other circuits.  But that isn't always easy.

For the record, actual noise falls into three categories: Johnson (thermal) noise, the movement of electrons because of temperature, shott noise, the electrical signal caused by the discrete nature of electrons when they move, and 1/F (one over F: f for frequency) noise, which increases as freaquency decreases.  The first two are very well understoond and characterized, the last (1/F) is to this day not completely understood.  None of these are likely to have noticable effects in most experimenter circuitry unless you are dealing with very low level analog signals.  If you are interested in any of these Google is your friend, and Wikipedia has good writeups on all three.

In short, separate power supplies are easy and convenient, but rarely actually needed.

Thank you very much for that clarification bdk! I was hoping you would come along and answer this. You are indeed correct, I was completely getting everything confussed. 

Thank you very much for your indepth explanation! It seems I had partial concepts mixed with the wrong units :| I'll have to do some more reading to solidify my knowledge then will continue on.

Thanks again bdk!