Shop OBEX P1 Docs P2 Docs Learn Events
Converting 12V to 5V signals — Parallax Forums

Converting 12V to 5V signals

EvilMaroEvilMaro Posts: 27
edited 2007-05-31 14:27 in BASIC Stamp
Hi, recently i was given a working mechanism that runs on a 12v signal processor, the processor components were damaged and I was planning to use Basic Stamp 2 to replace it which·works with·on 5V signals. I would like to know if there is any suitable·way to convert the·signals from 12volts to 5volts?

Comments

  • metron9metron9 Posts: 1,100
    edited 2007-05-31 14:11
    How about a simple voltage divider?
    Use this calculator to find the resistors you need
    Example 12V input with a 470 ohm and 335.71 ohm divider gives you a 5V signal.

    Adjust the resistors for the current you need. The example above will give you 15ma signal the basic stamp can read.

    http://www.raltron.com/cust/tools/voltage_divider.asp

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • Mike GreenMike Green Posts: 23,101
    edited 2007-05-31 14:17
    Excellent idea. 330 ohm is the closest standard value for the 2nd resistor (so use 470 and 330 ohms). If the voltage could be higher than 12V, you may want a smaller resistor. 220 ohms will give enough voltage for the Stamp to "see" a logic high, yet won't produce a signal higher than 5V, even with a 14V input.

    Post Edited (Mike Green) : 5/31/2007 2:23:06 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-05-31 14:27
    Depending on the system I would probably recommend Optical Isolators or at least transistors to interface the two circuits. Even though this results in an inherent inversion of the signals the BASIC Stamp has an operator that can flip this back for all operations resulting in a seamless transition. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.