OH NO!, I think it's dead

TEZARM

Senior Member
I have a Picaxe circuit I have designed for a car again. It was working very intermittently and starnge. Only difference this time is for example instead of triggering INPUT 1 to ground through a npn transistor, this time I just put pin 1 directly to ground through a 1n4004 diode. I don't think it liked that. Should I have used a resisitor to go through as well. Because now the circuit does it's routine but completely ignores my input 1 completely. Bugger it! What value resistor does someone recommend. 10k sufficient enough or to high. I have my 10k Pull up in the circuit by the way. Obviously the Diode was not enough. It's a dead Picaxe is it not. Can still program it etc but the input 1 no longer does it's job. It was working but extremely unreliable. Any advise anyone.

 
 

manuka

Senior Member
Recalling our MANY earlier "mission critical" warnings, it's hoped your car wasn't mobile at the time...
 

TEZARM

Senior Member
Thanks Stan. But this circuit does not have anything to do with the driveability operation of the car. This circuit only works when you switch it on while at the car. It works for 2 seconds and switches off again, atleast thats what it will do when I get it sorted out. Can anyone else answer my question about the resistor please. Is it really neccessary to have this in the circuit. And YES, I KNOW IT'S DANGEROUS TO USE PICAXES IN CARS, but it's my decision if I wish to take the risk or not. But thank you for the warnings.
 

hax

New Member
Is there anything else that the input is connected to other than ground? Is it perhaps connected to the door switch that grounds out on the chassis? If so, the pin may hang high at 12V in which case you may have fried the picaxe input. If it is not connected to anything other than ground, then your picaxe should not have died.
 

TEZARM

Senior Member
Hi Haxby. My Input is pulled to ground when my car alarm locks. So it is pulled low for just under 1 second. It is triggered off the lock wire of car alarm. The lock output wire of my alarm is a set of relay contacts that go to ground when remote button is pressed. So do you reckon the resistor needs to be put in series with my diode in my input wire? Or is the diode by itself sufficient enough?
 

hippy

Technical Support
Staff member
If I understand correctly, you have something like this, except using a relay switch rather than a push button ...<code><pre><font size=2> .---------.------- 5V
| |
.|. |
| | .---^---.
|_| | |
| /| | | |
.---|&lt; |----^----&gt;| In |
| | \| | |
_| O | |
|_| `---.---'
| O |
| |
--^---------------------^------- 0V </font></pre></code> I can't see any reason why that would fry the input, and even if the button was from +12V the diode should block the current. A 10K pull-up should be okay; it's what I'd use.

You don't say what type of PICAXE. If an 08/08M you could potentially fry the In by making it a high output with the diode shorted to 0V, but I can't see how this circuit could damage an input-only pin.

Are you sure In has stopped working ? Try shorting the pin direct to 0V in case the diode drop leaving 0.7V(ish) on In is not registering as a low.
 

BeanieBots

Moderator
As stated by Hippy, there is no immediately obvious reason why your circuit would have blown an input, assuming it is as drawn by Hippy. However, a 1N4004 is only good for about 400v and does have capacitance so it is quite possible that a spike did make it to the PICAXE by reverse conduction through the diode. What is more likely is a spike which pulled the input more negative than 0v. (or one which raised the 0v very high which boils down to the same thing).
You are thinking along the right lines by putting in a current limiting resistor. It should be connected between the PICAXE input and the rest of the circuitry so that the PICAXE sees the outside world via the resistor. 10k will help but I would go for a higher value with at least 1/2 watt rating so that you know it will hold off the high voltage without jumping across. (most common resistors are good for about 100v).
As further protection, if you don't mind a small delay on the signal, I would also fit a 100nF cap directly between input and 0v and a clamp diodes between input and both 0v and Vcc. The 100nF will &quot;soak up&quot; any very fast short duration spikes and give the clamp diodes time to respond to any spikes that last long enough for the 100nF to exceed input specs. The series resistor will limit current to an acceptable level through the clamp diodes.
 

Michael 2727

Senior Member
Measure the voltage at input 3 with a meter.
Just to see if you are getting what you expect.
Try it without the PicAxe.
 

TEZARM

Senior Member
Thanks all.
Hippy. Yip, that drawing is exactly correct.
Yes, it does not work anymore. It just keeps repeating itself like I have it in a loop. I found another picaxe and programmed that one which seems to be fine so far. Sorry, I should of stated before, I am using a 18A. So it's almost like a dead short has happened inside the Picaxe at the Input Pin 1 I guess.
BeanieBots. Ahh, thanks that is the info I was looking for. I will try that trick today. By the way what I said was a 1n4004 is actually a 1n4007 diiode, sorry my mistake.
Thanks Michael, I have tried that trick. All seems to be ok.
 

ylp88

Senior Member
EDIT: Sorry - wrong thread...

<b><i>ylp88 </b> </i>

Edited by - ylp88 on 1/9/2006 12:55:33 AM
 

TEZARM

Senior Member
Hee Hee. Doesn't matter, I know what you mean't. Thanks for helping me out anyway.

To all who helped me out you will be glad to know that I have found the problem. It was my fault. It was the way I had designed the Central Locking Interface. I stuffed up. In the end it looks as if it was damaging the Picaxes. The resistance across my locking motor coils was so low that it was causing my alarm lock and unlock outputs to short together and trigger at the same time so my circuit was trying to do 2 things at once. Diodes would not fix this problem so in the end I bought an aftermarket central lock interface and got my alarm to trigger that instead. Now my circuit works like a dream. Of course it took me about 5 hours to figure out what on earth was going wrong.
Oh well back to the drawing board with alarms locking interface I guess. Hmmmm, what is it I am doing differently than the commercial made ones I wonder.
Thanks to all for your help. Your all fantastic.
 
Top