Shop OBEX P1 Docs P2 Docs Learn Events
Can the Proellor handle Negative volts?? — Parallax Forums

Can the Proellor handle Negative volts??

krazyideaskrazyideas Posts: 119
edited 2008-11-05 21:16 in Propeller 1
Hello

I am wanting to use the CTRA mode %11010 to measure a pulse from a light show that goes +5 volts -5 volts and I want to know if I can plug that stright into the propellor board or if I need to bring the volts down??· I know that anything above 1.6 volts it reads as high and anything below that it reads low, and that the propellor puts out·3.3 volts when a pin goes high.· But will it hurt it if it is fead +5 volts to read as high and -5 volts to read as low as the input for CounterA to read????

Also kinda a dumb question but what does the % infront of the mode you set for the logics do, like in %11010.

Anyway thanks so much

Comments

  • SRLMSRLM Posts: 5,045
    edited 2008-11-05 02:43
    You could use two I/O pins and two diodes to choke the voltage so that it doesn't drop below zero. If you do, then you'll have three states: really high, really low, and middle.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-11-05 02:52
    1) The "%" indicates that the number that follows is in binary.· Similarly, a "$" indicates that a hexadecimal number follows.

    2) You can potentially damage the Propeller chip if you connect a negative voltage to an I/O pin without some kind of current limiting resistor.· Similarly, you can damage the chip if you connect a positive voltage greater than 3.3V without some kind of current limiting resistor.· For voltages like +5V or -5V, a 1K resistor is adequate, but something more like 10K is better.· Use Ohm's law to see how much current is involved.
  • FrameShift.FrameShift. Posts: 35
    edited 2008-11-05 02:53
    the % prefix indicates the number that follows is in binary format.
  • krazyideaskrazyideas Posts: 119
    edited 2008-11-05 03:23
    Thanks guys That helped alot
  • PhilldapillPhilldapill Posts: 1,283
    edited 2008-11-05 04:00
    Just a side note, if you ever need to read the voltage when it is negative, you can use a summing amplifier(Opamp circuit) to bring that voltage range from +5 to -5, to +10 to 0, then use a voltage divider to scale it down. I had to do that for a project recently.
  • Beau SchwabeBeau Schwabe Posts: 6,562
    edited 2008-11-05 06:12
    krazyideas,

    Here is a resistor divider circuit that will convert (5V...0V...-5V) to (3.35V...1.65V...-55mV)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
    1049 x 731 - 118K
  • LeonLeon Posts: 7,620
    edited 2008-11-05 13:24
    Here is a more general version of Beau's circuit for converting a bipolar signal to a unipolar one:


    Leon
    converter.GIF

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle

    Post Edited (Leon) : 11/5/2008 1:35:52 PM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,562
    edited 2008-11-05 16:46
    Leon,

    That works if the Bi-Polar input is 5V and Vcc is 3.3V, the Uni-Polar output is 3.32V.· However·if the Bi-Polar input is·negative 5V and Vcc is 3.3V then the Uni-Polar output will be·negative 1.68V


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • LeonLeon Posts: 7,620
    edited 2008-11-05 17:18
    It's useful for input voltages between, say, -1.5V and +1.5V. The output will be +0.5V to 2.0V, with a 5V supply.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • LeonLeon Posts: 7,620
    edited 2008-11-05 17:21
    It's useful for input voltages between, say, -1.5V and +1.5V. The output will be +0.5V to 2.0V, with a 5V supply. It's often used with ADCs.

    Leon

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Amateur radio callsign: G1HSM
    Suzuki SV1000S motorcycle
  • Tracy AllenTracy Allen Posts: 6,662
    edited 2008-11-05 17:59
    Another option is an opto-isolator. Especially recommended if there is any reason to keep the "light show" power supply ground isolated from the Propeller ground.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-11-05 21:16
    The data sheet calls out a maximum of 500 microamps current if you are going to drive an input beyond the rails. I have a project where I'm detecting an input of +12V, and I'm using a 40K ohm resistor in series just to be safe. The input impedance is very high, so you can get away with a fairly high series value. Only thing you need to worry about is noise. Keep your resistor close to the propeller, perhaps with a small capacitor on the propeller pin too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"I have always wished that my computer would be as easy to use as my telephone.· My wish has come true.· I no longer know how to use my telephone."

    - Bjarne Stroustrup
Sign In or Register to comment.