14m2 occasional resetting

jacque

New Member
Hi Picaxers,
I’m hoping someone maybe able to offer some suggestions to correct the sporadic resetting of a 14m2. I made this circuit some time ago and have no diagram for it and it is installed in a difficult spot to access. I am aware without a c.d this is a long shot but I have noted the following behaviour. When I have the data cable connected it works flawless. I trialed removing each connection (ser in, ser out, 0v) and found that the combination of both ground and ser in connected makes the circuit run perfect. All other combinations have no affect on the resetting behaviour. I know for a fact the ser in has the correct resistor to ground. Maybe one of you experienced picaxers can think of a likely suspect? I also tried setting pins with dirs c and b and pulling up the unused pins but I couldn’t tell if that made a difference… any suggestions appreciated!

Thanks
Ant
 

Aries

New Member
Is it possible that your power supply is a bit erratic? I had something similar with a 20x2 some years ago, and it looked as if the circuit was drawing too much power for the voltage to be maintained.
 

AllyCat

Senior Member
Hi,
I know for a fact the ser in has the correct resistor to ground.
The serin input actually uses two resistors, 10k to ground in series with 22k to the Serin Pin (Leg 2), giving an effective pull-down of about 32k (the actual value is not normally important). Your Resetting sounds very like an Programming Input circuit issue, so are you absolutely sure that yours is correct? Of course you also do have a (100nF) decoupling capacitor directly across the supply rails (Legs 1-14) don't you? ;)

Would just linking the Serin Input and Gnd when not actually programming (e.g. with a dummy S/C plug) be a suitable long-term solution? If not, you could try a lower value resistor, perhaps 2k2, connected permanently, which probably won't affect the programming process.

Cheers, Alan.
 

jacque

New Member
Hi,


The serin input actually uses two resistors, 10k to ground in series with 22k to the Serin Pin (Leg 2), giving an effective pull-down of about 32k (the actual value is not normally important). Your Resetting sounds very like an Programming Input circuit issue, so are you absolutely sure that yours is correct? Of course you also do have a (100nF) decoupling capacitor directly across the supply rails (Legs 1-14) don't you? ;)

Would just linking the Serin Input and Gnd when not actually programming (e.g. with a dummy S/C plug) be a suitable long-term solution? If not, you could try a lower value resistor, perhaps 2k2, connected permanently, which probably won't affect the programming process.

Cheers, Alan.
Thanks for the reply Alan. The programming circuit is as specified in the manual and the capacitor is there. Are you suggesting to try the 2k2 resistor in place of the 10k?
 

AllyCat

Senior Member
Hi,

Normally the Programming circuit works perfectly well, even with much larger resistance values. However, if your issue is "solved" by linking the Programming input to Earth (i.e. short-circuiting the 10k resistor), then either shunting the 10k by (say) 2k2, or replacing it, may give a "compromise" solution.

A brief pulse applied to the programming input pin can certainly cause a Reset, so perhaps the construction has introduced some unintentional "stray" (capacitance) coupling into the Programming cable input, which would be reduced by a factor of around 5 (that might be "good enough" to solve the problem).

Cheers, Alan.
 

jacque

New Member
Hi Alan, I realise my comment of ‘both ground and serial in connected’ is very ambiguous… what I meant was both ground and serial in connected to my computer through the usb rs232 adapter and that is the only combination that makes it work i.e ser in and ser out connected to computer has no affect without ground also connected and ser out and ground connected also has no affect. Sorry for the confusion there. I’m going to try shunting the ser in pin to ground as you suggest anyway but if this new information makes you think of anything else I’m keen to hear it.
Cheers
Anthony
 

AllyCat

Senior Member
Hi,
.... the only combination that makes it work..... .... has no affect.
I'm not clear what you mean by "makes it work" , or by "no effect". Is that the program working at all, or just not suffering from occasional Resets?

Generally not much in electronics (communications) ever "works" if the Earth is not connected ! :( I strongly suspect that the programming circuit (pull-down) is not connected how you believe it is, perhaps due to a faulty component or a bad connection (e.g. a "dry joint"). But without a circuit diagram and/or the Program it's impossible to guess what (else) might be wrong.

Cheers, Alan.
 

jacque

New Member
Ok thanks Alan. Makes it work without ever resetting - otherwise it resets occasionally without the cable connected. I think I will pull it out which is going to take an age… was worth a shot anyhow! Thanks for your help. My guess is either what you think re a bad component joint etc or that the connection of the cable is preventing/reducing some noise to below a point that actually causes a reset.
 

hippy

Ex-Staff (retired)
otherwise it resets occasionally without the cable connected.
If you mean it resets when there's a cable from your PICAXE but the PC end is not plugged in to the PC it could be that the serial cable is acting as an aerial or antenna, with electrical noise picked-up causing the PICAXE to enter its download mode, find there wasn't a download, and resets, starts again.

Code:
                                                \|/
.------------------.    ___                      |
|               SI |---|___|---.-------//--------'
| PICAXE-14M2   SO |          .|.
|               0V |-----.    |_|
`------------------'     |     |
                         `-----'
If that's the case then adding a low value resistor between Serial In and GND/0V at the PC end of the cable when not plugged in may help resolve or reduce the issue. A direct wire short should also work so long as you ensure you are shorting the correct signal.

Code:
.------------------.    ___
|               SI |---|___|---.----//---< TX ---.  ---.
| PICAXE-14M2   SO |          .|.               .|.    |
|               0V |-----.    |_|               |_|    |
`------------------'     |     |                 |     |
                         `-----^----//---< 0V ---'  ---'
How long is the cable from the PICAXE to the PC ?
 

inglewoodpete

Senior Member
I have reliably run up to 40 PICAXEs networked together under fluorescent lighting and driving 64 DC (commututed) motors in a robotic artwork machine. There is something significantly wrong with your design or the circuit's wiring if you're getting regular resets.

If implementing hippy's and Alan's suggestions do not improve the situation, please post circuit details and/or photos.
 

jacque

New Member
If you mean it resets when there's a cable from your PICAXE but the PC end is not plugged in to the PC it could be that the serial cable is acting as an aerial or antenna, with electrical noise picked-up causing the PICAXE to enter its download mode, find there wasn't a download, and resets, starts again.

Code:
                                                \|/
.------------------.    ___                      |
|               SI |---|___|---.-------//--------'
| PICAXE-14M2   SO |          .|.
|               0V |-----.    |_|
`------------------'     |     |
                         `-----'
If that's the case then adding a low value resistor between Serial In and GND/0V at the PC end of the cable when not plugged in may help resolve or reduce the issue. A direct wire short should also work so long as you ensure you are shorting the correct signal.

Code:
.------------------.    ___
|               SI |---|___|---.----//---< TX ---.  ---.
| PICAXE-14M2   SO |          .|.               .|.    |
|               0V |-----.    |_|               |_|    |
`------------------'     |     |                 |     |
                         `-----^----//---< 0V ---'  ---'
How long is the cable from the PICAXE to the PC ?
Hi Hippy, thanks for your thoughts. I haven’t pulled the circuit out yet as i can live with the occasional resetting behaviour but it’s really annoying me all the same. It resets without the cable connected at all - however I believe you are right and it is entering download mode. I suspect it’s ground bounce as there are a few fets in this circuit. When I measure the ser in to ground voltage from the cable it has -6.5v which I assume when plugged in is able to negate any of the noise arriving at the the ser in pin….
 

inglewoodpete

Senior Member
Hi Hippy, thanks for your thoughts. I haven’t pulled the circuit out yet as i can live with the occasional resetting behaviour but it’s really annoying me all the same. It resets without the cable connected at all - however I believe you are right and it is entering download mode. I suspect it’s ground bounce as there are a few fets in this circuit. When I measure the ser in to ground voltage from the cable it has -6.5v which I assume when plugged in is able to negate any of the noise arriving at the the ser in pin….
The SerIn pin has an impedence of several megohms. Why wouldn't 10k+22k = 32k pulling SerIn to ground also prevent these restarts? Either the 10k+22k to ground is open circuit or you are looking in the wrong place.
 

hippy

Ex-Staff (retired)
Why wouldn't 10k+22k = 32k pulling SerIn to ground also prevent these restarts?
Under most circumstances it would or should but I guess there are always circumstances where some sort of external interference causes pick-up which might overcome the pull-down. I'm guessing interference on the power rails in conjunction with interference seen on the download pin could tip things over the edge.

If it is happening a lot then it could be the 10K+22K has become open-circuit or higher impedance, some solder joint or connection weakened or corroded.

One can use DISCONNECT to prevent downloads. One can also poll the Serial In pin to monitor level, check again, then issue a RECONNECT which should cause download to proceed if it is one, ignore any brief glitches.
 

jacque

New Member
Th
Under most circumstances it would or should but I guess there are always circumstances where some sort of external interference causes pick-up which might overcome the pull-down. I'm guessing interference on the power rails in conjunction with interference seen on the download pin could tip things over the edge.

If it is happening a lot then it could be the 10K+22K has become open-circuit or higher impedance, some solder joint or connection weakened or corroded.

One can use DISCONNECT to prevent downloads. One can also poll the Serial In pin to monitor level, check again, then issue a RECONNECT which should cause download to proceed if it is one, ignore any brief glitches.
Thanks Hippy I will try this - if it works that is the perfect solution for me!
 

Goeytex

Senior Member
Sounds like a possible grounding issue. Possibly, when the data cable is plugged in a good ground is supplied to the circuit. In any case I think the best path ( no matter how painful) is to get to the board/circuit and actually troubleshoot it.
 
Top