08M - Reseting

Mad Professor

Senior Member
Good Day All.

A few of you having been helping me with my current project.

The 08M is very easy to upset and reset.

I can make the 08M reset evey time by just getting a pice of wire not connected to anything and tapping one end of the wire on the SW2 input on my PCB.

If I do the same to SW1, the 08M just carrys with what is it doing.

It also some times resets when any mains item in the room is pluged in or unpluged, the said mains powered item does not even need to be powered up, to make the 08M reset.

I am running the 08M on my bench power supply @ 15volts.

Supply voltage at the 08M is 5.01volts.

Here is the current Schematic:


Here is the current PCB Layout:


Here is the current Code:
Code:
#Picaxe 08M


init:
high 4
high 0


main:
if pin1 = 0 then count_down
if pin3 = 0 then power_up
goto main:


count_down:
pause 1000
if pin1 = 1 then main
for w0 = 1 to 150
 low 0
 pause 1000
 high 0
 pause 1000
next w0
low 4
low 0
down_wait:
if pin1 = 0 then down_wait
goto main:


power_up:
pause 1000
if pin3 = 1 then main
high 4
high 0
goto main:
Can you please advice.

Thanks for your time.
 
Last edited:

gengis

New Member
Your ground connection should be at the emitter of Q1. By having that long meandering ground carry the current for the axe and your variable resistor, you guarantee that the inductive kick of the relay will be felt by the axe .

May not fix your problem, but it is most definitely poor design practice.

The wiring traces have resistance and inductance. There will be a slight steady state voltage drop along the trace, but when the kick comes along the inductance/resistance will cause a momentary surge or sag - the relay is also a tank circuit with (some) resonant frequency. The 1N4001 (relay damper) is a slow diode.
 

Mad Professor

Senior Member
Flooby: Thanks for your reply.

I will bear that in mind for the next PCB I make.

All the traces are 1mm, apart from the relay traces and thay are 4mm.

I was thinking about making a large ground plate on the bottom side of the PCB, but one place I read said that is a bad idea when working with microcontrollors.

My resetting problem happens with or without a relay connected.

I don't know if I have done something worng in my Schematic or PCB layout.
 

hippy

Ex-Staff (retired)
Just checking but are your D5, D6 and D7 LED's designed to be used without current limiting resistors ?

I recall there was some previous mention of odd behaviour with the pin which would be MCLR on a PICmicro, this would be leg 4, input pin 3, your SW2. I'm not sure what the outcome there was but it may help to connect a diode between leg 4 and +V, cathode to +V, perhaps a schotky diode.

You could temporarily short leg 4 direct to 0V and run some test code, see if that resets or not.

You could also try removing the regulator and powering directly from your PSU at 5V.

You may need to beef-up your C2 and/or C4, go to a higher Farad rating. Out of interest, what voltage is your C2 rated for ?

The problem you've found is one of the reasons people here are overly cautious about home-built circuits being used in automobiles and in safety critical situations. Finding a problem is annoying, but better than to find it only when you have to depend on it working.
 

kd5crs

Senior Member
Your schematic shows GND -> SW2 -> R6 -> Picaxe.

But on your PCB, how are the SW1 and SW2 connected to ground? Is it only through the C3 decoupling cap? Can you do that? Is it that by touching a wire to SW2, you are grounding the circuit through your body, emptying the decoupling cap, grounding the +V pin, and thus resetting the Picaxe?

I dunno, I have very little experience with the fine points of PCB design, but to my untrained eye it doesn't look like your switches are actually connected to ground. Nothing wrong with the schematic that I see.

Brian
 

pilko

Senior Member
You say you are running your 08m from a bench power supply of 15 volts, yet your schematic shows a 24 volt power supply.
What does your 24 volt power supply look like?
Have you tried powering the 08M from a 4.5 volt battery pack?
 

Mad Professor

Senior Member
kd5crs: SW1 & SW2 go from the PCB to a switch, and from the switch to ground.

pilko: the PCB is indeed for use on a 24volt system, but before connecting it to the 24volt system I wanted to bench test to find out if there was any problems.

My bench power supply can only go upto 15volts, so that is the voltage I am testing at.
 

kd5crs

Senior Member
kd5crs: SW1 & SW2 go from the PCB to a switch, and from the switch to ground.
For my own education, then, how exactly does the switch connect to ground? Or do you mean the ground it connects to is off the board? I don't see it (but that doesn't mean it isn't there :) )

Brian
 

Mad Professor

Senior Member
hippy: I have now shorted leg4 (input3) to ground.
Cut the trace for SW2, and the trace for the POT as it's not in use yet, Connected SW2 to leg 5 (input2).

And so far I have not had any resets.
 

BeanieBots

Moderator
Ok, fair point, C3 on artwork is OK but diagram implies different layout.

EDIT:
As well as clamp diode, I'd also try a cap (10nF - 100nF) on input 3.
 
Last edited:

alphamike27

New Member
@ Mad Professor

I also had a real problem with a 08 resetting, changing outputs to inputs and other weird behavior.

The 08 was part of a LED house lighting project where small LED clusters were used as night lights and "power fail" lights.

After a lot of detective work, I finally tracked down that a small independent PLC adjacent to the 08 project was inducing noise into a twisted pair connecing the 08 to a remote LDR.

Finally fixed the probelm by re-routing the lead to the LDR with sheilded cable.

The moral of the story, is that it my not even be the 08 circuit that is causing the problem.
 
Top