Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: TrickyNekro on January 11, 2009, 05:35:42 AM

Title: Quick AVR question
Post by: TrickyNekro on January 11, 2009, 05:35:42 AM
Hello again...

If I connect a pin (I/O) of my ATMEGA8 at 13V via a 1MOhm
resistor will things go puff or I'm ok???


Thanks in Advance,
Lefteris, Greece
Title: Re: Quick AVR question
Post by: dunk on January 11, 2009, 06:04:55 AM
i don't know to be honest. you would need to check the datasheet for the AVR I/O pins maximum current sink and resistance and calculate the minimum value of resistor needed.

the correct way to do this is to use a voltage divider. far less complicated to work out but one more resister in the circuit.


dunk.
Title: Re: Quick AVR question
Post by: TrickyNekro on January 11, 2009, 07:39:28 AM
It's in a place I really can't use a divider...
I want to witch a MOSFET... and if I place a resistor to ground it turns on... and that's not good...
I'm trying out the op amp buffer right now....
I'm hell confused over this circuit...
I'm trying to make a kill switch with a mosfet gate...
One switch power up the circuit until microcontroller starts and opens the mosfet gate....
Maybe I'm having a wrong approach...
Maybe..... Darn I think I figured out the way!!!
I know it's silly... But sometimes you just don't act right!!!

Thanks for the answer!!! And thanks for the inspiration that post gave me!!! really!!!

Best Regards, Lefteris
Greece
Title: Re: Quick AVR question
Post by: dunk on January 11, 2009, 11:40:07 AM
Quote
I want to witch a MOSFET...
ah. 2 suggestions:
1. get a MOSFET driver. there are special drivers for driving MOSFETs from TTL logic levels.
2. get a TTL triggered MOSFET. maybe this one: http://www.fairchildsemi.com/ds/RF/RFP30N06LE.pdf (http://www.fairchildsemi.com/ds/RF/RFP30N06LE.pdf)


dunk.
Title: Re: Quick AVR question
Post by: TrickyNekro on January 11, 2009, 05:26:35 PM
I had problems cause I wanted exasperated grounds and that...
Really messy things....

Thanks a lot for the advice! It seems that the IRF540 fully responds to the TTL levels with no problems.
The gate input for high is somewhere near 4V - 5V to 20V if I'm right...
So 5V is of TTL level...

I can do the trick with a op amp if I have a so serious problem...

Thanks for the interest and replies!
Best Regards,
Lefteris, Greece :)
Title: Re: Quick AVR question
Post by: Admin on January 14, 2009, 11:04:38 AM
Quote
If I connect a pin (I/O) of my ATMEGA8 at 13V via a 1MOhm
I don't quite understand your question, but the typical AVR will fry above 5.5V.
Title: Re: Quick AVR question
Post by: pomprocker on January 14, 2009, 11:20:18 AM
maybe sharing a schematic would help