![]() | ![]() | ![]() |
| |||||||
| 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. |
![]() |
| | Tools |
| | #1 |
|
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 | |
| |
| | #2 |
|
Use a comparator and clamp the output to 5V with a zener.
__________________ You don't need a quadraphonic Blaupunkt -- you need a curve ball. | |
| |
| | #3 |
|
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. | |
| |
| | #4 |
|
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? | |
| |
| | #5 |
|
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. | |
| |
| | #6 | |
| Quote:
__________________ You don't need a quadraphonic Blaupunkt -- you need a curve ball. | ||
| |
| | #7 | |
| Quote:
__________________ de KI6RWX | ||
| |
|
| 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 |