Go Down

Topic: arduino reset itself with 555 timer (Read 10082 times) previous topic - next topic

phinsil6

Hi, I am trying to reboot the arduino with a 555 timer set up as a monostable trigger and an inverter.  Inserted is an image of my drawn circuit, sorry if it's kinda messy  :).  So basically, I start the program writing the output port high, then when I want to reboot the device, I write the port to LOW and thus triggering the monostable 555 timer.  However, whenever I do so, the output goes haywire and and the arduino never starts back up again.  Why is this happening, can anyone help?
http://i462.photobucket.com/albums/qq345/phinsil6/arduino-reset.png

Thanks

Graynomad

#1
Jan 23, 2011, 10:06 am Last Edit: Jan 23, 2011, 10:12 am by graynomad Reason: 1
When the uC resets the IO line goes into a hi-Z state meaning pin 2 of the 555 is floating.

I suspect that it is constantly retriggering.

Try a pullup resister on pin 2, and remove the existing 10k series resistor.

______
Rob

Rob Gray aka the GRAYnomad www.robgray.com

phinsil6

I appreciate the response.  Right now I have the circuit setup as a retriggerable monostable like it is set up here:  http://www.doctronics.co.uk/Images_swf/p555_retriggerable.swf
Only addition is that I invert the signal from the output of the 555 and i have pin 9 on the arduino attached to pin 2 of 555.  The reset of the arduino is on the inverted signal of the 555.  I also suspect that its constantly retriggering but i can't seem to stop that.  the pullup resistor doesn't seem to be helping.

thanks

AltairLabs

#3
Jan 23, 2011, 08:19 pm Last Edit: Jan 23, 2011, 08:20 pm by AltairLabs Reason: 1
That doctronics picture of a breadboard is hard to read.  Also they added a PNP transistor in there as an emitter follower for some reason.  

Your circuit is more like http://upload.wikimedia.org/wikipedia/commons/thumb/1/19/555_Monostable.svg/275px-555_Monostable.svg.pngfrom Wiki, they have a nice write up on monostable mode. http://en.wikipedia.org/wiki/555_timer_IC#Monostable_mode

We assume you dont have any missing grounds or power problem, something like that.

You add an inverter.  Is it open collector?  CMOS?  Maybe try replacing it with just an open drain FET or transistor.

The other thing is the IO pin might do strange stuff very briefly during reset.  We would hope it goes cleanly to hi-Z but maybe not.  Do you have a scope?  Or just try at pin 2 a 10K pull up, a 1k resistor to Arduino, and just keep adding capacitance to pin 2  ;)

phinsil6

the inverter is a simple 7404 logic ic (something you would use in intro ee course) i would like to use some other kind of inverting hardware, but i don't know what.

so i already have the 10k resistor on pin 2, and i will try putting the 1k in series with the arduino ouput port.  but what is the purpose of adding capacitance to pin 2?

phinsil6

does it have to be 1k?  how about 1.8k?

AltairLabs

yes 1.8 k is ok.  The resistance has to be low enough that pin 2 can trip the lower threshold.  capacitor filters out any funny glitches during reset that may cause another trigger.  if you get to hundreds of microfarads then the filter will be slow enough the human senses can tell if its triggering during reset or later.

If you have a N FET or NPN transistor, use it instead of inverter.  7404 has "totem pole" output, normally a reset line wants an "open collector" (or "open drain" in case of FET).  Just connect emitter/source to ground, drain/collector to reset, and the base/gate to 555 pin 3 thru a resistor of about 1k to 10k.  It will invert, and it will never try to pull up, only pull down.

phinsil6

im trying to use your npn method of inversion with either of the following transistors:  mouser part number 757-2SK2962 or mouser part number 512-PN2222ATAR.  And instead of using having the collector set tied to the arduino reset pin I have it connected to an led so i can see if it actually is inverting or not, which currently I am not, the link is to my current setup:  http://i462.photobucket.com/albums/qq345/phinsil6/arduinoresetckt.png

Graynomad

#8
Jan 24, 2011, 01:43 am Last Edit: Jan 24, 2011, 01:57 am by graynomad Reason: 1
It should be

emitter -> GND
collector -> resistor -> LED -> 5v

You haven't implemented the pullup and series resistor that was suggested.

Also the switch and resistor are in parallel, so the switch does nothing.

Also, as drawn you will create a dead short between 5v and GND through the LED, you need a resistor in series with the LED.
______
Rob


Rob Gray aka the GRAYnomad www.robgray.com

AltairLabs

Back now, yes, GreyNomad has got it.

In fact forget the switch, you can just put pin2 back to the Arduino, just like before, and run the LED and RESISTOR from the collector to 5v.  Your reset code, whatever it be, should flash the LED to ON when you command a reset.  Once you got that working nice and stable with LED then try the real Arduino reset line.


phinsil6

so not using any part of the arduino yet, i used a couple different types of transistors, with confusing results.  first i tried an npn (p2222a) in your configuration and it didn't work.  then i tried a 2SK2962 which is a "MOSFET Small Signal N-ch 100V 1A 0.7 ohm" with the same setup and it worked.  then with the same setup used a 2n4403 "pnp" and it worked.

so in conclusion, npn didn't work, n chan mosfet worked, pnp worked.  i dont understand these results, shouldnt the npn work and pnp not work?

i'd like to understand these results as id like to find another transistor that would work and find it in a smt package.  the two transistors stated as working above do not exist in a smt package

thanks

Go Up