[chbot] APC Magazine Arduino Article

Gary T grogyan at woosh.co.nz
Wed Aug 5 07:06:01 BST 2009


Hey Tim,
Sorry about the delay in getting back to you on this one, and have 
read the suggestions from the Christchurch robotics mail list, so its 
a case of which or both do I post on, maybe both.

One thing is always certain, getting an LED to blink, and it is so 
easy, there is no need for any more external circuitry, as the user 
can use the "debug" pin to turn the LED on and off.

I admit i'm not fond of the Arduino environment, but its the only one 
I have got working thus far, and the Arduino environment does come 
with gcc, and perhaps its best to use that instead of the Arduino software..
So here is a set of suggestions for code examples to get a basic bot going.

1)  Flash an LED
2)  Flash an LED based on how many times a button is pressed, ie a 
real basic Simon says game
3)  Turn LED on and off using a light sensor, like an LDR/TSL252R, or 
just an IR photosensor and shine a torch at it, but preferably with 
an IR emitter so the user gets basic range finder sensor.
4)  PWM control a motor based off the range of of sensing from the 
range finder sensor they just used in item 3)
5) Two PWM controls of two motors with two range finder sensors, 
using a cardboard box to follow, so if the box is too close, the 
motors reverse, if the box is not too far away, then the motors go forwards.
6)  This will likely get you over your 3 page spread, but they may 
consider a 2 part episode, if so, then the 2nd part would be about 
adding a 3rd motor, a servo gripper and get basic control of that 
with yet another sensor, so if an object breaks the beam, the gripper 
closes by a set PWM.
7)  Lastly, getting the bot to go forward and pick up a can and bring it back.

An alternative to bring the simplicity down, at point 5) instead of 
using a gripper, just leave it as is, and point the sensors downward 
so that the robot can track a line

What is so great about a line follower, is that it is very simple to 
do, and get parts for
The people reading the article can use a Tamiya remote tank tread 
set, which can be bought from most model shops, and some electronics shops
Eg http://www.pitstock.com/robonz/pictures/gary.jpg,  that bot I made 
for the NZ Robo Olympics at Massey Uni in 2003, the PIC was a bad 
choice of processor that I used, but the base and drive train are 
robust and cheap, just plonk down the Arduino, use a simple H Bridge 
driver (like an L298 (half of the L298 pins will need shifting to one 
side to be able to fit into veroboard)).
Use IR emitters and photo diodes, which are widely available, to do 
either/both range sensing and line sensing.

The code for these, bar line following, are really simple, easily can 
fit into a magaine article.

Hope this helps




>Hi all, I'm hoping I may be able to help me with some ideas. I've been asked
>by APC Magazine in Australia to write a series of articles related to
>getting started with Arduino. APC have picked up on the growing popularity
>of the platform and I've been tasks with writing a complete beginners
>article that gives them an interesting grounding in Arduino in just 2-3
>magazine pages and followed on by one or two more advanced articles.
>
>The challenge I see is not so much in the technology but in picking an
>interesting first project that leaves them with the desire to experiment and
>extend their knowledge. As a result I'm loath to start with the blinking
>light 'hello world' as I imagine there must be better options that haven't
>been thrashed. I must admit though, at this point it really does seem to be
>the best fit. Please prove me wrong....please.
>
>So, my question is this: When you started building robots, what really took
>your fancy and what do you feel may be a good starting 'micro-project' for
>others to start with?
>
>One aim (that may be asking too much) is to develop the howto in such a way
>that the initial article demonstrates the key essential elements of Arduino
>setup and use while being easily extended in the second article to produce
>something fun and functional. So perhaps the first may be setting up a servo
>to move and the second may make it follow the light (I'm not sure if that's
>too hard for newbies but you get my drift).
>
>Thanks in advance for any thought you can share on this.
>
>--
>Regards,
>Tim
>MindKits Chief Ninja




More information about the Chchrobotics mailing list