Shop OBEX P1 Docs P2 Docs Learn Events
voltage level translation — Parallax Forums

voltage level translation

Pressus LimitedPressus Limited Posts: 23
edited 2010-07-08 01:48 in BASIC Stamp
Hi Guys,

a little bit off topic.... but I am using a BS2p40!

I need to translate the output voltage from a stamp pin (5V) to 3.3v providing a maximum current of 10mA.· What would be the easiest way of doing it?· I have been looking at using an translation IC but it seems overkill for what I need.

thanks

Jon

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2010-07-06 14:27
    There's a whole long "sticky" thread in the Propeller Forum under "Getting Started and Key Thread Index". Look under "Technical Considerations". A voltage translation IC is still best. Depending on the details of the 3.3V device, you may be able to get away with just a series resistor, but you can't assume that. If you're connecting a Stamp to a Propeller, you can use just a resistor. Some 3.3V devices are specifically designed to be able to connect directly to 5V devices. It all depends.
  • Pressus LimitedPressus Limited Posts: 23
    edited 2010-07-06 14:57
    Hi Mike,

    I've read that sticky thanks. The application I am working on will interface my machine with a BS2p40 to a large Xerox production printer which specifies it needs a absolute maximum of 4V @ 10ma to operate it's internal opto isolators.

    Would putting 2 diodes in series acheive the same result - each diode dropping about 0.7V?

    At the moment I only have a single 5V supply, so if I can avoid adding a 2nd one for 3.3V that would be good!

    thanks

    Jon
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-07-06 15:28
    Yes, but you'll need a current-limiting resistor too. Diodes by themselves don't limit current at all.

    Wait a minute -- opto-isolator unit?· It's possible (even likely) that your specification is that the internal LED's max-out at 4 volts with 10 milliamps.· In which case, as long as you drop the current with an in-line resistor, that could be all you'd need.

    Can you post the model number of this opto-isolator?· Because it sounds like you're trying to use the MAXIMUM specification as the TYPICAL use·value -- which usually breaks things.

    Post Edited (allanlane5) : 7/6/2010 3:33:51 PM GMT
  • Pressus LimitedPressus Limited Posts: 23
    edited 2010-07-06 16:25
    Hi Allan,

    Unfortunately, I don't have the model of the Opto as it's embedded in the printer, all I have is their interface specs. It does look like they already have a 100R resistor in series with the opto for current limiting though.

    details I have:

    Absolute Max rating:
    Vi -4V = Vi = + 4V
    Ii less than 30 mA, preferably 10mA

    Input Drive conditions (binary states):
    High (on) Ii = 3.4 mA @ Vi = 1.6V
    Low (off) Ii = 100uA @ Vi = 0.4V

    I thought to be safe I'll drop the voltage down to 3.3-3.6V, and limit the current to less than 10mA.

    what I was thinking was to use 2 diodes and a resistor in series:

    P0
    >|
    >|
    WWW
    >
    opto interface here
    0V
    <

    2 x In4148's and a 180R resistor which would take the voltage down to about 3.6-3.7V and the resistor would limit the current draw to about 10mA.

    Am I right in my thinking??????? Is there any risk in the components overheating with these values?

    thanks

    Jon
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-07-06 17:06
    Okay then, what's the PRINTER model number and manufacturer?

    The "input conditions" you've described sound a lot like "TTL" specifications -- which are intended to be run at "Vcc", aka 5 volts. What the "High (on)" number means is, any voltage above 1.6 volts will be sensed as a "1" by the circuit, any voltage below 0.4 sensed as a "zero". Any voltage in-between is "indeterminate", so don't leave the voltage there.

    By dropping your voltage to 3.3 volts, you're reducing the amount of noise isolation in the line -- something you don't want to do.

    Your equation "Vi - 4V = Vi = +4V" makes no sense to me at all.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-07-06 18:00
    The following circuit will drop the voltage by 1.2V or more and limit the current to 10mA:

    attachment.php?attachmentid=71691

    It's main limitation may be speed. But I doubt that you'll encounter data rates from the BASIC Stamp that it can't handle.

    -Phil
    393 x 100 - 1K
  • T ChapT Chap Posts: 4,223
    edited 2010-07-06 18:15
    Use a 4050 buffer, power the 4050 with 3v3, but it will take higher input voltages no problem and output 3v3. Same for getting converting 3v3 to 5volts out, power the 4050 with 5v, and run 3v3 devices into it, it will output 3v3.
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-07-06 19:59
    Yes, gentlemen, those ARE methods of providing 5 volt to 3.3 volt, and 3.3 volt to 5 volt transitions.

    But we haven't established that 5V to 3.3V conversion is really what the OP needs yet. Sure, HE thinks that's what he needs, but I strongly suspect he's misreading the interface specification.
  • Pressus LimitedPressus Limited Posts: 23
    edited 2010-07-06 20:08
    thanks for all your help guys,

    here's the page from the printer's interface manual.

    Jon
    2278 x 1840 - 376K
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-07-06 20:08
    Wait a minute, again -- you're interfacing a BS2p40 to a Xerox Production Printer? Isn't that like interfacing a wind-up rubber band balsa-wood plane to a jet turbine engine?

    What do you expect the Xerox Production Printer to print off of a BS2p40?

    And again, if you HAVE the printer's interface manual, clearly you could tell us the printer manufacturer (Xerox, I get that) and model number.

    Post Edited (allanlane5) : 7/6/2010 8:13:52 PM GMT
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-07-06 20:14
    Actually, mine is not a method to provide a 5V to 3.3V transition. It's a method of limiting current, which just happens to require at least a 1.2V overhead.

    Since the input is an optoisolator with (presumably) a 100R series resistor, we can compute from the V/I specs that the forward voltage of the LED is 1.26V. With an input of 4V (the max), the current would be 27mA (close to max), so that's consistent. For a 10mA current, the input voltage would have to be 2.26V. My circuit will work, but I'm guessing that a 270R series resistor would also do the trick.

    Do I need to show my math? smile.gif

    -Phil
  • Pressus LimitedPressus Limited Posts: 23
    edited 2010-07-06 20:17
    I make finishing machines for the back end of the printers, the BS2p40 is controlling my machine and needs to get commands from the printer and give status updates to the printer.

    my website is: www.pressus.co.uk

    I've used the basic stamps in virtually every machine I've designed over the last 10 years or so. I say virtually, as I dabbled with the Prop for 1 system that needed multipule processors.

    It's the 1st time i've linked to these big boy printers, so have to understand the 30 page interface manual!!!
  • Pressus LimitedPressus Limited Posts: 23
    edited 2010-07-06 20:21
    Allan,

    Xerox have 1 interface spec for all their printers I am lead to believe. having read the manual from front to back the page I posted above is the only bit covering the input specs.

    Jon
  • allanlane5allanlane5 Posts: 3,815
    edited 2010-07-07 15:32
    Very cool -- I've been all over the web, apparently you're implementing a "DFA" interface. I've been trying to find out what the recommended physical hardware is for this -- which is amazingly difficult to find. It's in the patents I assume, IF you've signed up to get the PDF of the patent WITH the diagrams. Surprising that they use +4 volts instead of the MUCH more common +5 volts -- but it looks like that is in fact what they do.

    It would be SO much easier to use a +5 volt solution, but you don't want to burn out an expensive DFA hardware board. From your diagram, it looks strongly like an in-line resistor would drop the current and voltage enough for it to work "outbound" from the BS2 to the DFA. Recieving signals by the BS2 FROM the DFA looks very straightforward.
  • Pressus LimitedPressus Limited Posts: 23
    edited 2010-07-07 15:46
    Good morning Allan,

    Exactly, I really don't want to destroy anything! The first time I will see the printer is when I plug my machine in at the customers site in mainland Europe. That's why I thought I would enlist the clever people on this forum. It seemed to me far too easy just to stick a resistor in the line!

    Thanks to all of your help and the suggestions from everybody else.....

    wish me luck!

    Jon
  • metron9metron9 Posts: 1,100
    edited 2010-07-07 19:55
    I did not see anyone suggest a 3.9V Zener in addition to the resistor to limit the voltage.

    Is not good idea?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Think Inside the box first and if that doesn't work..
    Re-arrange what's inside the box then...
    Think outside the BOX!
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2010-07-08 01:48
    There's no reason to limit the voltage. As long as you limit the current, the voltage will be self-limiting.

    -Phil
Sign In or Register to comment.