08M Serin Watchdog / Alarm Idea

retepsnikrep

Senior Member
I've been working on a remote display option for my BMS which uses the simple 433mhz am transmitters and code described on this site. The BMS transmits serial data at 1200 baud to a remote display/alarm in the house. That part works very well :cool:

I'm using an 08M at the rx end and this is all fine if the serial data keeps comming but if the Master stopped sending for some reason that would not trigger an alarm as the 08M serin would be stuck waiting for data :(

So in the Rx code fragment below I toggle an led on/off each time through a loop.

I added a few simple components as I did not want to use another 08M or 555 stype timer as a watchdog.

www.solarvan.co.uk/bms/RemoteDisplay01.jpg

If you look at the attached scematic you will see I am sinking an led into the 08M chip so it's on when the output is low. The circuit I added uses a simple RC to function as a simple timer on the gate of a mosfet. The gate capacitor can only discharge through the 08M when the LED output is low (LED ON). So if serin gets stuck with the ouput high (Led off) then the capacitor will slowly charge through the 1M resistor until it reaches the turn on voltage for the mosfet sounding the alarm. As long as the low pulses continue then the capacitor will be discharged through the 08M each time before it reaches the gate threshold. That's my theory. Any comments. I haven't looked at thevalues for R/C yet but I will need a delay of about 2-3 seconds before alarm sounds.

Code:
Start:						
	high led		
	serin Rxd,N1200,("data"),b0
	sertxd("Data ",b0)
	low led			 
	serout Lcd,N2400,(254,128,#b0)
	goto Start
 
Last edited:

retepsnikrep

Senior Member
Assembled and tested this today I found it works very well with a 100uf capacitor and 100k adjustable pot giving a range of 0-5 seconds.

So if Picaxe output does not go low at least once every 5 seconds alarm sounds! If signal returns alarm goes off. ;)
 

MPep

Senior Member
A great post of a question, and then taking the time to answer it yourself. And advising people what happened. Good on ya!

A simple but effective solution! Thanks for sharing.
 
Top