Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

12 - 5V converter - check it plz.

Status
Not open for further replies.

mstechca

New Member
Yesterday, I was figuring out how to make the perfect 12+ to 5V converter with the fewest parts possible. So far, this is my circuit configuration:

I use a 2N4401 NPN transistor, I connect the 12V to the NPN's base through a 2.2K resistor. I grounded the NPN's emitter, and the NPN's collector is connected to VCC through a 4.7K resistor.

I connected my DMM to the collector (of the NPN) and ground. It seems that the voltage levels are highly acceptable (4.7V when 12V is disconnected and < 1V when 12V is connected), but I am more concerned with the current levels.

In order for me to make this circuit successful, I need to adjust the resistors so that I can get a logic "1" and logic "0" coming from the collector. I also want every IC that is connected to the collector to take the signals as logic "1" and logic "0".

I want to eventually use the serial port to transfer data between the PC and the microcontroller. I could end up making my own modem.

What is the best current amount to use for a logic "0"?
and What is the best current amount to use for a logic "1"?

or better yet, what are the optimal resistor values?
 
The pull-up resistor value depend from logic IC family: for 74LS serie You can go up to 20..30k, but the CMOS-serie happy with 100k. (PIC-s also). For log.0 the 0,8..1V acceptable, most BJT-s cannot go lower.
 
Try drawing a circuit of what you mean, and explaining better what you actually want to do - I think you're over complicating what you need to do?.

If it's just to connect a PIC via RS232 to a PC without a MAX232?, it's easily done using just a single resistor - the BASIC Stamp does it that way.
 
when i check the logic levels on my computer 15 was 1 and 0.5 was 0
hope this helps
 
danielsmusic said:
don't jude me by old i am!
Daniel, do you mean to say "Don't judge me by how old I am!" ?
Did you notice that you left out a "g" and a "how"? I'm not picking on you - I just think you will get more respect if you clean up your signature.
 
Nigel Goodwin said:
If it's just to connect a PIC via RS232 to a PC without a MAX232?, it's easily done using just a single resistor - the BASIC Stamp does it that way.

Yes, except my uC is the AT89C2051, not a PIC.
What value does the resistor have to be?
I don't want to blow anything up in the process.
 
mstechca said:
Nigel Goodwin said:
If it's just to connect a PIC via RS232 to a PC without a MAX232?, it's easily done using just a single resistor - the BASIC Stamp does it that way.

Yes, except my uC is the AT89C2051, not a PIC.
What value does the resistor have to be?
I don't want to blow anything up in the process.

It relies on the protection diodes in a PIC, presumably Atmel processors have them as well?. All the resistor does is limit the current to a safe level (spec on the diodes should be in the datasheet), I seem to recall 22K is a common value for PIC's.

You should also be aware that a MAX232 inverts the data, and the processor is designed accordingly, so using a simple resistor means you can't use the hardware UART, but it's trivial to write a software one, which you can use inverted or not.
 
Atmel's datasheet doesn't whisper a single word about input protection diodes nor a safe amount of current for them. They just say to keep anything more than 0.5V above the supply voltage away from there. :(
 
audioguru said:
Atmel's datasheet doesn't whisper a single word about input protection diodes nor a safe amount of current for them. They just say to keep anything more than 0.5V above the supply voltage away from there. :(

Rather crude! - in that case add external diodes!.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top