Pages

Sunday, 10 October 2010

All together now...

I've been playing with some code and simple hardware that allows the Arduino to pretend to be a USB keyboard...


And, now, when you hook up all the recent bits... shiftIN, shiftOUT and Virtual USB Keyboard...


BIG thanks to Jonathan Oxer and Philip J. Lindsay for sharing their code and methods!

[m]

Monday, 4 October 2010

Arduino and loads of LEDs

Needing to hook up lots of LEDs to an Arduino?  The obvious choice is to simply hook the LEDs to the digital output pins and away you go.  However, this will only give you 14 LEDs.

OR, you can hook one of these fellas.  Catchily named "75HC595" - but known as a Shift Register.  From just three pins on the Arduino you can drive 8 LEDs!  and the fun doesn't stop there... hooking up another one of these puppies to (essentially) the same pins gives you another 8 LEDs :- a total of 16 LEDs off just three pins on the Arduino!!  ...I don't know what the limit is but I've seen somebody driving 24 LEDs with three of these chained together. Very cool.





So, here's what I've done so far...

First up - one '595



Next - two '595s — I just ran out of red LEDs!



Lastly - I added a potentiometer to control which LED is lit.





It's a ball and it's pretty darn simple!


Next challenge - experiment with a similar chip... "74HC166" ...which allows eight buttons or switches to be connected to three Arduino pins - and can be chained together also!   ;)


[m]

Friday, 24 September 2010

DC Motor Driven by Arduino

At last, I've mustered up the courage to hook up a DC motor to the Arduino!


The reason that it's a big deal is that you can't connect a DC motor directly to the output pins on the Arduino - it'll draw too much current and fry the Arduino chip.  This method uses a transistor to switch the large amount of motor current with a small amount of 'control' current.  As an added level of safety for the Arduino, I've also use an Opto-Isolator which a means of completely separating the two circuits - control and output.  Unless I do something silly (!), the Arduino should be safe.  (I already fried one transistor in testing because I'd forgotten to put a diode across the back end of the motor!)

BIG respect and thanks to Mike Cook for his excellent article on hooking up motors.

My circuit diagram is a hacked together version of a couple of his diagrams.
(used with permission - thanks Mike)

The immediate application is for driving the blades on our learning project GRZR - the robot mower!

Thursday, 16 September 2010

Lemon and Potato Battery!

Today we made a battery out of Lemons and Potatoes!

This came about from the question "What is electricity?"  I had suggested that electricity is not a source of power... ie. you can't go dig up some electricity out of the ground!

John's smart reply was "of course not, it grows on trees!"   (I like his sense of humour)

We all laughed because that's nonsense.   Right?

So, this week, we made electricity from Lemons and Potatoes.  (thanks Dad)

Harvey and John wired the four together with copper and zinc (galvanised) nails inserted into the ends of each fruit/veg.  The lemons made 0.9V whereas the potatoes produced about 0.6V

In all we had about 3.5V which was enough to light up some of the LEDs we had on hand — albeit dimly!

Conclusion — Electricity is the MOVEMENT of electrons.

We also learned that these electrons move VERY slowly... like the minute hand on a clock, but their 'effect' happens at almost the speed of light!!

Monday, 12 July 2010

Grazing Mower - blade test 1

CAUTION:  wear safety goggles to watch this video.



It may seem nuts but this is a similar blade setup to the Husqvarna Automowers ie. multiple swiveling 'razor' blades around a large spinning disc.  I'm just running a little smaller at the moment.

When the drill had a charge (!) it was very effective at nibbling the grass down.  It's easy to see how this can work very well as the 'bot passes by repeatedly.

Like.


What do you reckon the chances are of the robot being able to identify weeds then stop over the top of them and say: zap them with a laser beam!  ?  — that's one for the boys  ;)

Saturday, 10 July 2010

Robot Lawnmower takes first steps as an ArtBot

I have a dream...

Mowing the lawn seems like a huge waste of time and energy to me. So, if I can build a machine to cut the grass for me then I'm a happy chappy!

I'm not the first to feel this way. A number of companies have done it already, such as Husqvarna. The problem is, their machines start at about £1,500! They are indeed splendid machines and I'm told that the people who own them would never go back to regular manual mowers.

Such a project is a great opportunity for learning electronics and mechanics and more, so I'm teaching a couple of lads on the back of it. Our first goal has been to make something move under it's own
steam.

The 'brain' is a Seeeduino board (an Arduino clone). We programmed it with some simple moves and powered it with a 9V battery. Two continuous rotation servos do the moving. The whole thing was bodged er.. built on an old CD and held together with blueTack. The fun of prototyping!!

It has no sensing capability at the moment so when it bumps into an obstacle... it.. er.. carries on regardless. The basic moves programmed were: drive forwards, turn ≈90° Left, drive forwards, turn ≈90° Right.  Rinse and Repeat.

The nest of wires on the breadboard was for a 5V regulator (thanks Oomlout!) and distributing the power to the servos and the Arduino.  This first pic is my trial build the night before. I needed to prove to myself (!) that it would all hang together nicely and actually work.  I went to bed with a big smile on my face! :D

Meet John and Harvey, our illustrious team...

And then for fun we strapped ever increasing numbers of felt tip pens to the back and turned it into an ArtBot!  The pre-schoolers thought it was marvelous - especially when it ran off the edge of the paper and started drawing on the floor!

 

See the video... :D



PS. We will consider offers for the final piece of art.  Proceeds will go towards our ongoing project.


Addendum
I've just had a fiddle about in the shed with two Stanley blades mounted on a mini CD.  The blades are bolted near the edge of the disc and are able to pivot.  This is the same approach at the Husqvarna machines - only much smaller.   Centrifugal force keeps the blades pointing out while hitting a tough bit of grass or twig flicks them in out of the way.   (see subsequent post for video)

I popped a big fat bolt through the centre of the disc and stuck the bolt shaft into my battery drill.   !!
Wearing safety glasses (!) and armed with the drill I ran some experiments on the lawn.

Yahoo!!  It works.  It seems that spinning it faster makes it more resilient to getting bogged down by too much grass.  Slower movement across the lawn helps too.  Very quickly you can see how the 'grazing' aspect - nibbling the tops off the blades of grass - can achieve a great result.  Next step... fit the spinner to a beefed up version of our 'artBot'.

Friday, 9 July 2010

Biogas primer

Since experimenting with solar cooking in NW Zambia in 2004/5, and discovering that - at least for where we were - the sun was only giving reliable daily shine for about 6 months of the year, solar cooking wasn't a 'silver-bullet' energy solution.

Shortly before returning home, I came across discussions about biogas - a flammable mix of Methane and Carbon Dioxide - produced by the bacterial decomposition of organic matter in the absence of Oxygen... so called Anaerobic Digestion.

This has been done all over the world for many years and at many scales. I was more interested in the domestic scale of things and eventually came across the work of Dr. Anand Karve of the Appropriate Rural Technology Institute (ARTI) of Pune, India.  Aware that animal dung was a rich source of methanogenic bacteria, Dr. Karve had questioned 'why settle for using the animal dung after the animal has already taken most of the goodness out of the food? Why not feed our biogas digester with the same food that the animal eats!?'


The result of his research was a domestic scale biogas digester and storage unit that produces large amounts of biogas very quickly - compared to the very large and very slow dung digesters.

For example, a dung digester needs to be big enough to accept, daily: 40kg of dung mixed with 40 liters of water - and retain that for up to 40 days.  The output is a fertiliser slurry.

The ARTI-style digester is being fed up to 1.5kg of sugary and starchy material mixed with just 5 liters of water.  The reaction takes 24-72hrs (depending on temperature) so the whole thing can be a fraction of the size of a dung based system.

As yet, I've not been able to build my own system - partly time, partly money but also the fact that I can't really use the gas as we live in a rented house - I don't think our landlord would like me drilling holes through the wall for a gas pipe!  ;)

However, I am closely following the progress of T.H. Culhane from the NGO Solar Cities.  T.H. is also pioneering the employment of different methanogenic bacteria.  Commonly, the bacteria found in the gut of animals - including you and me - is used but these little chaps work best at body temperature ≈ 37C.  As things get colder they go to 'sleep' and stop producing gas.   In collaboration with Professor Katey Walter Anthony, T.H. is exploring using cold-loving bacteria which are found happily producing biogas even in sub-zero temperatures.

See what these "psychrophiles" can do in the Arctic!


More recently I have been following the experiments of Paula Kahumbu from Kenya.  Check out her blog for more good work.