Author |
Message |
Grumble

Joined: Nov 23, 2015 Posts: 1310 Location: Netherlands
Audio files: 30
|
Posted: Mon Jan 02, 2017 4:50 am Post subject:
Protecting in-outputs of an ATMEL processor Subject description: Amazing little buggers... |
 |
|
MIND YOU! I take NO responsibilities whatsoever when the Atmel processors are used outside their suggested voltages as stated in their datasheets provided by ATMEL!!
I had a discussion about protecting the outputs of an ATMEL processor chip, and I know they are protected, but how well are they protected?
Ok, so I did some tests this morning, using this program:
#define F_CPU 9600000L
#include <avr>
#include <util>
int main(void)
{
DDRB |= (1<<PB3);
while(1)
{
_delay_ms(1);
PORTB ^= (1<<PB3);
}
}
and a minimum components diagram, using an Attiny13 with a resistor of 22k going from reset to Vcc, a 100nF capacitor between VCC and GND and a resistor of 1k connected to PB3.
I applied a voltage to the current limiting resistor of 1k and measured voltages directly at PB3.
This is what I found:
Applying +15 volt to 1k is no problem, the voltages at PB3 are between +0.5volt and +5.5 volt (measured it with a Rigol scope, so not to accurate...
Applying -15 volt to 1k is also not a problem, the output voltages are from -0.5 to +4.5 volt, so still ok.
I even tried the maximum voltage possible with my power source (being 35 volts) and this sturdy little bugger even survived that!
I think not for long (well at least several minutes) but the current into the processor might give troubles in the long run (about 30 mA, and they do get hot after some time..)
Anyway, what this proves is that the output of an Atmel processor is well protected and as long as there is a resistor in series with the possible dangerous voltage, these processors can take a punch!
I was afraid that the processor might die when the VCC was removed, but even powering the ATtiny with a square wave of 0.6Hz and the 1k connected to -35 volt was no problem (at least not for a couple of minutes) Last edited by Grumble on Sat Dec 01, 2018 11:42 am; edited 1 time in total |
|
Back to top
|
|
 |
Grumble

Joined: Nov 23, 2015 Posts: 1310 Location: Netherlands
Audio files: 30
|
Posted: Mon Jan 02, 2017 5:38 am Post subject:
|
 |
|
MIND YOU! I take NO responsibilities whatsoever when the Atmel processors are used outside their suggested voltages as stated in their datasheets provided by ATMEL!!
Next thing was: testing the inputs of an Attiny13.
Using This program:
#define F_CPU 9600000L
#include <avr>
#include <util>
int main(void)
{
DDRB |= (1<<PB4);
uint8_t n;
while(1)
{
if (PINB & (1<<PB3))
PORTB |= (1<<PB4);
else
PORTB &= ~(1<<PB4);
}
}
What it does is, its reading the digital value of PB3 (being one or zero) and outputting this to PB4.
This time the input of PB3 has a resistor of 1k for protection.
I'm using a pulse generator (HP8111A) for signal source, set at approx. 300Hz.
When the output voltage of this generator is between 0 and +5 volt, the PB4 pin will show almost the same voltage at the same time, there is a little time lost reading, shifting and writing which can be observed as some jitter.
A square wave of 300Hz, going from +17 volt to -17 volt is no problem with this configuration.
The output is still the same (pulse width wise)
Even ~350kHz comes thru but with a lot of jitter, I run this Attiny13 with its internal oscillator of ~9MHz. |
|
Back to top
|
|
 |
PHOBoS

Joined: Jan 14, 2010 Posts: 5792 Location: Moon Base
Audio files: 709
|
|
Back to top
|
|
 |
MapacheRaper

Joined: Feb 15, 2018 Posts: 166 Location: Spain
|
Posted: Sat Dec 01, 2018 7:50 am Post subject:
|
 |
|
Yeah, really insteresting. Probably this explains why, to my knowledge, noone has still moan about blowing his arduinos.
Thanks!! |
|
Back to top
|
|
 |
|