Shop OBEX P1 Docs P2 Docs Learn Events
"HIGH" Command not working — Parallax Forums

"HIGH" Command not working

ghost13ghost13 Posts: 133
edited 2007-06-28 14:14 in BASIC Stamp
I'm using the BS1. When I say
HIGH 7


pin7 only raises .3 volts (from .6 to .9)
Help please!

PS: code attached

Thanks!

Comments

  • FranklinFranklin Posts: 4,747
    edited 2007-06-03 23:37
    when you have the bs1 only connected to power and ground do you get the same results? Power for your other devices should not come from the same regulator powering the bs1.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • ghost13ghost13 Posts: 133
    edited 2007-06-04 01:20
    All my devices are powered by the BS1's 5V regulator.
    Is this a bad thing? My power source only plugs into the Stamp... nothing else...

    Thanks!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-04 02:43
    Ghost,

    You only have about 45mA of current available from that regulator not including current drawn from the I/O pins. If you exceed that the BS1 will not function properly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • ghost13ghost13 Posts: 133
    edited 2007-06-04 04:38
    I'm only powering a backlit LCD (the Parallax one) and an ADC.

    Should I turn off the backlight on my LCD?

    Thanks!
  • Mike GreenMike Green Posts: 23,101
    edited 2007-06-04 05:18
    You realistically cannot power much of anything from the 5V regulator output of any Stamp. Look at the datasheets for the ADC and the LCD and add up the maximum power requirement of each device. The Stamp itself will take 5-10ma. You may or may not be able to get by if you turn off the backlight. Again, figure it out for yourself. The data is available.
  • ghost13ghost13 Posts: 133
    edited 2007-06-04 06:17
    I'm not trying to trigger much... just a transistor's base. After turning off the backlight, the power starts at .1 volts and goes to 1 full volt. This still won't activate my base's transistor [noparse]:([/noparse] The datasheet for it is attached (I can't seem to find the minimum base voltage).

    Also, if the BS1 just doesn't have the power to do this, what can I do?

    If I get a separate 5V regulator and use that to power the LCD and ADC and pressure sensor, then would it work?

    Thanks!
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-04 13:53
    The on-board regulator provides ~45mA and the LCD w/Backlight requires ~100mA. You’re drawing more than double what the regulator can provide.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • Mike GreenMike Green Posts: 23,101
    edited 2007-06-04 16:14
    You have to have a separate 5V power supply (with its ground connected to the ground for everything else) for the LCD. Depending on the power requirements of the ADC and pressure sensor, you might be able to power them from the Stamp, but you might as well power them from the separate regulator. Be sure to follow the manufacturer's recommendations for bypass / filter capacitors for the regulator and put a 0.1uF capacitor across the 5V supply at the ADC and at the sensor (a good general rule). The Stamp and the LCD would already have additional filter capacitors.
  • ghost13ghost13 Posts: 133
    edited 2007-06-04 21:36
    Why filtering caps??
    I'm not using an important signal (like ADC output) - just 5V.


    What are the filters used for?

    Thanks!

    Also, how would the caps be hooked up? Between ground and vout? or just on vOut?
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-06-05 14:22
    Digital circuitry has lots of 'switching' transients, when lots of internal transistors all change state at the same time. This requires a 'pulse' of current from the power lines.

    It turns out, a .1 uF capacitor, from Vdd to Vss, physically close to each chip will handle this short 'pulse' need of current, and prevent a 'spike' of noise from appearing on the voltage supply line. That, and a 10 uF capacitor between the Vdd/Vss lines close to where power enters the board, is usually enough to 'filter' these transients.

    Digital circuitry, to work correctly, requires a stable source of +5 and ground. Without these 'filter caps', noise spikes on the +5 line can cause 'false-triggering' of various circuits, leading to unreliable operation.
  • ghost13ghost13 Posts: 133
    edited 2007-06-07 20:04
    OK... I took away the LCD and replaced it with a beeper (and altered the code). It wasn't working, so I tried to run this program:
    ' {$STAMP BS1}
    ' {$PBASIC 1.0}
    
    Main:
      HIGH 3
      GOTO Main
    



    It doesn't work. I turn it on, it beeps for about 2 seconds, and goes (and stays off). The next time I turn it on, it only beeps for .5 seconds. Then, the third time, it doesn't beep at all [noparse]:([/noparse]

    Help please!

    Thanks

    PS: I'm using the BS1 and its regulator - I didn't add my own 5V regulator

    Post Edited (ghost13) : 6/7/2007 8:17:13 PM GMT
  • allanlane5allanlane5 Posts: 3,815
    edited 2007-06-07 20:47
    Beepers are not known for low current needs either. Now, if it was a Piezo-electric speaker, going 'high 3' would make it go 'click'.

    Get a multi-meter. Use it.
  • ghost13ghost13 Posts: 133
    edited 2007-06-07 21:03
    It is this:
    www.allelectronics.com/cgi-bin/item/SBZ-413/115/3-16_VDC_PIEZO_BEEPER_.html

    It says it take 7ma. The BS1 provides 45ma. 45-7 = 38ma. There should be 38ma left over while it is buzzing!

    At minimum, it requires less ma than the LCD. And the LCD lit up. So the buzzer should buzz... right?

    Thanks!
  • ghost13ghost13 Posts: 133
    edited 2007-06-07 22:16
    Even this code only beeps one time (not the twice it is supposed to):
    ' {$STAMP BS1}
    ' {$PBASIC 1.0}
    
    Main:
      HIGH 3
      PAUSE 250
      LOW 3
      PAUSE 2000                          ' give the user 15 seconds to put the altimeter in the rocket
      HIGH 3
      PAUSE 250
      LOW 3
      GOTO Main
    



    Thanks for your help!

    Also, I used my multimeter, and for the BS1's PIN3 only oes to about 3 volts for a couple seconds, then drops to zero (not for the above code... for this code[noparse]:)[/noparse].
    Main:
      HIGH 3
      GOTO Main
    



    Thanks!

    Post Edited (ghost13) : 6/7/2007 10:23:53 PM GMT
  • metron9metron9 Posts: 1,100
    edited 2007-06-07 22:55
    With Nothing attached to the BS1
    Do you have 5V reading on your Vdd?
    If not, is your battery ok?

    If your vdd is +5V Do you get 5V reading on any pin when using the HIGH command?

    If not then I think your BS1 is broken. What else could it be?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • ghost13ghost13 Posts: 133
    edited 2007-06-07 23:07
    Battery reads 7.07 volts and it is hooked up correctly to the BS1. Vdd reads 2.55 volts (uh oh). The HIGH command makes the pin go up to 2.5 volts (double uh oh).

    Is the Stamp broken? If so, what is the warranty? It is brand-new and there is no way I damaged it [noparse]:([/noparse]

    Thanks
  • metron9metron9 Posts: 1,100
    edited 2007-06-07 23:28
    So for 4 days you have been exploring all kinds of things. Just go to the basics when you have a problem. Now if your battery is 7.07 and the BS1 Vdd is 2.5V then you would think the regulator is not working. (assuming you used VSS as the ground to reference the vdd)

    So why won't the regulator work, either it's broken or...

    Is this a 9V battery? if so 7V is just about the very end of the current available. You may measure 7V but have not enough current.

    Use a fresh 9V battery and your problem is solved. (I hope)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • ghost13ghost13 Posts: 133
    edited 2007-06-07 23:54
    It is a 9V battery. I'll try a new one. Thanks!
  • ghost13ghost13 Posts: 133
    edited 2007-06-08 20:01
    OK... I tested the battery (a new 9V... reading was 9.5V) and the Vdd was still only like 2.8. When I first turned it on, it worked (just the beeping code). Then, when I tried it again, it didn't work. I think the buzzer needs 3V to work, so the 2.8 is only sometimes triggering it [noparse]:([/noparse]
    Is my BS1 dead? If so, at least it still is under warranty [noparse]:)[/noparse]

    EDIT: It somehow seems that my BS1 is fine, and I'm drawing too much current.
    I know I need to use a voltage regulator. Is this how I should hook it up (see attached schematics)?

    Altimeter1.bmp (first image) is what I have connected now. The VDD still only gives 2.8V
    Altimeter2.bmp (second image) bypasses the VDD pin. It isn't used at all. Is this the way to go???


    Thanks!

    Post Edited (ghost13) : 6/8/2007 8:54:08 PM GMT
  • ghost13ghost13 Posts: 133
    edited 2007-06-08 21:03
    Forgot to attach idea.gifrolleyes.gifshocked.gif

    Sorry about not editing the original post eyes.gifsad.gif

    Post Edited (ghost13) : 6/8/2007 9:47:25 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-06-08 21:35
    ghost13 said...
    Forgot to attach
    Ghost, you can attach by editing your original message.· You don't need to post a new message to attach.· Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2007-06-08 22:55
    High ghost, your schematic does'nt look right to me. Put a jumper in from the battery positive to the regulator 9v connection and take some more voltage measurements.

    Jeff T.
  • ghost13ghost13 Posts: 133
    edited 2007-06-08 23:12
    My regulator (not the BS1 one) emits 5V.

    EDIT: I hooked it up the 2nd way, and now it works... except my sensor isn't reading confused.gif
    The Vout pin of the sensor starts at 3.5 volts and gradually drops to 2V in about 10 seconds confused.gif
    I'm using a pressure sensor and the pressure isn't changing mad.gifshakehead.gif

    Post Edited (ghost13) : 6/9/2007 1:03:19 AM GMT
  • pwillardpwillard Posts: 321
    edited 2007-06-28 14:14
    You know, as a general rule... if you have a 5V regulated power source available in· your design·you should really just tell yourself that Vin pin on the Stamp doesn't exist. You should apply the 5V source·*to*·the Vdd Pin to power the Stamp and not think of it as a power source.

    Also, NPN transistors·perform better if the Emitter is passing·current·from the·more negative source when asked to conduct·and·not from V+.·I'm seeing in the drawing that you have an NPN Emitter attached to the Battery and expect it to conduct like a switch when the base is turned positive to conduct.· It won't conduct itself·much like a switch if the Emitter and the Base are at the same potential.
Sign In or Register to comment.