Showing posts with label Hard. Show all posts
Showing posts with label Hard. Show all posts

Tuesday, August 23, 2016

3D Printed and Expandable Robot for Arduino


This is a nice project that you can continue to work on and modify as you learn more Arduino projects. This tutorial goes through the complete build for the bluetooth enabled robot in the first half of the video. It takes in total about 35 hours to 3D print, but can be assembled and programmed in around 30 minutes. Requires only 2 screwdrivers to build and does not require any soldering.

I wanted to design this thing to be inexpensive and use common parts, so this robot uses 9V batteries currently. They run out pretty quickly with a lot of use, so I will probably end up designing a new piece that allows for the use of rechargeable lithium ion batteries and Adafruit power booster. 

Don't have components? Don't worry. Just click the component's name. 


Step 2: Gather 3D Printed Parts

Download 3D printed parts at here or  here.




Step 3: Lightly Sand Wheels and Put Together Legs.



The wheels print in two pieces so use super glue and put them together. Lightly sand out the imperfections. Put the 4 balls inside the castors and push them all the way until they snap into place. Attach the 4 castors to the legs like in the below picture.







Step 4: Get the legs ready and add the geared DC motors.



Get the two posts in the first picture and connect each one to each leg. Get the piece that will hold the battery in the second picture and screw that into one leg. 



Find the small L shaped piece and attach it to a motor exactly like the 4th picture shown above. Do the same thing with the other motor, and attach both to the legs. Meet the two legs together, being sure the motors are facing the same direction and you should have something exactly like the picture below.





Step 5: Add battery with box and complete base.



Find the two curved side pieces in the first picture and connect them to the base according to the second picture. Place the battery box with battery onto the base according to the third picture and find the battery back piece and use it to enclose the battery like the last picture. The base is not complete.



Step 6: Add the middle pieces to the base and add the range sensor and motor driver.



- First use a skinny screwdriver and start the screw in the (robot's) left side middle piece according to the first picture. Its a tight fit and the screw will barely fit under that tab, I have broken the tab off many times, but luckily you have super glue and its an easy fix.


-Pull both battery wires and left side motor wires through the hole and tighten the screw you started. Tighten the second screw and secure the left side piece. Add the faux servo piece to this side and tighten both screws that hold it in, as in the third picture.



-Attach all 4 male to female wires to the HC-SR04 range sensor, it doesn't really matter what colors you use as long as they are different colors and you write down what color goes to what pin on the sensor. 



-Put the range sensor into the whole on the side piece like in the 5th picture and put the L298N motor driver on top. You must remove the two jumpers on the motor driver shown in the 6th picture.


-Attach the wires from the battery and the left side motor to the
 L298N motor driver according to the diagram. Add some male to female (or male to male) wires coming from the positive and negative terminals of the motor driver.


-You will have now two connections in the negative terminal, one going in and one coming out. Just to be clear it will look like the 7th picture (above).


-Grab the right side middle piece and add the other faux servo piece to that side with two screws.


-Now pull the right side motor wires through the right side piece and attach those wires to the motor driver. Try to attach them in order, i.e. left side wire to left most hookup on the driver (same thing on the other side), that way you don't have to change anything in the code later.




-Use two screws to secure the right side piece, and use two screws to secure the motor driver, one per side piece is fine but there are holes to add all 4 if you want.



-Finally, add 6 different color male to female jumper wires to the 6 pins on the motor driver.


Step 7: Almost there.


-Use a screwdriver and add slack to the positive and negative battery wires as shown in the first picture (makes it easier for the battery to slide out the side when you need to change it).




- Attach the claws to the arms and attach those to the shoulder pieces as shown in the first picture. Attach the arms to the faux servo pieces, as in the second picture.


-Find the neck piece in the third picture and attach the C shaped piece (file name neckNoServo.stl) with two screws from the bottom. Pull all the wires through that as
sembly. Attach the neck assembly with 4 screws to the base that you have so far.


-Add the head bottom piece and pull the wires through that try to use the orientation of the wires in the 4th and 5th picture. Range sensor wires through the left most hole (robot's right), motor driver wires through the center, and power and ground through the right most hole. Attach 4 male to female connectors to you bluetooth module and tape them together if possible. It is going to go underneath your Arduino board like in the last picture. This is down so it can be unplugged easily when uploading new sketches.



-Wire everything according to the diagram.


Step 8: Done.



Attach the two halves of the face with 4 screws. Find the ears/antennae and attach them to filename earsNoServo.stl. They should now look like the T shaped pieces in the first picture. Attach them to the head top piece. Each one has two screws. Put the face piece on and pop the LEDs into the eyes, bending the pins at a 90 degree angle so they can't fall off like in the second picture.


Step 9: Upload the code and Download app. 


Download the Android apps in the two pictures below.




Pair your bluetooth module to your computer or phone with the password "1234" it will be called HC-06.Everything else is pretty straight forward to use, if you watched the video, the apps are pretty intuitive to use.

To control the robot via bluetooth from you computer connect the serial monitor to bluetooth port HC-06 and use these commands with CAPITAL LETTERS (put caps lock on) and hit enter after each command:

S = stop, F = forward, B = backward, L = left, and R = right.

IMPORTANT*** anytime you need to upload a new sketch the bluetooth module must be unplugged or else the code will not upload.


Arduino Arduino UNO R3 bluetooth bluetooth module DC Motor with Wheel Hard hc-06 L298N project RGB LED SR04 Ultrasonic Range Finder

Monday, August 22, 2016

Automatic Pet Watering System

The automatic watering system simple just read the water level in the water bowl with a HC-SR04 Ultrasonic Sound Sensor. It measure the distance to the surface of the water. If the level is less then 3cm for more than 30sec it triggers a 5V relay whit a NO-contact . The relay are controlling a 12V DC supply to a mini watering pump in the water tank.





Step 1: What You Need?

1 x Arduino Pro Mini 
1 x General Purpose Transistor NPN ( PN2222A)
1 x Relay (generic) 

1 x Ultrasonic Sensor 
1 x RGB LED (Common Cathode)
1 x LCD 
1 x 12V DC Waterpump 



Don't have components? Don't worry. Just click the component's name. 


Step 2: Build Your Circuit. 




Step 3: Upload The Code. 


You also can view here for more.




1 way channel relay Arduino Arduino Pro Mini Hard HC LCD project Relay RGB LED SR04 Ultrasonic Range Finder

Tuesday, August 09, 2016

Persistence of Vision (POV) Using Arduino


In this tutorial I will be creating a POV (Persistence of Vision). I'm going to make the POV can be used with two ways to play, easy to hold, and can spinning on the platform.

Ok, let's get started!!



Step 1: What You Need?

1 x USB Type-B Cable 
20 x  LEDs Super Bright  (Green Color LED used in tutorial)
20 x 100 Ohm Resistors
1 x PCB / Perfboard
4 x Spicer (0.5cm)
4 x Nut and Bolts
1 x Project enclosure (I'm using "Kitchen Ware" box)
1 x 9V Battery Holder or 9V Battery Snap
1 x  On/Off Switch 
1 x Breadboard
Shrink Tubing 

Male Header Extended
Male-to-Male Jumper Wires 
Female-to-Male Jumper Wires
1 x Computer with Arduino IDE
1 x 9V Battery

Tools
Soldering Iron and Solder 
Mini Drill 
Pliers 
Cutter 

Optional
Arduino Compatible UNO Ultimate Starter Kit / Learning Kit
USB To Power Jack Cable



Don't have components? Don't worry. Just click the component's name. 



If you want to make your POV spinning too, you need to jump right into step 11 to know what all you need..



Step 2: Write The Code. 

Download the POV code and upload it onto your Arduino board. If you have trouble uploading be sure that nothing is connected to digital pins 0 and 1 and that you have selected the correct board and serial port under the Arduino/Tools menu.

Replace the words HELLO WORLD with any message in all caps with no punctuation. You can create your own characters and images by generating matrices of 1s and 0s.


Download code here: POV





Step 3: Making The Board.

A PCB can be made by many methods like UV etching, toner transfer method, using a CNC mill etc. We’ll be doing it with manually way because the circuit is so simple, and doesn't necessary to print it. it’s the only method which doesn’t require access to expensive equipment/materials.


1) Cut the perfboard, about 22 cm long and 4 cm wide


2) Draw the circuit line with permanent marker. 


3) Etching time! There are a lot of " How to Make PCB Etching" out there, so I won't explain again in this tutorial. 


4) Drill out the holes on perfboard with a drill and a small drill bit. Be careful when using a drill. 




Step 4: Making The Circuit On Breadboard. 

Let's build it on breadboard first. First, lets put the components on a breadboard so we could see how it worked and how to fit it onto the perfboard. 



Test the 20 LEDs to make sure they're shining bright. You don't want to pull out the LED after they're already attached on perfboard.




Step 5: Move to Perfboard.

1) Arrange the resistors. Each resistor is connected to an LED on one side and ground on the other. 


2) Bend one of the leads of each resistor so that they are touching each other and solder them all together in a row.


3) Arrange the LEDs. 

4) The cathode (-) of LED connect to resistor, and solder them together.


5) Solder the anode (+) of LED on perfboard. Clip the excess metal from the leads. Leave the last lead unclipped so that it can be attached to a wire later. 





Step 6: Wiring time!!

1) Attach wires to each of the LEDs on the perfboard. As you solder each connection, clip the excess lead off the end of the LED. 


2) Using shrink tubing is essential to prevent shorting.


3) Solder the end of each leads, together with male header (extension). Be careful when you soldering the wire and the header, make sure they didn't touch each other. This will be connect to Arduino. 



4) Strip both ends of a (preferably black) wire and connect the unclipped resistor lead, this is gonna be a ground. Solder it together. 





Step 7: The enclosure

1) Drawing the pattern on the lid with marker for placing the spicer for Arduino. It's really helps for drilling.



2) Be careful when you drilling the "Kitchen Ware" Box, because it made of plastic. It easy to melt if the drill get hot, but it's okay you can tidy it up by using a small cutter knife. Put the spicer 0.5 mm. 


3) Put the Arduino to fit with the lid.



4) Draw a pattern for on-off switch, a long hole for wires, a long hole for insert the perfboard, and 4 holes for nut & bolts. Use a small cutter knife to make a rectangular cut, still be careful.





Step 8: Put all together

1) Drill the perfboard to attach the nut. 


2) Arrange the switch and the battery.




3) Connect the battery and switch to Arduino.


4) Put together the POV perfboard and Arduino.


Pin connections:
Top of perfboard
1                            Digital Pin 13
2                            Digital Pin 12
3                            Digital Pin 11
4                            Digital Pin 10
5                            Digital Pin 9
6 
                           Digital Pin 8
7                            Digital Pin 7
8                            Digital Pin 6
9                            Digital Pin 5
10                          Digital Pin 4
11                          Digital Pin 3
12                          Digital Pin 2
13                          Digital Pin 1
14                          Digital Pin 0
15                          Analog Pin 5
16                          Analog Pin 4
17                          Analog Pin 3
18                          Analog Pin 2
19                          Analog Pin 1
20                          Analog Pin 0
Bottom of perfboard




Step 9: Put the circuit into enclosure.

1) Attach the PCB with nuts to the enclosure. 



2) Tidy up the wires by inserting them to second long hole. 



3) Attach the on-off switch to enclosure. 



4) Put the battery into the enclosure, and connect it to the switch. I'm using "Foam Double Side Tape Adhesive" to attach the battery.


5) Attach the wires to Arduino. And close the enclosure. 





Step 10: Finish!

You're just finish it right away. The enclosure it's make easier to hold and play it safely.


If you are too lazy to holding it all the time, you can choose the second option that I will give it to you. Just check out step 11 to make it spinning.



Step 11: All you need for making it spinning

This is a quick step to make your POV spinning. So here all you need :

- Platform from wood 
you can build it with your own way, for me I just bought it on the market, and it's originally was a cutting board

- 12V motor
I think it's the best choice, because you can run it from 3V to 12V, at 3 volts it only pulled about 20mA and it runs fairly slow, then you can tune your adapter to the speed as fast as you want, but I warned you 12V are fast enough to make your platform shaking like crazy.


- Pencil case from plastic 
I'm using an old pencil case. We're going to use just one side.


- I don't know how to name it or it's called, it's just a bended hard plastic. so we can stick it with the perfboard horizontally. 


Tools
- Drill
- Hot Glue Gun
- Cutter
- Foam double tape adhesive
- Gorilla glue
- Super glue




Step 12: Build the platform board

1) Drill the board. Customize the diameter to the size of the dynamo that you used. 



2) Drill the bended plastic 4 holes as the holes on the perfboard. 


3) As I said before, we're gonna use a one piece of the pencil case. Add a glue (gorilla glue) at the corner to attach the bended plastic. 


4) Soldering the wires to the leads of motor. Don't forget about the polarity. Then attach a little piece of board on the motor with super glue.



5) Put your motor in the hole. Add some gorilla glue onto the little piece of board to attach the pencil case later. 




6) Use a hot glue to attach the motor with the boards. Just to make sure it doesn't shaking when it's run.


7) Attach the pencil case onto motor. You should put on the middle. to keep it balanced. Attach the bended plastic onto the pencil case. And attach the battery with some tape adhesive. Attach the Arduino with some Foam double tape adhesive. 





Step 13: Assemble all parts and Finish it for the second time!!

Assemble all parts. Try the platform first. Give 3 or 4,5 volts from the adapter to make sure they spinning with balancing.



If it's all run okay, then congratulations you just finish the second way to play your POV. Yay!!

Arduino UNO R3 Hard LED Persistence of Vision pov project

 

  • Copyright © Arduino Tutorial ™ is a registered trademark.
    Designed by Templateism. Hosted on Blogger Templates.