Main Site Documentation

Spider input from 30V DC - how to?


Hi there, I am pretty safe in the software, and love the hardware-modules to play with, but not all hardware-modules are gadgeteer ready.

I have a sensor (Adpro-45 from that is a IR motion-sensor, I need to connect that to the FEZ Spider.

It doesnt have a 3,3-5V digital output pin, so I need the breakout-module and then some …?

There is the following outputs from the sensor:

  1. Alarm Relay Output SPST rated 30 V DC, max. 100 mA
  2. Transistor Output Open collector NPN, 30 V DC, max. 50 mA
  3. RS485 (need to ask for protocol)

Any of you hardware-dudes that can give me a few hints?



These ar the maximum voltages wich the outputs can handle.

  1. A relay output should have no voltages, just a simple switch. To use it you must use extrernal voltage (5V, 3.3V) and a pullup or pulldown resistor. Take a look at the schematics for the buttons used at GHI modules (UP, DOWN, RESET), same principle

  2. Same like relay switch, but with transistor.

My personal favorite. Needs some knowledge about RS485 hardware and the used protocol, but most possibilities for setup, alarm signals and more

(Sorry about my limited english :frowning: )


Thanks Lutz

Alright, took a look at the GHI Button schematics, but it’s unclear to me what you mean.

Is it possible to wire this up with a standard module?


Connect the relay switch parallel to the button.

Manual page 17 :

The relay switch is between pin6 and 5 of your sensor.
Then you just connect Sensor-Pin6 with button B1-Pin1 and Sensor-Pin5 with button B1-Pin3.


The transistor output is collector pin4 and ground pin2 of your sensor.
Then you just connect Sensor-Pin4 with button B1-Pin1 and Sensor-Pin2 with button B1-Pin3. (which is also ground)

Current is in both examples : I = U / R1 => 3,3V / 10KOhm = 0.33mA
Hmmm… thats maybe not enough for the transistor… 1KOhm might be better if you choose the transistor.

EDIT : Manual found “PRO-45D / PRO-45DH install manual (screen version) 10649_09”


Open Collector basically means the output is pulled to ground when active:

As Lutz said, you’ll need a pull-up resistor to 3.3V to be able to use the output. I think he suggested the GHI button module, since it already has the Gadgeteer socket + pull-up resistor. You’ll need to solder a wire from your sensor’s GND pin to either one of the button’s pins that are closest to the GHI logo. Then, you solder the open-collector output to either of the other two pins of the button. You may need to swap out R1 for a smaller value (as Lutz said), but I’d try it first and see if it works.


Here’s a graphic I made to illustrate this:


Wauw guys, this is magnificent, it seems to be a little non-standard to use a button and re-solder stuff on it, to connect a sensor.

But, its a creative way forward, I have the button and are ready solder.

I have given Lutz the the answer-credit, I tried marking both, but only one post can be the answer. So, thanks jay for your really nice drawing, which helped a lot!

BTW, I am still interested in other solutions for the challenge.


Hmm… not really

What other solution ?
You need an input port to get your signal into your controller. Relay and transistor are working just like a button. You can take a deeper look into the schematics of your controller board to find your pin, add the pullup resistor and the wires… or simple add a gadgeteer button and add 2 wires to it.
The advantage of using a gadgeteer button : You can test your software without a working sensor by just pressing the button for simulation. (OK, its a little bit more complicated : sensor manual said relay switch is active OPEN, so you must press the button the whole time and only relaese it when…)


OK, i decided to try the breakout module, and fiddle a little with a drawing, for you to see.

I am really not sure if this will work. Does it make sense?

I am not sure if I should choose the relay circuit instead of the open collector.


Looks good to me. I assume that the “battery” is something else, and has nothing to do with your Gadgeteer board?

Obviously, if 30V were to ever come in contact with any pin on a Gadgeteer board, it’d be fried immediately.


Battery is a 12V standard car-battery. But since you ask, I am re-thinking that the relay output pins should be used insted?