loading

Make your own mini light seeker robot.

Step 1: What Do You Need

- Attiny 85

- DIP8 IC holder

- Programmer for the Attiny ( I used a arduino uno as programmer)

- 2x mini motor (specifications: 12x6mm, voltage 1.5V, current 20mA)

When you choose your motors, keep in mind the Attiny can only handle a max of 40mA at each I/O port!!

- Coin cell holder

- LIR2032 battery (It's a rechargeable battery, https://www.instructables.com/id/Cheap-LIR2032-Coin-Cell-Charger )

- A switch ( I used a pinheader and jumper as switch)

- 2x LDR ( Photoresistor GL5528 )

- Little piece of electric cable insulation (for the wheels)

- Robot frame ( 3D printer is very usefull, I'll share the .stl file in this instructable)

- piece of prototyping board

Step 2: The Frame

I designed this mini robot frame in 123D Design.

Is it perfect? Probably not, but it does it's job :)

You can download the .stl file for your 3D printer here.

If you don't have a 3D printer, try to make a frame out of wood or any other material you like.

Step 3: Mounting Motors and Wheels

Slide the motors in the holes.

The holes in my .stl file have a diameter of 6mm. But the motors I received appeared to be 6.5mm wide... so I used a 6.5mm drill to enlarge the hole a bit.

Now the motors fitted perfectly.

If necessary you can use some hot glue to secure the motors. (I skipped this)

Find some pieces electric cable insulation which fits on the motor shafts. This is because no real wheels are used and to obtain more grip.

Step 4: Optional: Testing the Electronics

This is the basic circuit i used.

Build it on a breadboard to test it.

If you do not know how to program the ATtiny, there is more info in this instructable.

Arduino code:

int led1 = 0;

int led2 = 1;

int ldr = 4;

int light;

void setup() {

pinMode(led1, OUTPUT);

pinMode(led2, OUTPUT);

}

void loop() {

light = analogRead(ldr);

if(light<511)

{analogWrite(led1,0); analogWrite(led2,255);}

else

{analogWrite(led1,255); analogWrite(led2,0);}

}

Step 5: Building the Electronics

Build the circuit on a little piece of prototype board. Try to make it the same size as the robot frame.

For the actual robot you need to replace the 2 led-Resistor combinations with the motors. (With reversed polarity to each other, to have the ability to drive forward )

Also add a switch to turn the robot ON or OFF (i used 2 pins in combination with a jumper instead)

The arduino code from previous step need to be changed a little bit:

int led1 = 0;

int led2 = 1;

int ldr = 4;

int light;

void setup() {

pinMode(led1, OUTPUT);

pinMode(led2, OUTPUT);

}

void loop() {

light = analogRead(ldr);

if(light<511)

{analogWrite(led1,50); analogWrite(led2,100);}

else

{analogWrite(led1,100); analogWrite(led2,50);}

}

Step 6: The Result

As a last step I mounted the circuit board on the frame with an elastic.

This robot has a very basic design and code.

Experiment with it, feel free to change things...

I would be very happy to see some of your results in the comments!

<p>Hai,</p><p>I do not understand that the LDR is connected to pin 3 (4) and you used in the program pin7 (2) How does that work together</p><p>Kind Regards</p>
<p>Srr my mistake, just change program or circuit and it will work.</p>
<p>I guess you could easily improve this by printing a ball hole for a coaster and pressing a ball in place. Not sure whether the little marbles to seal cartridges of fountain pens are too tiny?</p>
This is a perfect robot. Wow
<p>Thx a lot :)</p>

About This Instructable

1,405views

38favorites

License:

Bio: Interested in everything that has to do with technology or science, but especially electronics and robots. Visit my site: http://bgprojectz.weebly.com/ or youtube ...
More by BGprojectz:120cm Neopixel LED Bar - 3x VU Meter + Other Light Effects - Arduino - Bluetooth Interactive RGB LED Matrix, Controlled by Twitch Chat. Mini light seeker 
Add instructable to: