loading

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

Step 1: Aquire Components

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.

Step 2: Electronics

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.

Step 3: 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.

Step 4: Assembly

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.

<p>SNAKES TELL ME WHAT CONTROLLER I SHOULD BUY</p>
<p>What's up with snakes?</p><p>What remote you need depends on how experienced you are with Arduino and electronics. If you needs something for beginners you could look for a complete kit like this: <a href="https://www.sparkfun.com/products/13235" rel="nofollow">https://www.sparkfun.com/products/13235</a></p><p>You can also take the remote from your TV and figure out the code somehow. But that is more difficult.</p>
<p>what remote should I buy?</p>
<p>i done same projet, but i used springrc sm-s4303r 360&deg; servomotors, and i don't know what kind of battery i need... any tip?</p><p>robot works perfectly, if i solve the battery problem :(</p>
If a 4AA battery pack does not work there must be something wrong. What exactly do you mean by &quot;robot works perfectly&quot;? What power supply did you test it with?
<p>i tested it with arduino in 5V pin and works, but when i use the batteries with a transformer (to transform 6V of batteries to 5V) it doesn't: the robot rotates, but attiny85 doesn't works.. it doesn't tell the servomotors how to move and the robot rotate around himself. it also make a different sound: if i connect it to arduino without batteries the sound is more powerful and every component does his job.. if you have facebook or whatsapp i can send you more photos and videos, the strange thing is that 5V from arduino worked, 5 from batteries not</p>
<p>Hi, your robot is looking very nice so far.</p><p>I am using a 3.7V LiPo battery, those are widely available for rc planes and drones.</p><p>4 AA batteries should also work but I don't think there is enough room left for them in your robot.</p>
<p>i used 4 AA and 4 AAA batteries but the robot doesn't work.. so i'll buy this battery, thank you :) how much long is the battery life?</p>
<p>Sorry to bother you again but, do you have to <em>sync</em> the remote to make it work or does the sensor just take in the info? Thanks again!</p>
<p>Does this ronot move atonomously without the remote or do you have to reprogram the chip? I really like your design!</p>
<p>The easiest way would be to delete the IR function and place just this in the main loop:</p><p>if(getDistance() &lt; 10){ // check if you are in front of an obstacle</p><p> moveMotors(94, 20); // drive backward in a curve</p><p> delay(400); // give the robot time to balance out</p><p>}</p><p>else{</p><p> moveMotors(120, 120); //drive straight forward</p><p>}</p><p>But you have to experiment a bit until it will work. </p>
<p>Thanks!</p><p>Right now you need to press a button on the remote to enter the autonomous mode.</p><p>But if you are capable of programming the Attiny with an Arduino, changing a few lines in the code should not be a problem for you.</p>
<p>Thanks!</p>
<p>i tried to modify the code , but no results.. can anyone help please :( ?</p>
<p>What did you try?</p>
I tried to make the code work without the ir reciver, but robot keeps walking , i'm not good to programmming, can you do tjee code for me please? I only need to delete the infrared part
you think laser cutting would work?
<p>Nice project , to bad for me i cant get 3d printer...</p>
<p>I can print and ship it for you. Email me at 3dprintstore5 at gmail.com</p>
<p>I don't know where you are, but some libraries are getting 3D printers.</p>
did you put the ultrasonic sensor for balancing? thx
<p>The sensor is for only autonomous navigation. The robot balances by itself because there is more weight at the bottom than at the top.</p>
yes, but how can you control the pitch? can you share a video about it? with it controller? thanks I'm very interested :)
<p>There is a video on top of this page. The robot is can be controlled pretty good, but it is not as smooth as e.g. Sphero which has better motor control and a gyro to stabilize it.</p>
do you have a link for sphero? thx a lot! :)
<p>You could have googled it :)</p><p>https://www.google.com/search?q=sphero</p>
yes but I mean the instructions XD btw no problem :) now I try to build something similar with pitch controll and camera

About This Instructable

8,183views

222favorites

License:

More by CoreTechRobotics:Attiny Canbot Create a Robotics simulator using Processing A Universal Bluetooth Remote App 
Add instructable to: