The wiggler is a one motor robot I built for the Single Motor Challenge on LMR for which I won third place. It’s pretty tiny compared to the robots I’ve built before and fitting all the electronics into the small head was a bit difficult. The Wiggler’s primary function is detecting the nearest light source using the two LDRs placed on his head.
Here is the final version of the robot I submitted to the competition:
Method of Locomotion : The Wiggler basically “wiggles” its way to the nearest light source by alternating the direction of the DC motor every 200ms. A rubber tip connected to the motor gives it enough grip to wiggle on a surface.
The wheels at the back can only move in the same direction since they are connected on a common axle….probably need to add some grip to them since they tend to slip alot. I made mini clamps to hold the axle from a piece of metal I had lying around and hot glued them to the body (turned out to be sturdier than I thought they would).
The wiggling movement allows the robot to move forward,left and right depending on where the source of light is.
Electronics and Sensors: The Wiggler uses an Attiny85 for its brain along with an L293d motor driver to control the motor speed and direction.The two LDRs are conncted to analog inputs 2 and 3 on the Attiny (IC pins 2 and 3). Digital pins 0,1,2 are connected to the enable and two input pins on the L293d respectively.
The sensors used are two LDRs facing left and right.So the robot moves to the side which is brighter.This action is only triggered when the difference between the two sensor reading crosses a set value (say 150).If the difference is lesser than the set value the robot will wiggle forwards.
The LDRs are connected using a 10k ohm voltage divider for each LDR.
Power Supply : 3 X AAA bateries connected in series(approximately 4.5V).
Code : I used an Arduino Uno as ISP to upload the code.The code is pretty basic and easy to understand through the comments. I tired to use LDRs that gave similar readings but they still ended up having a difference of about 70 which was compensated for in the code. The biggest challenge here was trying to get the perfect delay time for the wiggle.
Videos : The first two videos show the basic forward wiggling movement. The final video has the robot with the light seeking code uploaded moving from the darker part of the table to the lighter part of the table.