Showing posts with label arduino. Show all posts
Showing posts with label arduino. Show all posts

Monday, 1 October 2012

Fails

Didn't really have much time to get up to a lot in the shed this weekend!  However, my bag of bits from proto-pic arrived - Yay!



These components should allow me to combine some wireless motor action on my arduino in a shield free environment. I'm guessing this is the best way to maximise the use of the pins on the board. I'm in control! Will try to get the soldering of the xbee breakout boards done this week.

Still, I had a brief play with H-Bridge motor drivers which brings me to Fail No 1.

I'm keen to see if I can knock up a remote (internet driven) automated door to our chickens. I got the cheapest electric screwdriver that money can buy from Argos.



£6.99 gets you a motor with suitable gearing, a rechargeable battery pack and charger. Plus you get a handy chuck which should make attachement to a spool easier.   Bargain eh?  When asked by the friendly Argos sale person if I'd like to take out insurance on the item, I smiled and thanked them and declined.  Within 10 minutes of getting it home, I had it in bits and was taping up the gearing to stop it falling apart (again).  Warranty violated I fear.

Later on I had a rushed attempt at hooking it up to an H-Bridge and arduino thus:


Feels like I had everything wired up correct but nada from the motor!  Seem to be getting all the right voltages across the pins and devices.  H-Bridge got very hot so something is happening!  Anyway I'll have to come back to it later this week.  Might try a capacitor across the motor and check the voltage is sufficient for the H-Bridge etc.

Fail 2 concerned my investigation of xig.


xig is the open source Xbee Internet Gateway initiated by Rob Faludi who wrote the excellent Building Wireless Sensor Networks I have been reading (see previous post).

xig is an easy way to connect Xbee devices to the internet.  In short, it will let me switch out any Processing UI I concoct for something available anywhere using HTML etc.  You can run it on most platforms (Windows, MacOS and Linux) or you can buy a dedicated device to handle it (a ConnectPort).  I'll be content to get it running on my MacOS server.

Anyway, got it installed but it's so far failed to recognise my radio module.  I think there are probably 2 reasons possible for this, firstly I'm not using a true Xbee device but an XRF lookylikey - not much I can do about that!  Secondly, and this is where I'm hoping the problem lies - I'm yet to configure the radio module to run in API mode.  I can do that - yes I can!  Well that is if the XRF has an API mode...

More later when I get some time.

Monday, 24 September 2012

Experiments in wireless (2)

Still waiting for the components to build my breakout boards for the wireless and motors so I've had to content myself with getting the arduino to respond to serial input.  Actually very simple using the serial commands built into the arduino.

I started to rig up some different coloured LEDs on the breadboard when I thought: "traffic light!".  Then as I was rummaging for an amber LED I remembered a school project my eldest daughter had made last year - a set of traffic lights (complete with waiting car)!  So, in the true spirit of recycling (and to give the whole project the hither to missing element of child appeal) I connected up my daughters traffic light project to the arduino thus:


I just added in a couple of 220 ohm resistors to protect the LEDs and then hooked them up to pins 13,12 and 11:


To start with I'm just sent simple signals via a terminal console from my second radio module.  I programmed in a series of commands such as individual on/off, a proper pelican STOP, proper pelican GO and some fancy flashing sequence.

You can see these demonstrated (by my daughter) in the video below:




The (possibly) final stage of this project was to create a more user (child) friendly UI.  I used Processing for the first time to do this.  All I had to was install the serial library and point processing at the right serial port.  I applied my stellar design skills and came up with the following:

Simple point and click.  Unfortunately by now both my daughters had gone to bed so I'll have to wait until tomorrow for some user feedback!

Sunday, 16 September 2012

Experiments in wireless

A colleague at work has very kindly lent me a pair of Xbee clones - XRF v1.3 plus an explorer board and an Arduino shield.  Armed with a copy of Building Wireless Sensor Networks by Robert Faludi I've now managed to configure them to send a simple serial message to and fro.  I used CoolTerm on a Mac talking to Tera Term on my Windoze server.

What's also become clear to me is that by using all these shields, I'm fast running out of pins on my Arduino.  Certainly using the motor shield uses all but about 2 pins as it's designed to run up to 4 DC motors and a servo at the same time.  So once I get the arduino configured to handle the XRF serial input I'm going to abandon the shields for a while and prototype my own controls using a SN754410 quad half H-bridge chip for motor control and a breakout board for the XRF.  That way, I'm hoping I can manage my pin usage a bit better.  Plus it should look cooler!

Left: XRF on Ardunio + Shield; Right: XRF on explorer board

Sunday, 9 September 2012

Robot Boy Mk1

After many run ups and approaches, I've finally gone and built Robot Boy mk1.  Starting with acorns etc. so it doesn't do much yet.  Here's a video:


This is based on an Ardunio Uno, an Adafruit motor shield and the Maker 4WD chassis.

The shield arrives as a bag of components which gave me some much needed soldering practice.  All done and I plugged in some power and a green light came on.  Result!

A week later, I wired in the motors, knocked up a quick sketch for the Ardunio and crossed my fingers.   Rather alarmingly, this time when I gave the shield power no green light.  Somehow I had borked the shield in the intervening week - all it was doing was sitting on a shelf in that time!?!?!  But no, it all worked first time, looks like just a dodgy green LED.

Anyway, this is it so far.  It's supposed to turn a tight square but because some of the motor axles are bit off, it's a bit creative with it's angles.   But I'm pleased with my first version, mainly because my soldering seems to have been OK first time round.

So, what's next?  Some wireless I think.  I'd like an RC mode from a browser.