Shop OBEX P1 Docs P2 Docs Learn Events
BS2 with 12V pickup — Parallax Forums

BS2 with 12V pickup

clayjayclayjay Posts: 11
edited 2009-09-04 21:14 in BASIC Stamp
I have an external 12V·that I want pulsein-P1 to accept.· What circuit (resistors, etc.) do I need to use to protect my BS2?· Thanks in advance.

Comments

  • $WMc%$WMc% Posts: 1,884
    edited 2009-08-31 00:30
    clayjay

    A little more info would help.

    You might be able to get away with a simple voltage divider. Do a google search, theres a ton of info on this.A long with the simple math.

    I would read the voltages from the pulses before I hooked it up to the Stamp. A 5 volt zener across the I/O pin would add some more protection along with a current limiting resister.

    ________________$WMc%______

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there············································ BoogerWoods, FL. USA
  • allanlane5allanlane5 Posts: 3,815
    edited 2009-08-31 02:00
    The BS2 input pins have 'clipping diodes' on them that will 'clip' +12 volts to an internal signal of 5 volts, if (and only if) you have a 22 Kohm resistor in series to drop the current the clipping diodes have to deal with.

    This is how the BS2 can recieve RS-232 signal levels (+/- 12 volts) with only a 22 Kohm resistor in series to drop the current.

    Without the 22 Kohm resistor, you'll put too much current through the clipping diodes and they'll fail.
  • clayjayclayjay Posts: 11
    edited 2009-08-31 16:57
    Ok, I've gat one end of a 22K resistor in pin one and the other on my 12V supply. I am trying to build a tach with the 12v supply off of one coil on the electronic ignition. I am getting random readings even before I hook up the 12v supply. Any ideas?

    Here is the code:

    Main:


    SEROUT TX, LcdBaud, [noparse][[/noparse]LcdBLoff, LcdOn1, LcdCls]

    COUNT Tach,1000,CoilCount

    SEROUT TX, LcdBaud, [noparse][[/noparse]DEC CoilCount]

    PAUSE 500

    Tach=0


    GOTO Main
    END
  • dev/nulldev/null Posts: 381
    edited 2009-08-31 17:13
    You get ranom readings because the pin is "floating". You should tie a 10K resistor from the pin to ground. This will ensure that the pin is LOW when your tach is not connected.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • dev/nulldev/null Posts: 381
    edited 2009-08-31 17:23
    Car batteries are scary monsters. I'd put a LM7805 to get voltage down to 5V, with a rectifier (1N4001) going from V+ to the input of the regulator. Do not use large cap values, as you will disrupt your COUNT.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Don't worry. Be happy
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-09-04 21:14
    Of course my advice for 12V (especially automotive) interfacing is to use an opto for the isolation. But even without that a transistor or MOSFET can be used to switch an input of a different voltage depending on the voltages on either side.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    50 72 6F 6A 65 63 74 20 53 69 74 65
    ·
Sign In or Register to comment.