Picaxe08's stopped programming

kenmac

Member
Hi,
I have two 08's that have been working normally, accepting programming etc.
They both have now ceased accepting the "in circuit" programming signal.
I did the serial port check and found that the pin2 voltage was only varying from -0.55 to 1.57V.
The voltage from the laptop is -5.33 to 3.25V.
I've had a closeup look a the board, but can't see/measure anything that may cause a problem.

A new 08 chip in the same socket works OK. (so far)
It seems that something in the faulty ones on Pin2 is now pulling the voltage down - there should be little voltage drop.
Has anyone experienced this problem?
I'm just glad it wasn't one of the bigger (more expensive ) chips.
The board has a 7805 regulator, fully bypassed, and there is minimal ripple on the supply.

I tried the faulty chips on my normal protoyping board - same result!

kenmac
 

manuka

Senior Member
Suggest you at least try 3xAA (~4½V) batteries next. It's well known that mains sourced power supply ripple can scramble the little brain of PICAXEs- your PSU may not be as smooth as you think!
 

manuka

Senior Member
In fact this is such a perennial PICAXE pertubation (note alliteration!) that I've been moved to a limerick -

So-your PICAXE creation's no go,
And with anguish you ponder the woe,
Just consider three AA,
Instead of the mains way
To run your electrotech show!
 
Last edited:

Michael 2727

Senior Member
Tried a Hard Reset ?

1: Program Editor ready to go with a small program.
( Blink LED Test will do, just for verification )
Code:
Main:
high 1
pause 250
toggle 1, 2
pause 250
toggle 2
pause 250
goto main
2: Power OFF on the 08 chip.
( remove everything except the download circuit )
3: Hit the program chip button in the Editor.

4: Then Power ON the 08 chip.
( do it before the timeout window appears )
 

kenmac

Member
The power supply looks pretty flat to me (on CRO) and it has been used many times with Picaxe08's. with no problem.
Of course, I have done the usual tricks with power resetting, etc.
It seems to me that Pin2 is now damaged in some way, sufficient to pull the voltage down to around zero.
Certainly, in that condition it's not going to work!

kenmac
 

Michael 2727

Senior Member
Apart from over voltage on the serin pin, which may have fried it.
Out of curiosity what was previously loaded program wise ?
Were you playing with any weird pin configurations, PWMing, Poking etc ?
Do the chips still run?
 

kenmac

Member
There's nothing unusual about the circuit.
Basically, pins 0 and 2 are outputs to transistor/relay combos, and pin 1 is an ADC input, Pin 4 is a switch input.
The relays are power types, coils are 12V, switching 240VAC, suitably protected by diodes etc.
I had a good look at the board and there is no way that anything other than 5V can get onto Pin 2.
The picaxe is very close to the relays (in a very small box), so I'm wondering if there can be any sort of induction effect when switched.
I was in the process of debugging the program when suddenly it wouldn't respond to programming anymore.
One way for the Pin to be damaged would be for it to be set to Output low (0) and 5V applied, but that can't be achieved by the user as it's under the control of the original boot program.

kenmac
 

hippy

Technical Support
Staff member
One way for the Pin to be damaged would be for it to be set to Output low (0) and 5V applied, but that can't be achieved by the user as it's under the control of the original boot program.
Even if you could, setting Serial In to output should be okay. There's a 22K between Serial In and whatever is connected so the current would be severely limited and unlikely to cause any damage. You'd have to have Serial In as output low and the 22K to +500V to burn out the I/O that way.
 

SD2100

New Member
pins 0 and 2 are outputs to transistor/relay combos
Maybe with pin0 controlling a relay and also in use during programming this has caused some problem. you say you were in the process of debugging so were you using the DEBUG command ??? as this uses pin0 as well. With everything so tightly packed inside a small box and with the relays very close to the picaxe and switching 240v it sounds a bit close to me. What are the relays controlling ???.
 

kenmac

Member
Hi Hippy,
What you say is true - I was just trying to understand what could have happened and obviously it could only occur if the voltage was applied directly, in the very unlikely situation of the serial pin going to output/low.
So, the mystery remains.
I've put the faulty chip aside and continuing with a new chip to complete the project.

kenmac
 

kenmac

Member
Phil75,
The relays are intended to switch 240V AC but that voltage is nor yet present in the box.
It is true that the Pin 0 relay is connected during programming, via a series diode/transistor.
The relay has the usual back EMF diode across the coil.
I wouldn't think that there is any voltage feedback to Pin 0, but maybe the magnetic field of the relay coil when being switched off has had some effect internally on the chip?

I probably should have provided a means of isolating the Pin 0 load when programming, usually with a jumper header, but I had wanted to be able to reprogram without opening up the box.
In practical terms, once fully tested, it probably won't need reprogramming again, so it could have survived without the "in-circuit" programming facility anyway.

kenmac
 

hippy

Technical Support
Staff member
Don't bases of transistors clamp voltage ( looks around for an electronics expert ) ?

If so, with the other diode, you could be clamping Pin 0 out to around 1.2V, too low for the PC to receive. Why it worked then stopped mid-use I don't know.

But ... You mention series diode, but what about series resistor ? Would that ( still looking around for an expert ) give an effective short to 0V via the diode plust transitor base-to-emitter ?
 

BeanieBots

Moderator
From the circuit description it does indeed sound as if the circuit is to blame.
Series diode into transistor base could destroy a PICAXE output. A diagram would confirm. Close proximity to a relay is very unlikely to cause problems with induction but no 'catch' diode would.
 

Dippy

Moderator
Why not post your circuit?
You'll probably find the 'culprit' at that stage as hippy's comments are sound i.e. don't you have a resistor to the tran base?
Put up a schematic picture.

99.9% of occasions where the 'reliability' of the PIC cips are raised turn out to be 'user error'. Sometimes a PIC can drive a small circuit for a while and then give up.
 

SD2100

New Member
With the relay so close to the 08 I was thinking more about track clearances between 240v and 5v etc.
 

Dippy

Moderator
OK, then post schematic and artwork.

Phil, he said "The relays are intended to switch 240V AC but that voltage is nor yet present in the box."
so, i don't think we've got to the zap stage yet???
maybe its loading on pins that is messing things up.
 
Last edited:

kenmac

Member
Thanks for your comments guys,
I'll see if I can post the circuit (or the relevant part).

I'm a retired electronics person, so I do have some knowledge of the associated bits.

The diode in series with the transistor base resistor is simply a protection against any feedback from the transistor/relay combo to the Picaxe.
The other thing is, they are on Pin0 [socket pin7] and the problem is with socket pin2.
They are opposite each other on the socket of course, but with a big gap between them.

It is a one-off project and thus it is on a strip board - and yes the strips/gaps were very carefully examined and cleaned (I have been caught before!).

The unit is now completed and tested and will now be run for a few days to see if anything abnormal occurs.


Time for sleep!

kenmac
 

SD2100

New Member
OK, then post schematic and artwork.

Phil, he said "The relays are intended to switch 240V AC but that voltage is nor yet present in the box."
so, i don't think we've got to the zap stage yet???
maybe its loading on pins that is messing things up.
Ok saw that !!!.

Had a funny one recently with chips not programming sometimes, did all the usual checks and finally found the problem to be the insulation on the well used serial cable starting to crack up and the serial wire to the PC was shorting on the 0v wire. All looked ok on the outside but was a different story under the outer covering just near the molded 9 pin plug (old mouse cable).
 

kenmac

Member
I don't know if it will help, but I have attached the whole circuit.
It was originally an Open Office drawing (.odg) but I converted it to .pdf for the purpose of this attachment.

For info, the purpose of the circuit is to provide temperature control of two sets of exhaust fans.

It is normally controlled by a Master Control Unit, which sends coded commands to the Fan Control.
In the event that there is a problem with the main control, provision is made to connect a local NTC sensor to keep the fans operating on automatic.

kenmac
 

Attachments

hippy

Technical Support
Staff member
The circuit looks okay to me. The only obvious way to damage Pin 0 would be to mis-wire the Auto-Manual switch so Pin 0 could be switched to +5V via the Fan 1 On switch.
 

BCJKiwi

Senior Member
I'm a little confused - original post says;
"I have two 08's that have been working normally, accepting programming etc.
They both have now ceased accepting the "in circuit" programming signal.
I did the serial port check and found that the pin2 voltage was only varying from -0.55 to 1.57V."


Following discussion centres around issues with pin2 and how it might be zapped.

It seems there may be confusion between Serial In, Pin2 and Leg2.
The programming comes through PICAXE 08 Serial In/Leg2. The circuit shows the "Pin2" designation on Leg5 - the in2/out2 etc connection.

So which connection is the problem? No high voltage/current should come anywhere near PICAXE serial In/Leg2. The closest is - as noted by Hippy - 5V via the manual switch position (shorts/miswire), 180R resistor and contact between the programming socket pins (a switching stereo socket perhaps?).

In order to achieve a succesful programming session, it would seem that the system should be set so the FAN1 switch is OFF, AND, the system is set to Manual else there would be interference with the programming serial out trying to switch the transistor.

Also note that with diodes on the transistor bases there should be discharge resistors to ground to help the transistors shut off cleanly.
 

kenmac

Member
BCJKiwi,
Yes, it can be confusing when talking about "pins" on the picaxe.
The Pin in question is the "Serial in" or socket pin #2.
Something has caused it to heavily load the incoming voltage - in other word it is drawing sufficient current to drop most of the volts through the 22K resistor.
Somehow, the discussion changed to Pin0 (serial out), which isn't the problem.

Anyway, whatever it was, it hasn't re-occurred, so I'll just put the faulty picaxe aside and move on.

Thanks for your input,

kenmac
 

BCJKiwi

Senior Member
Well I think serial out comes in to the frame as a possible back channel for 5V to arrive at the programming jack.

Many of these jacks have internal switches and many of the PCB layouts have lots of the pins interconnected.

Thus it may be possible, with the programming cable removed, and an issue at the switching near leg 7 for the manual switch position to feed raw 5V into serial in via only the 180R resistor.

A long shot indeed but what other option is there?
 
Top