Author Topic: Quick AVR question  (Read 2089 times)

0 Members and 1 Guest are viewing this topic.

Offline TrickyNekroTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,207
  • Helpful? 15
  • 1.6L Peugeot 307 tuner
Quick AVR question
« 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
For whom the interrupts toll...


P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Quick AVR question
« Reply #1 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.

Offline TrickyNekroTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,207
  • Helpful? 15
  • 1.6L Peugeot 307 tuner
Re: Quick AVR question
« Reply #2 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
For whom the interrupts toll...


P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

Offline dunk

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 1,086
  • Helpful? 21
Re: Quick AVR question
« Reply #3 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


dunk.

Offline TrickyNekroTopic starter

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 1,207
  • Helpful? 15
  • 1.6L Peugeot 307 tuner
Re: Quick AVR question
« Reply #4 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 :)
For whom the interrupts toll...


P.S. I've been inactive for almost a year... Don't give promises but I'll try to complete my tutorials. I'll let you know when..

Cheers!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,663
  • Helpful? 169
    • Society of Robots
Re: Quick AVR question
« Reply #5 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.

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,430
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
Re: Quick AVR question
« Reply #6 on: January 14, 2009, 11:20:18 AM »
maybe sharing a schematic would help

 


Get Your Ad Here