Shop OBEX P1 Docs P2 Docs Learn Events
operating BS2 from a short distance away. — Parallax Forums

operating BS2 from a short distance away.

po2lepo2le Posts: 76
edited 2008-07-21 19:34 in BASIC Stamp
I would like to operate my BS2, which·is on a basic stamp homework board, from a short distance away.· The problem: the BS2's reset botton would be somewhat difficult to reach when I want to make it operate.·
I have noticed that the BS2 will start automaticaly when the 9v battery is reconnected, if it has been removed.· I was wondering if it would be a good thing to do to use a remote switch to put in series with the 9v battery so that I could turn the BS2 on and off with that switch.·

Also, could I use a 12v MC battery, and knock the 12v down to 9 by using a voltage divider or a 9v voltage regulator?· Or would that be a bad idea?

PO2L

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-20 20:07
    1) It's very easy to put a switch in series with the input power source for the Homework board to turn it on and off. The BS2 will start up automatically at the beginning of the program when the power is turned on. It does take a few milliseconds for the power levels to reach the point where the Stamp will start. For most applications, this won't be noticed. When you turn off the power, any variable values will be lost. It is possible to save values to otherwise unused areas of the EEPROM where the program is stored. Read the sections of the manual on the READ, WRITE, and DATA statements for a discussion of this.

    2) You could use a 12V power source. The regulator on the Homeword board is capable of handling this if there's not too much current drain from the circuitry attached to the regulator. It's mostly a matter of heat since the regulator has to dissipate any voltage above 5V at the current drain needed as heat and there's no significant heatsink. You'd have to use an adjustable regulator for 9V, but there are readily available 8V regulators (like the LM7808) which would work fine to knock the 12V down a notch. You can also buy switching regulators which are more efficient and often can be "dropped in" in place of a conventional linear regulator, but they're more expensive. It depends on how much current you need to draw. 12V - 8V = 4V. For currents on the order of 100mA, that's less than 1/2W that has to be dissipated in an LM7808 as heat. You shouldn't even need a heatsink for that although the regulator may get hot (a small heatsink would be nice).
  • po2lepo2le Posts: 76
    edited 2008-07-21 03:36
    In other words, I could use 6v (or 12) in place of the 9v battery on the Homework board. Or is the 9v necessary for proper operation of the BS2? I want to operate the parallax servo and two LED's, for short periods of time. I'm putting a styrafoam "head" on the backend of my bike that will twist side to side (SERVO), and the LED's will be flashing "eyes". My novelty for Sturgis Bike week. I figure that the 9v battery on the homework board will run down quickly during this operation, so I want of add more power capability to the ckt.
    So far the system works, its just getting it all put together, and on the bike.

    PO2L
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-21 03:54
    The HomeWork board works very nicely from a 6V power supply. I wouldn't run it off a 12V supply with the servo because of the high peak power requirement of the servo (up to 1A, with an average of perhaps 250mA when moving). Best to get a 4 x AA battery holder and use 4 alkaline AA batteries. RadioShack carries the battery holders and also carries 9V battery clips that can be used to connect the battery holder to the HomeWork board.

    When running off a 6V battery pack, you really want to connect the servo's power leads (red / black) to Vin and Vss, not Vdd and Vss. The HomeWork board's regulator is not really designed to supply a servo and will overheat. On the other hand, if you connect the servo to Vin and try to operate it off 9V, it will cause excessive wear on the servo motor's brushes. Servos are really not designed to operate on voltages in excess of about 7.2V.

    BE VERY CAREFUL!!! The RadioShack battery clips are designed to connect a circuit to a 9V battery, not take the place of a battery. The colors of the wires (red / black) are backwards for how you will be using it. Use a multimeter to check the polarity of the voltage at the battery clip and make sure it's correct to substitute for the 9V battery. If it's wrong, you can destroy your HomeWork board.
  • po2lepo2le Posts: 76
    edited 2008-07-21 16:30
    That's what I had planned, using a seperate 4 x AA(6V) battery setup as a seperate power source for the servo motor, but use the 9v battery for BS2 control. Or, since the homework bd. will work off of 6v, use another 4 x AA power pack for the homework control, because I will be running two LED's from the board.

    On the other hand, I think I can use one 4 x AA pack for both operations, or would that be too much for that 6v pack?
  • Mike GreenMike Green Posts: 23,101
    edited 2008-07-21 16:44
    Consider that the BoeBot uses a 4 x AA battery pack and has at least 2 servos (two for wheels and optionally a third for a PING))) sensor), 3 LEDs (2 IR LEDs for object avoidance sensing and a power-on indicator), maybe a PING))) as well. It'll run for a couple of hours.

    You can search the internet for the capacity of the batteries you're planning to use and the current drain of the servo, LEDs, Stamp module, etc. and figure out exactly how long the batteries should last. It's not hard. Energizer, for example, has datasheets on their batteries with discharge curves giving their life based on the rate of discharge. I don't know if Parallax has a datasheet on their servo, but several servo manufacturers have current drain information (idle, average, peak) for different sizes of servos. Parallax does have current drain information on their Stamps and the LED current depends on the series resistor. Usually that's less than 20mA.

    Post Edited (Mike Green) : 7/21/2008 4:52:27 PM GMT
  • po2lepo2le Posts: 76
    edited 2008-07-21 16:54
    Thank you, Mike.

    Pat
  • FranklinFranklin Posts: 4,747
    edited 2008-07-21 19:34
    You could also use a 4 X D cell pack to last longer

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
Sign In or Register to comment.