Shop OBEX P1 Docs P2 Docs Learn Events
XBee and Servos on Quick Start — Parallax Forums

XBee and Servos on Quick Start

plau45plau45 Posts: 109
edited 2015-04-09 14:33 in Propeller 1
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

  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-04-08 16:54
    How you wire the servos will depend a lot on how you're powering the servos and the QuickStart.

    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
  • plau45plau45 Posts: 109
    edited 2015-04-08 18:57
    I plan on using a 9 volt battery to power the board and the servos if possible. I won't have the board connected to the computer. With the xbee though i wrote a simple code using some xbee libraries i found a while back and I wanted to use that for just sending a few variables to the qs from the activity board to power 2v servos and a dc 9-18 volt motor. I was wondering if you would just connect one end of the 9 volt to the VDD of the qs and the other to the ground. Also the xbee for the activity board is working great and transmitting the variable but the qsd xbee isn't receiving the variable and i don't even think it is on even when plugged into the 3.3v supply from the qs. I don't know if you could also help me with that.
  • plau45plau45 Posts: 109
    edited 2015-04-08 19:05
    Just incase you wanted to see the code here it is. I know its simple and unsophisticated but I'm new to this whole thing especial xbees.

    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
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-04-08 19:21
    plau45 wrote: »
    I was wondering if you would just connect one end of the 9 volt to the VDD of the qs and the other to the ground.

    I think the QuickStart can use 9V on the Vin pin.

    attachment.php?attachmentid=112879&d=1421787826

    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.
  • plau45plau45 Posts: 109
    edited 2015-04-08 19:34
    Ok thanks for that. I didn't know what to use for a power supply for the QS that was light enough to be used in a UAV. I have to make one and fly it around for about 4 minutes for a demonstration for my English class. I was going to use two joysticks for each of the wings. One controls the left and another the right and the motor would just be an on off switch. I was making this as a sort of proof of concept for me myself to prove I can do this so I'll stop getting side tracked by other projects and finish this one. So yeah what power source would you recommend that could get to me in a day or one that I could get from around my house?
  • plau45plau45 Posts: 109
    edited 2015-04-08 19:44
    Also when you said "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." were you just referring to the battery not able to power the servos or both the servo and QS? I was wondering if I could just use the 9 volt to power the board only.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-04-08 20:12
    plau45 wrote: »
    I was wondering if I could just use the 9 volt to power the board only.

    Yes a 9V battery should power just the QuickStart fine.
  • plau45plau45 Posts: 109
    edited 2015-04-08 20:17
    ok sweet thanks.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-04-08 20:18
    plau45 wrote: »
    Ok thanks for that. I didn't know what to use for a power supply for the QS that was light enough to be used in a UAV. I have to make one and fly it around for about 4 minutes for a demonstration for my English class. I was going to use two joysticks for each of the wings. One controls the left and another the right and the motor would just be an on off switch. I was making this as a sort of proof of concept for me myself to prove I can do this so I'll stop getting side tracked by other projects and finish this one. So yeah what power source would you recommend that could get to me in a day or one that I could get from around my house?

    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.
  • plau45plau45 Posts: 109
    edited 2015-04-08 20:25
    The motor takes 9-18 volts and the servos are Tower Pro Micro Servo gg SG90 servos they work at 5 volts just fine.
  • plau45plau45 Posts: 109
    edited 2015-04-08 20:29
    motor is DC.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2015-04-08 21:55
    plau45 wrote: »
    The motor takes 9-18 volts

    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.
  • GenetixGenetix Posts: 1,754
    edited 2015-04-09 10:08
    Here are connections to the QuickStart along with Spin code.
    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.
  • David CarrierDavid Carrier Posts: 294
    edited 2015-04-09 13:35
    The 3.3-volt regulator in the QuickStart will heat up by about 110° C for every watt of heat it dissipates, and it has a maximum operating internal temperature of 125° C. With a nine-volt battery input, the 3.3-volt regulator can output up to an average of 135 mA with a 40° C ambient temperature, 150 mA with a 30° C ambient temperature, and 165 mA with a 20° C ambient temperature. That is more than enough power for the QuickStart itself, but it may not be enough for an XBee module.

    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.
  • plau45plau45 Posts: 109
    edited 2015-04-09 14:30
    So use AAA batteries instead to power the boards? And I am just buying another activity board for the plane so I won't have to worry about the xbee getting power. The motor I have is just one from radioshack and doesn't give me the current it uses. It just says that the rpm is dependent on the current. I do have 2 brushless outrunners 1000 Kv motors and the GemFan 20 A ESC but I didn't know how to wire the ESC to the Outrunner and even then I don't have the preprogrammed unit.
  • GenetixGenetix Posts: 1,754
    edited 2015-04-09 14:33
    The 3.3-volt regulator in the QuickStart will heat up by about 110° C for every watt of heat it dissipates, and it has a maximum operating internal temperature of 125° C. With a nine-volt battery input, the 3.3-volt regulator can output up to an average of 135 mA with a 40° C ambient temperature, 150 mA with a 30° C ambient temperature, and 165 mA with a 20° C ambient temperature. That is more than enough power for the QuickStart itself, but it may not be enough for an XBee module.

    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.
Sign In or Register to comment.