Shop OBEX P1 Docs P2 Docs Learn Events
connecting servos to BS1 project board — Parallax Forums

connecting servos to BS1 project board

dmehlingdmehling Posts: 25
edited 2007-09-21 21:52 in BASIC Stamp
I am wanting to use the BS 1 project board to operate a small servo, but I'm not sure how I would hook it up. The documentation says it has the option for servo headers to connect a servo. Is this already on the board, or do I have to get something extra for this board?

Also I am wanting to power this through a car cigarette lighter. How do I connect an adapter for that to this project board? The link below is for the type of adapter I will be using.

http://www.brilliant-electronics.com/car_accessories_coby_ca709.htm

Comments

  • DgswanerDgswaner Posts: 795
    edited 2007-09-12 00:06
    take a look at this diagram www.parallax.com/dl/docs/prod/boards/BS1ProjectBoardDiagram2.pdf it doesn't show how it's connected but the area designated for servos all tie into individual i/o pins for the data connection for the servo. they also all have the provision to tie into an external power source The Project Board cannot power the servo(s). you'll need a 5v power source for that

    The project board documentations says it can handle 6-15V so the only thing you'll need is a way to provide the 5v required for the servos.

    good luck.

    Added: the yellow lines in the image cross the holes of the proto board, but they don't accurately connect to those holes they only connect to the i/o pin. I just showing the lines as reference to show the connection.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster

    Post Edited (Dgswaner) : 9/12/2007 12:18:48 AM GMT
    748 x 458 - 161K
    bs1.jpg 160.9K
  • dmehlingdmehling Posts: 25
    edited 2007-09-12 15:33
    Could you explain in a simpler way how to connect the servos and with more details? Are you saying that I need to just solder the wires of the servo to the place designated on the board for servos and then solder it to one of the inputs, the ground, and power?

    Also could you explain how to connect this to the power source? I know the board doesn't provide power; what I want to know is how do I connect it to a car adapter (like the one in the link I provided) so I can power it with the cigarette lighter of a car.
  • DgswanerDgswaner Posts: 795
    edited 2007-09-13 04:49
    What I was trying to say is that the board is already wired to control servos. No point to point wiring is required, connecting the servos will be really easy, the bigger issue is that you have 12V in from your battery. which is fine for the Project board but you need a 5V power Supply to run the servos. You will need to get a cigarette adapter that converts from 12-5V or use the room on the project board and make a power supply that will provide 5V

    Google "LM2805 power supply" and you should be able to easily find a power supply schematic. the cost for parts should only be a few $

    good luck

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster

    Post Edited (Dgswaner) : 9/13/2007 6:46:59 AM GMT
    481 x 350 - 86K
  • dmehlingdmehling Posts: 25
    edited 2007-09-13 18:16
    This is all still new to me so I am still not sure about what exactly you are saying. Does this project board not have a 5 V voltage regulator? I checked on the power supply you mentioned, and there is absolutely nothing on Google about this thing. Can you send me a direct link to where I can see this power supply? Also, you said it will be easy to connect the servos, but I still don't know how exactly to do that. Do I just connect the servo wires to the place designated on the project board as servo connection?
  • DgswanerDgswaner Posts: 795
    edited 2007-09-13 19:04
    connecting the servos, yes just hook the 3 wires from the servo to the board. The easiest way to do this is by soldering in pins like I have show in the image. typically the servo wire are red black and yellow, the Red is +5V the black is Ground and the Yellow is DATA, the data line connects to an I/O Pin on the stamp. Those connections are illustrated in the first image that I posted.

    No the board doesn't not have a 5v regulator to power the servos, you will definitely need to add a 5v power source. OK my bad it's actually LM7805. sorry about that. here is a link to a page this is a very simple version. www.iguanalabs.com/7805kit.htm
    this is a much better circuit but will be harder to make. www.electronics-lab.com/projects/power/025/

    if you still need help I'll see if I can take a picture of exactly what you are trying to do. but I Won't be able to do that until later tonight.

    here is a link to the pins for connecting the servo www.mouser.com/search/ProductDetail.aspx?R=517-6111TG

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • dmehlingdmehling Posts: 25
    edited 2007-09-14 17:19
    What you said is very helpful. This project is starting to make a little more sense. The concept is pretty clear to me, but I'm still a little fuzzy about the exact wiring, so I would greatly appreciate it if you could provide a picture of this as you had mentioned.
  • DgswanerDgswaner Posts: 795
    edited 2007-09-14 21:08
    sure thing! I'll have if for you tonight when I get home.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • dmehlingdmehling Posts: 25
    edited 2007-09-14 21:10
    Thanks.
  • D FaustD Faust Posts: 608
    edited 2007-09-14 22:07
    Don't you have to run more than 5 volts into the board(6 or so) so that the onboard regulator has enough headroom?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    LOOKDOWN ThisThread, [noparse][[/noparse]Your_?, My_?, Cool_Thing], looknum
    LOOKUP looknum, [noparse][[/noparse]1, 2, 3], subnum
    ON subnum GOTO Hope_this_helps, Thanks!, WOW!!
    END 
    
  • DgswanerDgswaner Posts: 795
    edited 2007-09-14 23:34
    It was my understanding that he was going to run the board from a 12v battery, the regulated 5v's is for the servos which would also be powered from the 12v battery.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • D FaustD Faust Posts: 608
    edited 2007-09-15 00:03
    I was just trying to clarify if you were regulating the power to the board or servos. Thanks

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    LOOKDOWN ThisThread, [noparse][[/noparse]Your_?, My_?, Cool_Thing], looknum
    LOOKUP looknum, [noparse][[/noparse]1, 2, 3], subnum
    ON subnum GOTO Hope_this_helps, Thanks!, WOW!!
    END 
    
  • DgswanerDgswaner Posts: 795
    edited 2007-09-15 04:54
    Ok here is the image of the BS1 as I've used it to connect a servo. Just as a side note, you will need to connect all of the grounds from your power supplies. if not your servos won't function properly, if at all.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
    424 x 342 - 68K
  • dmehlingdmehling Posts: 25
    edited 2007-09-17 21:52
    I have just a few more quick questions to make sure I connect this thing properly. Based on the instructions at Iguana Labs (http://www.iguanalabs.com/7805kit.htm) for the voltage regulator, I connect a lead from one of the Vdd pins on the BS 1 board to the input pin of the power supply, a lead from one of the VSS pins to the common pin, and then the output pin goes to the positive pin on the servo connector (or solder right adjacent to it)? Then I connect another lead from vss to the negative pin of the servo connector and then connect one of the input pins to the data pin on the servo connector? I also thought that since the article recommended it, I should connect the optional capacitor to reduce potential noise on the input supply line, but the instructions are very confusing for doing it. Can you simplify that explanation if that is something I really need to do?

    In studying the circuitry diagrams for this project, I have discovered a potential concern. I was going to use the QT113-D Touch Sensor (http://www.parallax.com/detail.asp?product_id=604-00038) to activate the program sequence for this project, and it of course needs a lead connected to one of the VSS pins. But if I understand correctly how to connect the voltage regulator and the servo, the two available VSS pins will be used. What can I do if I need a third lead connected to VSS? Or am I just misunderstanding something?

    Okay, I think this covers everything. Thanks again for that helpful picture.
  • DgswanerDgswaner Posts: 795
    edited 2007-09-17 23:45
    the project board cannot be the power source of the 5v power supply, that will need to connect directly to your battery (cigarette lighter).
    you need to connect the - (negative) side of the 5v power supply (the output) to VSS (ground) on the BS1 board. See the image, sorry it's a little crude.

    The project board has 2 VSS pins because that's all there was room to conveniently have. you can have as many things connect to VSS as you want. it's ground. you can even have everything connect to one VSS pins. so when you connect the QT113 connect it to VSS where ever is the most convenient for you.

    for the price of a capacitor, it's definitely worth putting in. if you look at the documentations for the project board it has a place to add a capacitor, if you run more than one or two servo I would add one there also.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
    22K
    BS1.jpg 22.1K
  • dmehlingdmehling Posts: 25
    edited 2007-09-18 18:05
    Okay, I'm finally starting to understand what you're saying about the power supply. However, when I compare what you have said with what I find in the documentation it seems to be somewhat different. The documentation states that this board has a 40 mA voltage regulator and that it can be powered with an AC adapter (6-15 V) or 9 V battery. So I would assume that any components such as sensors or servos that are connected to the vdd pin on the board would be powered by the board. Why would the board even have a vdd pin and built-in jacks/connectors for AC adapter or battery if the board could not power anything? Perhaps what you're telling me is that I have to do things differently since I am using a car adapter instead of an AC adapter. But I figured that the car adapter plug could go right into the jack intended for the AC adapter since it is also 2.1 mm and outputs between 6-12 V. Would that not work?

    Now, as for the very helpful drawing you provided, I have a few quick questions. Would the capacitor go between the output on the power supply and the VSS pin on the project board? And then am I supposed to connect the negative input (or is it called output?) of the servo to the VSS on the board and also the output pin of the power supply. And then on the car adapter, I see that I am supposed to connect power and ground to a place on the project board labeled input. Where is this input? It's not the jack for the AC power supply plug is it? And then I am also supposed to connect power and ground to the input pin of the power supply. The instructions for building the power supply say that I am supposed to connect the ground of the unregulated power supply (or car adapter) to the common pin on the power supply, but I don't see the common pin in your diagram.

    Anyways, I guess that's all the questions for the moment.
  • D FaustD Faust Posts: 608
    edited 2007-09-18 19:21
    The onboard 5V regulator can't supply enough amps (current) to power the servos. (By what I read)· If you had a 6V regulator, then you could power the board and run the servos off Vin.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    LOOKDOWN ThisThread, [noparse][[/noparse]Your_?, My_?, Cool_Thing], looknum
    LOOKUP looknum, [noparse][[/noparse]1, 2, 3], subnum
    ON subnum GOTO Hope_this_helps, Thanks!, WOW!!
    END 
    
  • dmehlingdmehling Posts: 25
    edited 2007-09-18 20:19
    Now that makes more sense. I was only thinking about voltage and not current. So the onboard regulator could supply enough current to power things like sensors, but not servos? Does that explain why in his diagram there is power and going to the power supply and also to the voltage regulator of the project board? Now if the car adapter I was planning on using has one plug, how do I connect it to two different inputs? Also, would the touch sensor I am wanting to use need to be connected to the 5 V regulator, or can I connect it to the project board voltage regulator?
  • D FaustD Faust Posts: 608
    edited 2007-09-18 20:29
    You could cut off the plug and run two wires of each wire to the appropriate places.· You could find the female version of the plug and run two wires off of that.· You could shave off some insulation (keeping the plug attached and attach·one wire to each of the exposed·wire, and connect them to the additional regulator.· Assuming that your touch sensor requires less than about 250mA you should be fine using the on-board regulator.· Hope this helps.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    LOOKDOWN ThisThread, [noparse][[/noparse]Your_?, My_?, Cool_Thing], looknum
    LOOKUP looknum, [noparse][[/noparse]1, 2, 3], subnum
    ON subnum GOTO Hope_this_helps, Thanks!, WOW!!
    END 
    
  • DgswanerDgswaner Posts: 795
    edited 2007-09-20 22:21
    sorry been busy sound like you were in good hands tho. the touch sensor can be powered directly from the project board... I've tried it. as far as the caps rather than try and describe it, if you look at the pdf online for the project board it indicated "cap" where it goes for the servo. additional caps could (and should) be added to the power supply, look at the second like I send about the power supplies it shows where to add them also.

    the power supply doesn't need to be build on the project board but there is room so why not.. but if it's easier to keep things straight build it separate. go with what suits your needs/ability and project.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • dmehlingdmehling Posts: 25
    edited 2007-09-21 21:52
    Now I need you to explain what a servo cap is. What is its function? Am I supposed to connect something to it? You also mentioned that additional caps can and should be added to the power supplies. How do I do this, and how many do I need for this project? Why do I need them? As you can see, I'm pretty confused about this.

    I ran across this exchange on another forum regarding a similar project, and someone recommended not using a voltage regulator because it would fry. Do you know what they are talking about, and is this something I should be concerned about? Below is what was said:



    Title: a few servo questions.
    Post by: kwanzi on August 18, 2007, 09:19:57 PM
    If the servo is connected to power but the signal wire is not connected, is it supposed to move? When I connect the servo to power, it twitches for a second. what does this mean? Also, if a servo is rated at 6 V max and the voltage I measured from the power source was found to be 6.22, is this significant enough to completely burn out the servo?

    One more thing. Can you see anything wrong with this: Using two relays connected to a microcontroller to act as signal switches, and connecting the signal wire of each servo to the output of each relay? And both servos are connected to the same power source.
    thanks....

    Title: Re: a few servo questions.
    Post by: Robotboy86 on August 19, 2007, 01:05:37 AM
    It shouldn't burn it out, if you are SUPER worried, you can build a very simply circuit.. power in, 6v power convertor, and power out. Will drop that probaly a SMALL amount

    Title: Re: a few servo questions.
    Post by: Admin on August 19, 2007, 08:51:22 AM
    Quote
    If the servo is connected to power but the signal wire is not connected, is it supposed to move? When I connect the servo to power, it twitches for a second. what does this mean?
    Sometimes electronic noise that appears like a normal signal can get to the signal line, causing random twitches. Dont worry about it.

    Quote
    Can you see anything wrong with this: Using two relays connected to a microcontroller to act as signal switches, and connecting the signal wire of each servo to the output of each relay? And both servos are connected to the same power source.
    Unneccessary. The servo signal line is low power, so you can hook that up directly to the microcontroller. For a typical DC motor however, then you would want to use a MOSFET, not a relay. A microcontroller cannot power a relay :P

    Title: Re: a few servo questions.
    Post by: kwanzi on August 19, 2007, 10:34:00 AM
    thanks for the feedback. But I had a problem when I connected the servos directly to the microcontroller. The servos were not giving the right amount of torque, so I measured the voltage as the servos were moving. The voltage dropped to about 3.5 V when they moved and then went back up to about 5 V when they weren't moving. I guess they weren't getting enough current...What's the best way to fix this?

    Title: Re: a few servo questions.
    Post by: kwanzi on August 19, 2007, 01:44:49 PM
    So if the MOSFET is the best solution to this problem, I was wondering why a relay doesn't work?

    Title: Re: a few servo questions.
    Post by: Admin on August 19, 2007, 05:14:07 PM
    Quote
    The servos were not giving the right amount of torque, so I measured the voltage as the servos were moving. The voltage dropped to about 3.5 V when they moved and then went back up to about 5 V when they weren't moving. I guess they weren't getting enough current...What's the best way to fix this?
    Quote
    Also, if a servo is rated at 6 V max and the voltage I measured from the power source was found to be 6.22, is this significant enough to completely burn out the servo?
    Im confused what your power supply is. What type of battery are you using? What is it's rated voltage? The problem you are having is that your power supply is not supplying power fast enough, causing drops during power drains.

    I recommend using either a NiMH or NiCad type battery, rated at 6V, and at least 1200mAh. Do not use a voltage regulator for this, it will fry.

    Quote
    So if the MOSFET is the best solution to this problem, I was wondering why a relay doesn't work?
    A relay is a high power switch. A MOSFET is a low power switch. A relay will require 100's of mA while a MOSFET requires .01's of mA. This is a very common confusion people have, so a quick search of the forum will give you more explanation.
Sign In or Register to comment.