electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Articles  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links  |  Store
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
 Forum index » DIY Hardware and Software » Developers' Corner
Protecting outputs of an ATMEL processor
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Author Message
Grumble



Joined: Nov 23, 2015
Posts: 706
Location: Netherlands
Audio files: 20

PostPosted: Mon Jan 02, 2017 4:50 am    Post subject: Protecting outputs of an ATMEL processor
Subject description: Amazing little buggers...
Reply with quote  Mark this post and the followings unread

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)
Back to top
View user's profile Send private message Visit poster's website
Grumble



Joined: Nov 23, 2015
Posts: 706
Location: Netherlands
Audio files: 20

PostPosted: Mon Jan 02, 2017 5:38 am    Post subject: Reply with quote  Mark this post and the followings unread

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
View user's profile Send private message Visit poster's website
PHOBoS



Joined: Jan 14, 2010
Posts: 3915
Location: Moon Base
Audio files: 579

PostPosted: Mon Jun 11, 2018 9:03 am    Post subject: Reply with quote  Mark this post and the followings unread

Thanks for testing and reporting the results, it's very useful. Very Happy
_________________
"My perf, it's full of holes!"
http://phobos.000space.com/
SoundCloud BandCamp Stickney Synthyards Captain Collider
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic Moderators: DrJustice
Page 1 of 1 [3 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Developers' Corner
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
e-m mkii

Please support our site. If you click through and buy from
our affiliate partners, we earn a small commission.


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use