Input Interfacing a Normally Closed circuit ( NC ) with Picaxe

Bozambo

Member
Using normaly closed contacts as part of an electronic alarm circuit, could be a bit challenging and cumbersome for the non professional like my self requiring wires running all over. Iam sure the Picaxe ic can simplify this problem. The problem I have is that I have been trying to solve this for days without any success . So here I am asking for assistance. Iam using either M2 or 08M on the Prototyping board.

Bo
 

nick12ab

Senior Member
Can you clarify on what your problem is?

Is it just that there is a normally closed relay with either no normally open contacts or you don't want to add an extra wire for the normally open contacts? If that is the case then to use it just like you use a normally open switch, just use the normally closed switch between the PICAXE input pin and ground instead of the input pin and power. Don't forget the pull-up resistor - you can use the internal pullups on the 08M2 by using the pullup command.
 

Bozambo

Member
What Iam trying to do is use one of those 12v motion detectors. But they have normally closed contacts so when motion is detected the contacts open. but I would like to sound a Pizzo spunder when motion is detected by interfacing the picaxe with the action of the contacts. Thanks again
 

eclectic

Moderator
1. Can you post a link to the detector please?

2. Must the programing be done via Logicator,
or can you use BASIC?

e
 

nick12ab

Senior Member
What Iam trying to do is use one of those 12v motion detectors. But they have normally closed contacts so when motion is detected the contacts open. but I would like to sound a Pizzo spunder when motion is detected by interfacing the picaxe with the action of the contacts. Thanks again
Just interface it like a normal switch like I described in my previous post.
 

Bozambo

Member
Hi Nick
Thanks for your response with your sketch. Iam not a pro in this. Could you indicate to what PINS on the Picaxe the resistors are to be connected to and their values.
 

hippy

Technical Support
Staff member
Simply wire the normally closed switch just as you would a normally open switch, either pulled-up or pulled-down. It's then just a question of branching with a Logicator CONDITION block depending on whether the input is high or low, 0 or 1.
 

nick12ab

Senior Member
Hi Nick
Thanks for your response with your sketch. Iam not a pro in this. Could you indicate to what PINS on the Picaxe the resistors are to be connected to
It doesn't really matter what pin you use, as long as it can be used as an input - so any pin other than C.0 can be used. I'd use C.3 as it is an input-only pin so you're not wasting any pins that could be used as output pins. I wouldn't use C.5 as it would prevent the PICAXE from starting if the PIR was activated when the PICAXE was turned on.

...and their values.
The value isn't important, but it needs to be something large (>1k). 10k is the most common choice. However you don't need this as you can activate an internal pull-up resistor on the pin by using the pullup command. The internal resistor means you don't need one externally.
 
Top