Using a momentary switch that needs18V DC

Hello, I am trying to use an old 18V DC crosswalk button to power a 120V light with Arduino. I know how to code and wire a circuit using a regular 5V push button to the Arduino and make it control a relay to turn on a 120V light, but I am stuck because the crosswalk button can only close the circuit if the voltage is 18V DC. Do I need to use another relay for the crosswalk button?

Attached is a schematic of the circuit using a regular 5V pushbutton.

Thanks!

No, you just need a transistor to sink the 18V current thru the relay to energize it.

So: 18V to coil '+', coil '-' to NPN collector, emitter to Gnd.

Arduino pin to 150 ohm-to-270 ohm resistor, resistor to base of NPN.

18V supply Gnd to Arduino Gnd.
Diode (1N4001 type) from coil '-' (anode) to coil '+' (cathode) so that when the relay is de-energizing, any current it generates is dissipated back into supply and coil '+' and does not damage the transistor.

When output pin goes high, current is supplied to the base, the transistor conducts and relay contact change.
(usually from C - NC to C - NO).

but I am stuck because the crosswalk button can only close the circuit if the voltage is 18V DC

Curious, what it is about the 18V button that makes it only work with 18V? It it more than a simple physical button?

JohnRob:
Curious, what it is about the 18V button that makes it only work with 18V? It it more than a simple physical button?

There must be an integrated circuit inside of the button for when it is depressed it beeps and an led turns on. I found out on the manufacturers website that it needs 18 V.

CrossRoads:
No, you just need a transistor to sink the 18V current thru the relay to energize it.

So: 18V to coil ‘+’, coil ‘-’ to NPN collector, emitter to Gnd.

Arduino pin to 150 ohm-to-270 ohm resistor, resistor to base of NPN.

18V supply Gnd to Arduino Gnd.
Diode (1N4001 type) from coil ‘-’ (anode) to coil ‘+’ (cathode) so that when the relay is de-energizing, any current it generates is dissipated back into supply and coil ‘+’ and does not damage the transistor.

When output pin goes high, current is supplied to the base, the transistor conducts and relay contact change.
(usually from C - NC to C - NO).

So then referring back to the original diagram, I would replace the push button with a second relay, a transistor, diode and resistor? Then connect the two wires from the crosswalk button to the C and NO on the second relay?

harrye00:
There must be an integrated circuit inside of the button for when it is depressed it beeps and an led turns on. I found out on the manufacturers website that it needs 18 V.

OK, now you cannot get any sensible answers here unless you reveal the URL of the manufacturer's website for this particular part.

It is just silly to ask a question without giving the necessary detail! :roll_eyes:

harrye00:
There must be an integrated circuit inside of the button for when it is depressed it beeps and an led turns on. I found out on the manufacturers website that it needs 18 V.

The first rule of asking questions about hardware is to provide details of the hardware. Post the full details please. That means a link to that website and any relevant datasheet.

Paul__B:
OK, now you cannot get any sensible answers here unless you reveal the URL of the manufacturer's website for this particular part.

It is just silly to ask a question without giving the necessary detail! :roll_eyes:

MarkT:
The first rule of asking questions about hardware is to provide details of the hardware. Post the full details please. That means a link to that website and any relevant datasheet.

Sorry, I'm new to the forum.

Here's the link:

harrye00:
Sorry, I'm new to the forum.

Here's the link:
https://polara.com/_assets/BDSP-014_CutSheet.pdf

Thank you for supplying the link. Now we all know something about your switch. But you have to tell us if your switch is the momentary action switch or the continuous action switch. How you connect it and how you program for it will be different.

You picked 18 volts DC for operation. Why? Did you try 12 volts DC? Did you try 9 volts DC? Finally, does your old switch actually operate?

Paul

This is a fascinating piece of hardware, to say the least!

It appears that it is designed to derive power when "pressed", to flash the LED and not only to actuate the buzzer (apparently the same element as the pressure sensor itself, specified to survive a hammer strike!) on pressure but to store charge to actuate it on release as well, or else at least to actuate it prior to breaking the circuit.

While it may operate on a lesser voltage, the datasheet does imply that it requires 18 V - and 18 mA - for correct operation so there may be value in providing exactly that.

So the necessary circuit may be - an 18 V supply, a 270 Ohm resistor from Arduino pin to ground, a 720 Ohm (half watt) resistor from that pin to the button and the button to the 18 V supply. You might wish to add a 10k resistor from the common of those two resistors to the Arduino pin for protection.

Alternately, connect the button to ground, feed the 18 V to it with a 1k half watt resistor, connect a voltage divider of 33k to the button and 10k to ground with the common going to the Arduino input. That sounds more appropriate. The datasheet suggests that the button does not care about the polarity of its connections, presumably because it incorporates a bridge rectifier whose voltage drop is part of the 18 V requirement. :grinning:

Paul__B:
This is a fascinating piece of hardware, to say the least!

It appears that it is designed to derive power when “pressed”, to flash the LED and not only to actuate the buzzer (apparently the same element as the pressure sensor itself, specified to survive a hammer strike!) on pressure but to store charge to actuate it on release as well, or else at least to actuate it prior to breaking the circuit.

While it may operate on a lesser voltage, the datasheet does imply that it requires 18 V - and 18 mA - for correct operation so there may be value in providing exactly that.

So the necessary circuit may be - an 18 V supply, a 270 Ohm resistor from Arduino pin to ground, a 720 Ohm (half watt) resistor from that pin to the button and the button to the 18 V supply. You might wish to add a 10k resistor from the common of those two resistors to the Arduino pin for protection.

Alternately, connect the button to ground, feed the 18 V to it with a 1k half watt resistor, connect a voltage divider of 33k to the button and 10k to ground with the common going to the Arduino input. That sounds more appropriate. The datasheet suggests that the button does not care about the polarity of its connections, presumably because it incorporates a bridge rectifier whose voltage drop is part of the 18 V requirement. :grinning:

Thank you very much for the detailed reply. I just want to clarify that I am assembling the voltage divider correctly. I made a circuit diagram and attached it to this post. Does it look correct?

Option 2.jpg
Err, no!

Let me see what I can do ...

Paul__B:
While it may operate on a lesser voltage, the datasheet does imply that it requires 18 V - and 18 mA - for correct operation so there may be value in providing exactly that.

Not if you read this line:

Operating Voltage:   12-36 VDC, 9-25 VAC RMS (18 VDC Typ.)

or this one:

Maximum “On” Current:   350 mA (over-current protected) Typ.

Let me see what I can do ...

[/quote]

Just made the circuit. This works great! Thank you so much!

Bulldog 3 push button working!_2.mov.zip (1.48 MB)