Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Forums > Electronic Projects Design/Ideas/Reviews


Electronic Projects Design/Ideas/Reviews Are you building an electronic project or want to? Maybe you need some assistance? Come and submit your electronic questions here and let our experienced members find a solution.

Reply
 
Tools
Old 25th October 2009, 08:47 PM   #1
Default converting TTL or CMOS to TTL

I have a uC project where different digital pulse signals will be patched into specific inputs (it is for a modular synth).

The inputs may be 0-5V but they also could be -12 to 12V. What would I do to make sure no matter what the voltage input is, it appears as a 0 or 5V pulse at the uC inputs?

My first instincts:
1. Use a resistor and 5V zener diode at the input

2. Use a a comparator with diode on the output so that it boosts any signal to 0/12V and then use a voltage divider to bring down to 5V
danjel is offline  
Old 25th October 2009, 08:59 PM   #2
Default

Use a comparator and clamp the output to 5V with a zener.
__________________
You don't need a quadraphonic Blaupunkt -- you need a curve
ball.
BrownOut is offline  
Old 25th October 2009, 09:06 PM   #3
Default

What MCU are you using? Many of them have internal clamp diodes. If you use a resistor to limit the current during the worst possible voltage scenario to within the clamp diode's limits then all you need is the limit resistor. There is an AVR appnote that does just this with a 1meg resistor to directly connect an I/O line to mains power for zero cross detection. Works great. I believe many PICs and other MCU's have these internal clamp diodes on many of the I/O lines. The one's on the AVR are rated at 1ma of current.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."

Last edited by Sceadwian; 25th October 2009 at 09:07 PM.
Sceadwian is offline  
Old 26th October 2009, 04:21 AM   #4
Default

I am using an Atmega328.

I figured I could use a single supply op amp (lm741) powered at 5V and as a comparator, that way any input results in a 5V output max and no negative voltage.

If this is going to a digital input on the atmega do I need anything else in that path? pull down resistor? current limiting resistor? diode?
danjel is offline  
Old 26th October 2009, 04:51 AM   #5
Default

Verify from your Atmega datasheet the clamping diodes exist on the exact pin that you're using (a couple pins don't have clamping diodes) then all you need is a current limit resistor, no other components passive or active are required. Typically the only pins that don't have clamping diodes on them are VCC/GND and reset. There may be other exceptions on specific AVR models which is why you should simply refer to the datasheet of your model, it's all in black and white.
__________________
"Because I be what I be. I would tell you what you want to know if I
could, mum, but I be a cat, and no cat anywhere ever gave anyone a
straight answer, har har."

Last edited by Sceadwian; 26th October 2009 at 04:54 AM.
Sceadwian is offline  
Old 26th October 2009, 04:23 PM   #6
Default

Quote:
Originally Posted by danjel View Post
I am using an Atmega328.

I figured I could use a single supply op amp (lm741) powered at 5V and as a comparator, that way any input results in a 5V output max and no negative voltage.

If this is going to a digital input on the atmega do I need anything else in that path? pull down resistor? current limiting resistor? diode?
The 741 should not be operated with input voltages that are higher than the supplied voltage. Most opamps should not be operated in this manner. Use a zener on the output instead, with a resistor to limit the current. Or use your resistor divider idea.
__________________
You don't need a quadraphonic Blaupunkt -- you need a curve
ball.
BrownOut is offline  
Old 27th October 2009, 04:58 AM   #7
Default

Quote:
Originally Posted by danjel View Post
I figured I could use a single supply op amp (lm741) powered at 5V and as a comparator
The LM741 is only characterized in the data sheet at 10V or greater between rails (+/-5V), and can only reliably respond to inputs greater than 3V from either rail. There are no valid inputs with a +5V only supply.
__________________
de KI6RWX
mneary is offline  
Reply

Tags
cmos, converting, ttl

Thread Tools
Display Modes


Similar
Title Starter Forum Replies Latest
TTL and CMOS LAU B Electronic Projects Design/Ideas/Reviews 4 14th June 2009 08:42 AM
Cmos To ttl Eng.Remon Micro Controllers 9 17th April 2007 09:41 PM
ttl and cmos families jovabiot Electronic Projects Design/Ideas/Reviews 6 6th August 2004 02:48 PM
TTL/CMOS hani_a General Electronics Chat 6 18th April 2004 06:48 PM
TTL and CMOS question. Eclipsed General Electronics Chat 2 8th March 2004 09:30 AM



All times are GMT. The time now is 10:00 PM.


Electronic Circuits  |  Learning Electronics
eXTReMe Tracker