Monday, September 30, 2013

Stepper Motor - Revived!

Yes ! .... Yes !

I did it. I got the cicuit for the stepper motor running via my 12v VIN Ardunio.
This is exciting as Stepper motors for the mechanics to move robot arms, wheels and such things.

They can move in very small increments. In my reading I learned how they are built and work. Basically they are magnetic, and have a number of poles in them. 

Saturday, September 28, 2013

7 Segment LED

Ok, with my success with Shift Registers and LEDs, it was time to step it up a notch.

I purchased a 7 segment LED (cost about $6). Decided to treat myself to a nice blue one.
Each of the segments on these is effectively a separate LED and with what I learned about shift registers Ive decided to try and create numbers on the segment LEDs.

I'll make a simple project to make the single digit could from 0 to 9 and repeat, with an adjustable software based timer to modify the speed. My knowledge in binary to decimal conversion was required here, as I somewhat randomly wired each segment and then had to deduce which was which from a circuit point of view (a bit backwards - but it worked).  Robbie can count ! ... See below


Thursday, September 26, 2013

Shift Registers

Good success 

...last night I wired my board with 8 LEDs, and a Shift register IC chip.
Wrote some code, learned about BIT maths to program the chip - and amazingly it all worked!. 




Before this configuration, to control 8 outputs from my Ardunio micro controller - I would need to use 8 plugs (or wires from the controller). Now I use only 3 wires (above you can see the Green, Blue and yellow wires on the right side of the Ardunio Uno board). And by using binary that I send to the Darlington Array IC chip - it will control the outputs for me. 
I've used a ULN2003A Array by the way. They are only a few dollars from Jaycar.

This expands one of the biggest restrictions I could see significantly. And further to this I apparently can daisy-chain more then one shift register together. That will be another project shortly.

In have read of a number of shield boards that can be added (one is the centipede shield), which does this work for you - but what the hell, I'm learning more this way.


Thursday, September 19, 2013

Baby Steps

Next Steps (oops!)

I through I would try making a stepper motor move. I picked up a small 12vdc one at Jarcar Electronics. Wired up my Ardunio board. I struggled a bit with the common and some of the electronic basics to be honest.

The board lit up, got hot then stopped working ... oh oh. Robbie is dead I suspect. Murdered with a jolt of electricity and it seems I have blood on my hands!

From there on in - I couldn't get even a simple piece of code to compile and upload via the USB. I think I cooked the card. They are supposed to be 'idiot proof' to about 20vdc, so I cant work out what I did wrong. I'm certain I had it right.

Anyway, long story short. I took it back to Jarcar and they replaced Robbies brain. 
I better be careful from here on in with him I guess.

A new board sits at about $40, but the chip is about $8 (with the bootloader (Robbies personality) pre-installed). So as long as I don't cook to many boards I'll be fine to experiment further. Hopefully the chip is the most significant point of failure.

Ok ... I'll give that motor a break for a while and work on Shift Registers. At least I can play with them at lower voltages. I decide at this point to grab some basic tools and a multimeter so I can test readings better.

I did quite a bit of reading on these IC's. They seem reasonably simple. Basically I can turn a limited number of Ardunio In's and Out's into many more - giving Robbie more eyes, arms and even more mouths effectively - he'll love it !. 

Even better I will be able to daisy chain the shift register chips together.Apparently the only contain will be the time it takes to send data signals between the 'latchpin' and 'clockpin' settings over many chips. But several shift registers or even a dozen or so does not seem to be a problem.
So I made up the Ardunio circuit (based on 8 bits and the 74HC595 IC), and used the example code - could I get it to work? ... No way! - Incidentally I've actually bought a second IC the same as I am keen to expand the number of registers I can access.

Friday, September 13, 2013

First Project

My First projects

I started at the start.

I added a RED LED and wrote a couple of lines to make Robbie flash :-)
Next I added a green one and made them alternate.
Already I was struggling with the construct of C++ (as it was very different to the code I was used to programming)

Next I made the LEDs dim slowly. I discovered this is how you also make a servo motor move, so I connected a small motor. OMG - my first Robot! - Robbie - you have an arm !
All of the above took me about a couple of hours to get working.

My next project was slightly more ambitious  A green LED flashes, as you move your hand over a light sensor, an LED flashes and a servo motor moves, then a Piezo plays a short tune. Sounds basic. Here is my first bit of code to make this work. (Skip on past if this is no interest to you). Robbie now has one arm, two eyes and a sad sounding voice box !





Thursday, September 12, 2013

My Setup

My Starter Setup



-Macbook Air (you also could alternativly use a Windows PC)
-Ardunio Board (I have the Uno model)
-Sensors

Note : I bought the experimenters kit for about AU$89, which gave me a load of electronics, a couple of sensors and the Ardunio Uni board as well as a really great Starters Project Guide. Well worth it to get started quickly.

Monday, September 9, 2013

What is an Arduino?

What is an Arduino - in more detail

Arduino is a tool for making computers that can sense and control more of the physical world than your desktop computer. It's an open-source physical computing platform based on a simple microcontroller board, and a development environment for writing software for the board.

Arduino can be used to develop interactive objects, taking inputs from a variety of switches or sensors, and controlling a variety of lights, motors, and other physical outputs. Arduino projects can be stand-alone, or they can be communicate with software running on your computer (e.g. C++ , Flash, Processing, MaxMSP.) The boards can be assembled by hand or purchased pre-assembled; the open-source IDE can be downloaded for free.

The Arduino programming language is an implementation of Wiring, a similar physical computing platform, which is based on the Processing multimedia programming environment.