karenhornby
New Member
Any Thoughts on how to do this?
I need to find a way to make an electronic interlock? system that does the following:
Sound an alarm IF PORTS B1 AND B2 are HIGH AND the power (ignition switch) is turned OFF, BEFORE the pushbutton (input port on chip) has been pressed,
The alarm can be either an external circuit, or as simple as a port output driving a piezo sounder or even a siren generated internally in the chip and fed to a speaker.
IF both PORTS B1 and B2 are low then the check does not need to be made .
IF it helps the input of those ports, is the output of 2 X DS1620 in thermostat mode only supplying a high signal when the required temperature has been reached. and the check ONLY has to be made if these are still high when power is removed.
I had thought about maybe using some sort of capacitor system to keep the pic alive for a few seconds which would activate if the main power was removed. but somehow the PIC has to know if the button has been removed, and ONLY if the button has NOT been pressed then sound the alarm
A Possible way of doing this may be to put a delay internally in the PIC program, first check for port B inputs and if they are high then carry on with the rest of the program which would be simple enough to do, but there is no way I can see for the PIC to know if the pushbutton had previously been pressed before it was powered down last.
IF it helps, the circuitry has 2 power rails, one from the ignition switch in the car (+12V) and one 5Vfrom a 7805 chip
BUT I'd like no external switches other than the one pushbutton already in the system
Im stuck!
other than using relays and a 2nd power supply (main car battery) which means another on/off switch and is going to look pretty messy and rely on someone remembering to turn the switch on or the circuit will never get turned on. and I NEED it to activate every time the ignition switch is turned on.
I need to find a way to make an electronic interlock? system that does the following:
Sound an alarm IF PORTS B1 AND B2 are HIGH AND the power (ignition switch) is turned OFF, BEFORE the pushbutton (input port on chip) has been pressed,
The alarm can be either an external circuit, or as simple as a port output driving a piezo sounder or even a siren generated internally in the chip and fed to a speaker.
IF both PORTS B1 and B2 are low then the check does not need to be made .
IF it helps the input of those ports, is the output of 2 X DS1620 in thermostat mode only supplying a high signal when the required temperature has been reached. and the check ONLY has to be made if these are still high when power is removed.
I had thought about maybe using some sort of capacitor system to keep the pic alive for a few seconds which would activate if the main power was removed. but somehow the PIC has to know if the button has been removed, and ONLY if the button has NOT been pressed then sound the alarm
A Possible way of doing this may be to put a delay internally in the PIC program, first check for port B inputs and if they are high then carry on with the rest of the program which would be simple enough to do, but there is no way I can see for the PIC to know if the pushbutton had previously been pressed before it was powered down last.
IF it helps, the circuitry has 2 power rails, one from the ignition switch in the car (+12V) and one 5Vfrom a 7805 chip
BUT I'd like no external switches other than the one pushbutton already in the system
Im stuck!
other than using relays and a 2nd power supply (main car battery) which means another on/off switch and is going to look pretty messy and rely on someone remembering to turn the switch on or the circuit will never get turned on. and I NEED it to activate every time the ignition switch is turned on.
Last edited: