Widget running on the smell of a single AA

For the next version of the widget, I’m planning to have an on board boost regulator. This design will allows the widget to run from just about any voltage source as low as 0.7v (so NiMh will be fine) and up to 5.5v, this boost regulator in conjunction with a standard LDO regulator will give me a nice input voltage range of 0.7v – 12V. Before I finalise the design I wanted to test things to see how well it’ll work.
Continue reading “Widget running on the smell of a single AA”

Widget Sensor Housings

I want to deploy widgets around the home, both inside and out, so I needed to find something that would allow some protection from the environment to the electronics, cheaply and easily.

On the weekend while doing some shopping I found the solution in the kitchen area of the local discount store, at $1.50 a piece it was the right fit for the job. They probably won’t like U/V in the long run, but will see how they go, at that price I can replace cheaply.
Continue reading “Widget Sensor Housings”

Come join the Darkside Skywalker…..The Switch from PIC to AVR

I’ve been playing around with the Arduino Diecimila and the ATMEGA168 over the last couple of weeks to better familiarise myself with the AVR ATMega168 MCU, I’ve been using PICs on and off the last few years, but the decision was made to use the ATMEGA as the MCU of choice for the Strobit Triggr project, mainly due to the open source tool chains available, and the simply programmer required.

In short I’m glad I’ve made the switch and I must say I’m loving the learning experience.  I’ve moved from the Arduino software development platform as I found it very limiting and am now using the open source avr-gcc (win-avr) and Eclipse, using the AVR plugin and CDT plugin as my development platform of choice, I’m comfortable with eclipse as my editor as I’ve been using this for my Java development for the last 5 or so years.

As a task I set for myself to learn the onboard peripherals,  I’ve created a Weather Shield for the Arduino, so far it has the RFM12B RF module, DS1307 RTC, HH10D Humidity Sensor, a HP03D, combined barometric pressure and temperature sensor, and soon to have a light sensor and Dallas 1-Wire interface for talking to the Dallas Weather Station that I’ve had lying around in a box for the last 10 years, (yes one of the original ones released by Dallas in 1998, I’ve been waiting to move in my house for a long time),  I’ll post the weather shield design up on a separate topic later, but suffice to say, I’ve enjoyed playing with the SPI, I2C, ICP, UART and onboard timers.

SHT-15 Humidity Sensor

I couldn’t get any hands-on hardware development time for the Strobbit open triggr project today, so I designed a breakout board for the Sensirion SHT15 Humidity/Temperature sensor for my weather station I’ve been intending to build.  I have a couple of these sensors at home waiting for something this so I can have a play with them.  PCB uploaded for fabrication today.

As a side note:  While uploading this for fabrication at http://www.batchpcb.com  I noticed that my RFM12 PCBs has been panelized and so should be in production, hopefully they should rock up on the doorstep sometime soon.

SHT15 schematic

SHT-15 PCB

PICAXE – LED Sensor

I came across an interesting article yesterday on Hack-A-Day about using a LED as a Photo Sensor and cheap communictaion device.  This is achieved by using some physical properties of the LED for both Transmit and Receive.  The article also links to a cool video clip demonstrating this. Original Article can be found here http://www.hackaday.com/entry/1234000873073550/

Anyway this sparked my interest and I soon had a PICAXE-08M hooked up to test if it-in fact it works (I also made sure that the date was not 1st April LOL).  After about an hour I had it working, this code requires 3 LEDs, One acts as the Light Source and is always on (not really necessary, you can use anything as a light source, the brighter the better), the Second LED acts as the Sensor and is connected to two outputs along with the current limiting resistor, this is really the heart of the concept.  The third LED is a status Indicator and gets switched on and off depending on the reading of the LED Sensor.  

This idea, as simple as it is, makes for some interesting sensor ideas.

Here’s the PICAXE code – LEDSwitch.zip

LEDSwitch

BuzzBot – Initial Testing

I started testing last night after finishing initial motor and wheel sensor hookups to my development board.  Couple of minor issues so far. 

Issues 

I’m using a pic based board from Modtronics. These are great and reasonably priced, along with the prototyping daughterboard.  However I have since found that the onboard RS232 is not on the same pin as the PICAXE28X, so I had to wire in an additional programming circuit, no biggy.  The other issues so far were the wheel sensors.  From my initial design I had used 10K resistors to bias the output of the opto-transistor, this was not tested and when testing the logic probe was picking things up ok, but not the PICAXE, after much stuffing around and not being able to find my multimeter (it was still packed away from shifting house) I ended up prototyping the same circuit, still had some issues, so I went  hunting for my multimeter and of course it was on the bottom box lol.  Luckily thanks to my trusty multimeter I found that the sensor was just dropping down to 3.8v when interrupted, anyway the solution to the problem was a larger resistor, a 22K on the output, this tested AOK, now getting ttl levels when switched, I also noted that the distance of the sensor to the reflective object (paper in this case) was fairly critical.  I modded the breadboard and then found one side was working fine, the other was not being seen.  Checked and found that the sensor was slightly further away than the one that was working.  So out with the hot glue gun and moved the sensor.  Both side are now giving me a reading on the PICAXE.

Motor Tests 

Next I adapted some motor control routines on Hippys PICAXE site to test my motor circuit.  First I tested without my motor control board plugged in, didnt’ want any smoke to escape, and all logic tested aok, then came big crunch of running motors live.  I can gladly say that all tests worked A1 with no issues.  Motor was tested though a range of 3 speeds in FWD, REV, Turn right FWD , Turn Left FWD, Turn Right Rev, Turn Left Rev, Spin Left and finally Spin Right.  While Testing the FWD and REV, I checked the Pulses from the wheel encoders to see how much the same each drive was over 100 counts from the wheel encoders and it looks like the Right side is slightly stronger than the left, no real surprise here as no two motor/gearbox combinations are the same.  I had thought about this a few days ago and knew that with any differential drive system I will encounter this type of problem.

Motor Control Algorithm 

This then leads me onto my motor control algorithm.  Over the last few days I have been researching PID Controller and their application to motor control for robots, as I want Buzzbot to drive in a straight line, also been looking at fuzzy logic, but I think will give that a miss at the moment.  I have been thinking of using and adaptation of the PI Proportional controller from the book “Robots – Inspiration to Implementation”  however so far I’m not 100% happy with the PWM and the way it is from the code I adapted, while it is very simple and works,  I would really like to use the onboard PWMout routines, but as I mentioned in an earlier entry it is only limited to two PWM and to two physical pins on the PICAXE – Bummer!!!!   I also thought I can use the old PWM command.  This command requires it to be refreshed, much like what is happening in  my test code, except with a agreater resolution, unlike the PWMOUT that runs in the background, perfect I thought!, but when I went to test it I found it’s only available on the 08 series…double Bummer!!!!!  So now may have to look at teh PulseOut command.

While the existing configuration does give me three speeds, the lowest is time critical and I notice that when I add a debug routine the slowest speed does start pulsing, also I don’t think it will give me the fine control needed on each of the wheel speed controllers.  I’m going to have to think about this a bit deeper.

Conclusion 

All in all everything is working as expected, with a couple of minor hicups along the way.  Biggest issue will be PWM resolution and time of my routines.  I think I’ll need to come up with another way of doing what I want simply and without too much additional hardware if I want a closed loop control system.  While I ponder on this I’ll test the IR Sensor circuits.  These I’ll prototype first before I hardwire in.  Once I finish these I can then start working on behaviour.  I would like to look at using some sort of subsumption model, but will look at it deeper as I get closer.

buzzbot -  Motor Testingbuzzbot -  Motor TestingBuzzBot - Modtronics PIC Board

Buzzbot – Wheel Encoders

Now that the Motor Drive Controller has been worked out, (but yet untested)  I needed to make up some encoders for the Left and right Wheels.  After a bit of research I found an excellent program for creating encoders and quickly made two and have just glued them to the inside of the wheels for some rough and ready testing.  I really think I will need to make them more durable, but for the time being they should surfice.  Once I have the encoders and the sensors mounted I will start some testing on the drive system and the PicAxe.

Some quick calculations to see what I get:

Assumptions: 

 Wheel Diameter (D)=50mm
 wheel Circumference (C)= D * 3.14 = 157mm
 Encoder Resolution (Res)= 16

 Distance Travelled Per between encoder Pulses =  C/Res = 9.81mm

So per encoder output pulse width = 4.9mm (~5mm) – Remember the encoder has a resolution of 16 (50% black and 50% white) therefore I need to divide by 50% to get the per pulse distance assuming a nice neat square wave.

I’ve also placed the encoders in the top cover, filed out some slots and hotglued to suit. 

 BuzzBot Encoder Template Buzzbot Wheel encoders Buzzbot Encoder Sensor Placement

BuzzBot

Introduction 

The Buzzbot idea came to me when i was trying to think what can i do to learn the picaxe uController, something practical, well rather than just flashing Leds and buzz buzzers anyway. What I wanted to do was something robotic that is cheap and easy as I don’t have much of a workshop facility available to me just yet to assemble any bases. 

Recycle 

We had just moved house and whilst doing the spring clean of some toy boxes and throwing alot of my childrens toys into thte “garage sale” box I came across the Buzz Lightyear Remote control buggy.  Basically a 6 wheel buggy with a psycho looking buzz with missile launchers as hands that raises and releases the missiles.  Well the missiles were long lost and what interested me was in using it as the base for my “buzzbot” is that most of the work is already done for me. i.e. I don’t have to build a base and look for motors etc.  I just want to get down to the nitty gritty of interfacing the PICAXE into something and playing around with it. Another thing that I think will work in my favour is that the Left and right wheel drives seem to be independant of each other as this thing from memory could turn on a dime, so therefore there must at least two motors, and the necessary driver circuits in place for me to use.

 BuzzBot Buzz Buggy Side

The Autopsy

Upon dissasembly it looks as though I was right, a gearbox and motor for the left and right drives (front two wheels on each side are geared , while the rear is free wheeling) also a circuit board with a simple RF Receiver and a heap of transistors, which after some initial tracing leads me to suspect are the H-Bridge Drive implementation for the motors, Left, right and the psycho buzz torso aka Missle launcher (he raises up to fire) woohoo, most of the work is already done.

Buzz Buggy InsideBuzzBot Drive Trainbuzzbot control boardbuzzbot -  inside buzz

Man he must be on crack!

buzzbuggy - psycho buzz

Next Steps…..

Ok since I have now dissected the Buzzbuggy it will now be re-assembled back into the “buzzbot”  minus the psycho buzz torso, as I just want to use the base as my test platform for the PicAxe.  I now need to trace through the circuit and see where I can tap into for the motor control, and also add some sensors. 

 Stay Tuned….

Welcome

First post to christen the new site……

Personal Projects underway. 

1)  Learn the PICAXE, a fantastic little uController, http://www.rev-ed.co.uk/picaxe/  I have just got my hands on the PICAXE 18X, so in attempt to learn to use this little beast I am looking at interfacing it with a few sensors and turn my sons discarded “Buzz Buggy” into a little 6 wheeled autonomous “buzzbot”. 
BuzzBot

2)  Also getting pissed off mowing the lawn at home every week, especially now it’s summer in Australia, so have now decided to look at some sort of mowbot.  After some research found someone who has actually implement one over the last few years with some great drawings and details, so will be using this as a starting point http://www.mowbot.org.

About

This blog is a collection of my projects and things I’m doing at the time.

Unfortunately due to a busy life (like most out there) the blog may see some in-action for periods of time, however don’t despair, as I get around to updating things eventually and the blog posts go through a burst of activity.

My Interests (in no order what so ever): Embedded Development, Photography, Wireless Sensor Networking, Home Control, CNC, Forex, Automated Trading, Quant Trading.

Thingiverse: http://www.thingiverse.com/seaton

My Photography: www.flickr.com/strobotics/

Tweet Me: www.twitter.com/madeinoz