2014-07-17

Light following robot

I joined the Ottawa Hacker Challange where you get a mystery sensor and this time it was a light sensor that need to be used.
For some time I wanted to make a simple robot and after watching lots of line following robots I now decided to make a light following robot.
I got a basic chassis

and the plan is to put two servos on top with the light sensor on. They then sweep around, find the brightest direction and go towards the light. With that I can have a light source hanging in front of it and it will follow it, at least that's the plan.
I added some hardware to read the encoder wheels



 to be able to control the direction and a I2C based LCD to show some numbers.


Got it to partly work but the motors are so weak and unbalanced that when I go full speed on one and 60% on the other it still can't go straight and when I go below 60% it stops completely.
While pondering  on what to do I passed by a thrift store and found a simple radio controlled hummer that I bought for $10.



The default function is binary, it's full speed forward or back and full tilt left or right so it's limited but I'm not interested in that part, I did go for the chassis. A single motor that I can control the speed on, replace the full tilt servo with one I can control with better precision. Add the sensors and so on and I have something that might work.
So far I only managed to rip out the provided electronics and put in my servo but I'm not sure if it's strong enough.



Update1:
Added the controller and got it to move around. It is moving a little at 25% and is to fast at 100%.
Steering works but is somewhat limited, no more then 20 degrees left and right (=total of 40) but it was like that before I changed it so it's not my mod that caused it.

What's left now is to figure out how to mount all parts and some programming. May need to add some kind of remote control to stop/start it or it will drive around at some predefined speed all the time.


2014-07-08

Kinetic Lance - completed version

Now when it's completed I do a new follow up on my previous post on how what to make with a proximity sensor.


A friend (who like to stay off the net) suggested a kinetic knife. It's about a knife that has to come close but it can't touch. (The idea comes from the books/movies "Dune" where they have kinetic shields).


After working on it for a while I have now managed to get everything together and working. Did some minor changes but over all it works better than expected.

From the top - component list
* Lance from the $$ store
* Long breadboard
* 2xAAA battery holder (inside the handle)
* on/off switch
* DC-DC Booster to convert 2.4V to 5V
* Arduino Pro 5V 328 16MHz
* 2x74HC595 shift register
* 1xULN2803 driver
* 5 RGB LEDs
* 4x7SEG display, Common Cathod
* Buzzer to make some noise
* 9x66.5 ohm resistors (58-100 probably works fine)
* 1x10K ohm resistor
* 5x330ohm resistor
* tcrt5000 sensor
* some wires



The Schematic for it, the battery and dc-dc is missing and using common anode RGB LEDs could been better (use driver IC instead of shift register) but now i had common cathode ones at home so that's what I used:
After figuring out where to put everything and solder all the wires the assembly was done.
The programming was next step and after changing around things I managed to get it to work the way I want it - here is a short demo


The code contains interrupt timer controlled driver for the digits using SPI to send it to the shift registers, just load an array with the numbers you want to display and forget about it. I'm happy with the way that part of the code worked out and will probably use it else were if I need it some other time.
The rest is just some logic to count points and make the RGB LEDs flash.


Version - 0.5 of the code

(photo credit to my shy friend)