XBee and Servos on Quick Start
plau45
Posts: 109
Sorry to be asking things like this on the forums but I'm short on time and need a wiring diagram or some sort of picture showing how to attach 2 servos running at least 5 volts or from the VIN and a XBee module connected to the board going through a standard XBee Adapter Board. Thank you for this if you guys help. It's a great help.
Comments
It's not a good idea to power servos from the QuickStart's Vin pin if the QS is powered by an USB cable.
A QS can be powered through the Vin pin from a 5V source (I think a range of voltages will work but I don't remember the exact values).
The servos need 5V on the center connection (usually red wire) and a ground connection (usually black wire but sometimes the ground line is brown). The Propeller's I/O pin needs to be connected to the servos' signal lines (white, yellow or orange). I generally don't use a resistor on this line.
If the servos and the QuickStart have separate power supplies, then the ground connections of the two supplies need to be connected together.
There's not really a single way of connection these things together. What I use often depends on what I have available. Sometimes it's helpful to use a breadboard in order to make these connections but sometimes I make a small PCB to make it easier to connect servos to a QuickStart.
I posted some of these techniques in the following thread:
http://forums.parallax.com/showthread.php/160137-Connecting-Servos-To-a-Propeller
This is for the QS which is connected to the computer via USB and displays the value of Y to show that it is receiving data.
Xbee Tester Side 2.c
This is for the Activity board which is powered via 9 volt battery in the barrel jack. It gets the state of the button plugged into P1 and while it is on it makes y = 10. If there is a mistake in there please point it out. I want to know what I did wrong. Thanks.
XBee Tester Side 1.c
I think the QuickStart can use 9V on the Vin pin.
The Vin pin is marked with red in the above diagram.
The QS does not have a 5V regulator. There isn't any power source for the servos on a QS when powered from a 9V battery.
Those rectangular 9V batteries are great for smoke detectors but not for robots or servos (or motors). They can't provide enough current to power servos well and often end up causing the microcontroller to reset. If you're using a 9V battery in a project make sure and tell us when asking for help.
I haven't used C much with the Propeller. I haven't looked at your code. Maybe someone else will take a look.
The QS's 3.3V regulator may have a hard time supplying a XBee with enough current. If you try powering the XBee from the QS, check the regulator's temperature every so often to make sure it's not getting too hot. The voltage regulator is the black rectangle just above the USB connector in the above diagram. It's a linear regulator and converts the voltage by dumping the extra power as heat. With a 9V supply it will likely get pretty hot if you pull a lot of current from it. My (wild) guess is it's good for 100mA or so.
Yes a 9V battery should power just the QuickStart fine.
What will the battery need to power? What kind of motors what kind of servos?
I have a UAV which is powered with a single cell 100mAh LiPo and another UAV which is powered with six 5Ah LiPo cells. Selecting a power supply for a UAV is not a trivial matter.
We really need to know how much current the motor draws in order to recommend a battery.
The motor also needs to appropriate for the application.
Being able to get things to fly under battery power is a relatively new achievement. It's only been made possible by improvements in motors and batteries. The selection of both motors and batteries is an important part of making a UAV.
http://learn.parallax.com/KickStart/900-00005
http://learn.parallax.com/KickStart/32440
This shows the Activity Board and uses C.
http://learn.parallax.com/propeller-c-simple-devices/standard-servo
http://learn.parallax.com/propeller-c-simple-protocols/full-duplex-serial
Page 5 has a good diagram of the QuickStart header and take note of the 2 pin header that was soldered just below pins 39 and 40.
https://www.parallax.com/sites/default/files/downloads/910-40000-DIY-Portable-Radio-Documentation.pdf
As Duane's diagram shows those 2 sets of pins do the same thing.
That DC motor will also require a driver or controller depending on what you want it do.
Most nine-volt batteries are a pack of six AAAA batteries, weighing about 6.5 grams each. Four AAA batteries only way about 39 grams, giving the application much longer life, with less weight, and reducing the heat dissipation from the 3.3-volt regulator enough that it can also power an XBee module, over the full temperature range.
— David Carrier
Parallax Inc.
I was wondering if 4 AAAs would do the job.