Shop OBEX P1 Docs P2 Docs Learn Events
Reversing the polarity of output signals — Parallax Forums

Reversing the polarity of output signals

BonanzaManBonanzaMan Posts: 17
edited 2012-04-22 09:20 in General Discussion
I am newish to electronics and microcontrollers. I am trying to re-create the following two signals using a Propeller based circuit (see osc.jpg).
osc.JPG

Note that these signals are shifted by 90 degrees, have a max voltage of -700 mV and min voltage of -2.01 V and have a frequency of 60 Hz. I have created a Propeller circuit that gives me the needed signals but with positive voltages peaking at 1.74 V (see parallax osc FREQ 242.jpg).
parallax osc FREQ 242.JPG

So, I need to reverse the polarity of the two output singnals.

Any ideas on how I can do this?

Many thanks.
977 x 547 - 112K
987 x 605 - 126K

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-10-10 10:45
    BonanzaMan,

    Welcome to the forum!

    What kind of current do your outputs need to be able to supply to their loads?

    -Phil
  • BonanzaManBonanzaMan Posts: 17
    edited 2011-10-10 10:48
    Minimal, application is an external time base for a clock.
  • BonanzaManBonanzaMan Posts: 17
    edited 2011-10-10 16:04
    Thanks for the welcome Phil - good to be here. Earlier reply was a quick one as I was overdue in a meeting. Thanks for your consideration all.
  • Mike GreenMike Green Posts: 23,101
    edited 2011-10-10 21:12
    The simplest way to do this is to use an optoisolator with the input running off the Propeller I/O pin. You'll need a current limiting resistor for the optoisolator's LED. The exact value depends on the optoisolator's specs, but 100 to 150 Ohms will give you an LED current around 10mA.

    You'll need a power supply of approximately -3.0V with the + terminal connected to ground. The optoisolator's NPN transistor should have its emitter connected to -3.0V and the collector connected through a 220 Ohm resistor to ground. The collector should be connected through a diode to your clock circuit to yield a voltage that goes from -0.7V to -2.0V. Different diodes have slightly different voltage drops and you can check the diode datasheets or measure the actual voltage drop across the diode until you get one that does what you need.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-10-10 22:27
    Here's another option:

    attachment.php?attachmentid=85829&d=1318310634

    Here's the output I got from it:

    attachment.php?attachmentid=85828&d=1318310634

    The yellow trace is the input from the Propeller; the cyan trace, the output.

    I supplied the -5V to the LM358 from an ICL7660 voltage inverter, driven from the Propeller Demo Board's +5V supply.

    -Phil
    640 x 480 - 13K
    273 x 306 - 2K
  • AleAle Posts: 2,363
    edited 2011-10-11 00:44
    For circuits not involving microcontrollers, I find PSpice (and for example Linear's version LTSpice from www.linear.com) very helpful. You draw a schematic and you simulate it for a definite amount of time while you measure current and voltages at any point.
    Phil's solution is not only easy but flexible, many op-amps can be used. At some point you will have to take into account the frequency because it will start to act as a low pass filter! (you can also simulate this behaviour). (Don't forget that nothing beats building the actual circuit and testing how it works!!).
  • BonanzaManBonanzaMan Posts: 17
    edited 2011-10-11 07:52
    Thank you very much Ale, Phil and Mike! Parts on order, I'll give both approaches shot and report back.

    Kindest regards,
    Greg
  • BonanzaManBonanzaMan Posts: 17
    edited 2012-04-22 09:20
    Phil - Finally getting back to this project. Ended up implementing the circuit as you suggested. Works GREAT. Thank you again so much. Sorry for the delay in getting back to you on this.

    Greg
Sign In or Register to comment.