Arduino RFID SERVO project | servo external power supply problems. SCIENCEFAIRPROJECT
johnone
Posts: 9
Hello!
Me and a few friends are hoping to participate in the googlesciencefair competition.
We are creating a waste sorting machine and everything finally works, except for the servo.
Our "product" is pretty simple. When an RFID tag is read by the Parallax RFID R/W module, the servo is supposted to go left and back to starting position If it reads the first tag. If it reads the other tag, it is supposted to go right and back to starting position.
The product is also supposed to write a "2" or "1" using the serial port depending on which tag it reads, but that is not really relevant.
Everything finally works except for the servo. Both the parallax RFID R/W module and the servo needs 5 v, so i hooked the servo up to 4*1,5 v batteries, and connected the battery - (minus pole) to the servo and arduino GROUND.
Here's a schematic i draw(them pretty colors):
But the servo only moves when it reads tag 1. It also does not move to 180 degress and back to 90, but from 180 to 0. I have no idea what's wrong.
Here is the code btw.(Know it is sort of messy and reading x4 is retarded, but it works ):
http://pastebin.com/2ZfsRhzf
Any help is very appreciated.
Me and a few friends are hoping to participate in the googlesciencefair competition.
We are creating a waste sorting machine and everything finally works, except for the servo.
Our "product" is pretty simple. When an RFID tag is read by the Parallax RFID R/W module, the servo is supposted to go left and back to starting position If it reads the first tag. If it reads the other tag, it is supposted to go right and back to starting position.
The product is also supposed to write a "2" or "1" using the serial port depending on which tag it reads, but that is not really relevant.
Everything finally works except for the servo. Both the parallax RFID R/W module and the servo needs 5 v, so i hooked the servo up to 4*1,5 v batteries, and connected the battery - (minus pole) to the servo and arduino GROUND.
Here's a schematic i draw(them pretty colors):
But the servo only moves when it reads tag 1. It also does not move to 180 degress and back to 90, but from 180 to 0. I have no idea what's wrong.
Here is the code btw.(Know it is sort of messy and reading x4 is retarded, but it works ):
http://pastebin.com/2ZfsRhzf
Any help is very appreciated.
Comments
You'll want to make sure that everything has a common ground. (connect the negative side of the servo battary, RFID, servo, AND Arduino and anything else together) Having a common ground gives everying a common electrical reference point. You'll want to update your drawing to show that and the USB power. If you don't have a common ground things won't work.
Edit: Looking at your drawing again it looks like everthing has a common ground. I didn't see one of the wires connecting midway. Opps.