Go Down

Topic: Driving 12V signal from 5V pin (Read 3439 times) previous topic - next topic

captncraig

I am attempting to make a shield to program my 64KB eeprom module (27SF512- datasheet at http://www.moates.net/zips/27SF512.pdf). I am using three 74HC595 chips to shift out the 16 bit address and the 8 data bits. All of the logic is fine at 5V, except part of the programming protocol requires me to set several pins on the eeprom to 12V.

I need to somehow convert the 5V signal from the arduino to a 12V signal to give the eeprom. I am pretty sure I can do this with a single transistor, but my circuit skills are a bit weak and I'm afraid I'm not sure how to connect it, which model I should use, or what kinds of resistors I will need.

Additionally, one of the address pins needs to be given 12V to initialize an erase operation. That pin is also connected to an output from one of my 595s. Do I need a diode or something to protect that pin from getting fried? Will that be enough, or do I need a more complicated circuit to ensure its not getting 5V and 12V at the same time? Not sure what will happen in that case.

I've attached my circuit as it stands now in eagle. The OE pin is not attatched to anything, and the A9 pin is only connected to the 595, not to the other 12V line that needs to be put in there. We can assume Vin will be a 12V supply, so that is easily accessible. Any tips would be greatly appreciated.

pwillard

There is a chip for that... like the MAX662 for example.

http://datasheets.maxim-ic.com/en/ds/MAX662A.pdf

captncraig

That feels like overkill. I already have a 12V signal from Vin. I just need a way to switch it to the eeprom based on a 5v pin. Yes, that should work, but isn't there a simpler way?

pwillard

#3
Jul 28, 2011, 11:44 pm Last Edit: Jul 28, 2011, 11:54 pm by pwillard Reason: 1
Hey fine me me.  I don't consider a chip that was designed to do specifically what you asked a bad recommendation or overkill.

Certainly you can use some transistor switching logic... the average cheapo PIC programmer had to solve this very problem as well... just look up some old PIC Programmer designs.

http://www.covingtoninnovations.com/noppp/

Personally, I'd prefer to use a chip I know will supply the flash with the correct voltage/current with tolerances regardless of Vin (being dependent on 5V Vcc).

Actually Maxim killed off that chip... replaced by MAX1822  If it were me... and I spend all that time cobbling up the 595's... I'm fer sher wanting to pay the $5 for the MAX1822 and keep it simpler

I was going to mention that these parts usually want 5-12  not 0-12 transitions on PGM pin, as mike says below.




Grumpy_Mike

It depends on what you want the signal to be when it is not 12V. If it is zero volts then a simple transistor will do as in the above link. However I have had eproms that required to switch between 5V and 12V. Which is it?

captncraig

It requires 5V to read the data, but for this application I really just want to program it, it is going to be used in an entirely different system. That being the case, I only need to switch between 12V and ground.

pwillard, I mainly didn't like the chip idea because I am working on a shield sized board, and it already has 4 rather large ICs on it, and the routing it pretty hairy already. I don't have much room to spare, and I doubt I can get two more DIP-8 components and all of the routing on without extending the board, which would not be the end of the world I suppose. After looking at the chip, its quite nice. I would not need to use a diode to protect my 595 because the chip would be in between.

Grumpy_Mike

Quote
It requires 5V to read the data, but for this application I really just want to program it, it is going to be used in an entirely different system. That being the case, I only need to switch between 12V and ground.

Most of the time a programmer reads back the data to verify what you put in has stuck.

pwillard

#7
Jul 29, 2011, 01:31 pm Last Edit: Jul 29, 2011, 01:47 pm by pwillard Reason: 1
Well, what you need can probably be done with as little as maybe a diodes, transistor,  and resistor.  Too much space?

HighSeraphim

If what you need to do is to simply switch 12VDC on and off using the 5VDC signal, here is a guide to using a transistor as a switch. This could also be done very simply (Although slightly less power efficient) with a 5VDC relay or more expensively with a solid state relay.

http://www.rason.org/Projects/transwit/transwit.htm

I recommend example 2. Switching the negative is simple and the transistors to do it are easier to find and cheaper.

Always Think!

captncraig

Wow. It seems like to do what I really want to, which I think is read and write, I'm gonna need a lot more than I initially thought. Since the eeprom data pins are input and output, I will need a SIPO shift register to write data, and a PISO shifter to read it back into the arduino. I will also need a gate of some kind so that the shift registers in opposite directions don't screw each other up.

Since both A9 and OE pins require 5V or 0V or 12V in different circumstances, I suspect that I will want a more complicated chip to manage that independently. Guess I'll start over on my schematic and see where it goes.

Grumpy_Mike

#10
Jul 29, 2011, 10:26 pm Last Edit: Jul 29, 2011, 10:28 pm by Grumpy_Mike Reason: 1
@HighSeraphim
Those circuits are unsuitable for delivering 12V, 5V and 0V to a pin, they are simply transistors driving a load to a fixed voltage.


Quote
I will also need a gate of some kind so that the shift registers in opposite directions don't screw each other up.

No you don't. All you need is an output enable line on the output shift register chip. This can be tied to the PROM output enable pin if it is the same way up or through an inverter if not.

HighSeraphim

@Grumpy Mike
Agreed. His question appears to be more complex than I originally thought that it was.
Always Think!

Go Up