Attiny Canbot

by CoreTechRobotics in Circuits > Robots

15552 Views, 256 Favorites, 0 Comments

Attiny Canbot

IMG_2068.JPG
Attiny Canbot

This short Instructable will show you how to create a remote-controlled robot using 3D-printed parts and an Attiny85.

Aquire Components

IMG_2043.JPG
IMG_2044.JPG
canb2.jpg

Parts list:

1x Atmel Attiny85

2x HXT900 from Hobbyking or any same sized micro servo

1x 3,7V LiPo battery (e.g. http://www.dx.com/de/p/tigers-3-7v-600mah-15c-lith...)

1x HC-SR04 Ultrasonic range sensor

1x 38kHz Infrared receiver (e.g. https://www.conrad.de/de/ir-empfaenger-sonderform-...)

1x 9 x 4mm switch (or use a jumper)

3D printed parts: http://www.thingiverse.com/thing:965449

1x bottom.stl

1x top.stl

2x wheel.stl

Print the top and bottom parts with the flat side down and supports enabled.

Depending on your printer and servos you will have to sand those parts down a bit.

Electronics

Canbot sch2.JPG
IMG_2058.JPG
IMG_2053.JPG
IMG_2050.JPG

Modify the servos for continuous rotation. You can find a nice tutorial here:

https://learn.adafruit.com/modifying-servos-for-co...

Connect the components as shown in the circuit diagram.

It may help to use a small prototyping pcb and thin wires.

Programming

You can program the Attiny85 using Arduino code and an Arduino as a programmer:

http://highlowtech.org/?p=1695

The full source code can be downloaded from this Instructable (or the Thingiverse page).

The infrared receiver works best with Sony remotes.

You will have to flash the code to an Arduino and output the data via Serial.print().

This way you can find out which button corresponds to which code.

Assembly

IMG_2048.JPG
IMG_2057.JPG
IMG_2060.JPG
IMG_2061.JPG

Place the components inside the robot using hot glue.

The two halves of the 3D-printed shell can be assembled using the screws that come with the servos.