watchdog timer

nickwest

Member
Hello again folks,

I have two serial inputs connected to the same pin of an 08M - one from the 433mhz receiver, and one from a second local 08M acting as a watchdog timer in case the RF link dies... At the moment they seem to have conflicts, and the PICaxe will hang, even though there is only ever serial data from one input at a time.

I am using a 300baud inverted signal. Would true data make a difference? Could I isolate the two serial lines somehow, with diodes perhaps? Thanks for your help...

Nick
 

andrewpro

New Member
as long as all sides are either true or inverted, it shouldn't matter which one you use.

As for mixing the teo signals into one pin, yes you should be using diodes. Just put them in line with each serial signal path to the single input pin, and you should be ok.

Good luck.

--Andy P
 

nickwest

Member
Thanks Andy, the diodes work a treat! For some reason the polarity of the diodes is different... the stripe of the diode on one serial input faces away from the input pin, the other faces away from the input... it doesn't make sense to me, but that's the only way it seems to work!
 

hippy

Ex-Staff (retired)
It sounds like you have one active high signal and one active low signal which indicates an 'accident waiting to happen' should they ever both activate at the same time. You are at risk of burning out your RF output pin and the watchdog PICAXE's output pin, possibly destroying both. Even though they shouldn't activate together, it is possible the watchdog kicks-in just before RF data is received.

The diodes should both have the stripes towards the master PICAXE if it uses an Nxxxx baud rate, away if using a Txxxx baud rate.

When using an Nxxxx baud rate you may find it helps to include a pull-down resistor, or with Txxxx a pull-up.

I'd recommend fitting a 10K as a matter of course. Not having the pull-up/pull-down could corrupt the received signal and affect operation of the master PICAXE.
 

nickwest

Member
Hippy, when you say "master PICaxe" do you mean the one that is receiving all the serial inputs? I can say for a fact that there have been simultaneous serial inputs... with all the testing the timing has been all over the place! I guess it's a testament to the resilience of the the PICaxe that it still works! Do you have any suggestions as to how I can fix this configuration?

But with the diodes as you described unfortunately it just doesn't work!

Thanks for the advice on the pull-up/down resistor though - I'll put one across the input as a precaution.

The input pin I'm using is pin3 by the way - it requires a diode connected to the positive rail... but if I understand the documentation correctly this is immaterial as it just compensates for the internal diodes connected to the other pins.
 

hippy

Ex-Staff (retired)
Yes, by master I meant the one receiving all the serial inputs.

That this configuration worked without diodes shows both 433MHZ module and PICAXE are resilient to say the least, but you are probably putting undue strain on both which could lead to premature failure.

I'd recommend changing the diode between the two PICAXE's so it's the same direction as the one from the 433MHz, then change the baud rates of both PICAXE's.

The diode from Pin 3 to +V is only needed when that pin is driven by anything which puts out a voltage higher than the PICAXE power supply.
 
Top