|
|
| Author |
Message |
FFMan
Joined: 09 Jan 2010
Posts: 264
|
|
Posted: 04 June 2010, 21:34 PM Post subject: Best way to reduce a 12v pulse for input to a 328 |
|
|
Accidentally blew a 328n as i forgot the output from my magnetic sensor was at the supply voltage of 12v - oops
so whats the best way of simply making the 12v inout OK for the 328 - can i simply use a series resistor or should i use a resistor divider ?
Simple is good here as space is very limited !
|
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2593
Location: Portland, OR
|
|
Posted: 04 June 2010, 21:46 PM Post subject: Re: Best way to reduce a 12v pulse for input to a 328 |
|
|
| FFMan wrote: | | can i simply use a series resistor or should i use a resistor divider ? | A series resistor will work in a pinch since the AVR chip has clamping diodes on all inputs. You compute the size of the resistor so as to limit the current to 10mA or less, e.g. (12V-5V)/10mA =700. A 1K resistor would be fine.
A better solution, I think is to add your own external clamping diodes or a transistor and two resistors. The latter solution will give you an inversion, of course.
|
|
| Back to top |
|
 |
FFMan
Joined: 09 Jan 2010
Posts: 264
|
|
Posted: 04 June 2010, 21:52 PM Post subject: |
|
|
electronics not my strong point - when you say clamping diodes to you mean a 5v zener ?
just experimenting with a resister divider - is this not a good plan ?
trying to get it working for a race weekend starting tomorrow - reed switch based mag pickup proved unstable with engine vibration
|
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2593
Location: Portland, OR
|
|
Posted: 04 June 2010, 22:24 PM Post subject: |
|
|
| FFMan wrote: | | electronics not my strong point - when you say clamping diodes to you mean a 5v zener ? | No. A clamping diode serves to limit the excursion of a signal to a fixed voltage level, i.e. it "clamps" the voltage level. Consider the image below, excerpted from AN213 External Device Interfacing. If the input signal rises above about 5.6 volts (assuming a typical silicon diode) the input to the ZX will be clamped at the 5.6V level with the resistor dropping the remaining voltage. A similar thing happens when the signal tries to go negative.
You can use Schottky diodes for clamping purposes as well. The advantage of this type of diode is that it has a smaller forward voltage drop, on the order of 0.3V compared to 0.6V for a small signal silicon diode.
| Description: |
|
| Filesize: |
12.47 KB |
| Viewed: |
3224 Time(s) |

|
|
|
| Back to top |
|
 |
|