09-08-2014 08:39 AM - edited 09-15-2014 04:58 PM
Level of electrical experience required: medium low
Many sensors available on the market have an active high output or in other words when the sensor is triggered the output of the sensor turns high (Logic 1 or TTL 5VDC). Unfortunately the WeMo Maker's input pin "S" is triggered on an active low meaning when a 0VDC is applied at the input pin. Here are two possible solutions to work around this limitation:
1) Relay 5VDC SPST relay NO - This method uses a relay (such as G5LA-14 DC5) with the output pins attached between the ground pin of the WeMo and the other to the signal pin "s" and the input of the relay is wired to the output of the sensor (for example a PIR motion sensor). This type of relay is normally an open circuit between the two terminals. When a 5 VDC or TTL high signal is applied to the input of the relay the coil is activated and closes the circuit between the ground pin and the signal pin thus triggering the WeMo.
Diagram taken from datasheet
If you don't like soldering the below solution is a better option. It's a relay on a PCB that can be hard wired to the circuit. low cost, no PCB required.
2) Using a TTL inverter circuit - This method used a IC for example TC7SET04FU,LJ(CT which inverts the signal. So when a high is applied to the circuit input (Pin 2) a low (or 0VDC) is seen at the output (Pin 4).
Here's a link to one IC that could work and is low cost:
Picture of the inverter circuit taken from their datasheet:
09-09-2014 07:33 AM
This is a good explaination on how to get it working. But I'm still a bit confused - the WemoMaker senses active low and active high, and reports either condition to the Belkin app (you can see it in the app screen itself when you trigger them manually). You can create a rule there for "sensor not triggered". I'm able to use both the triggered and not triggered states easily in WemoManager rules - they work fine and easily verified by moving the jumper to S from the + to - terminals, and I've used them to trigger the maker switch and many of my other switches. What is it the belkin app is missing that keeps active high sensors from working out of the box?
A relay is probably overkill for such a low load... a buffer or invertor like you've suggested is much cheaper, quieter, and more reliable since it's solid state. Anything from the 74LSxx family would be a good choice too, perfectly compatible, and would give lots of creative ways to condition the sensor output.
For sensors that run on other than 5V an opto-coupler is a safer choice to make sure nothing more than 5V is ever applied to the input.
09-09-2014 10:53 AM
The implimentation is in the hardware. By design in order to switch states, the "Sensor" that is connected to the WeMo maker must drive the signal to "GND" in order to change state.
09-09-2014 03:02 PM
I've modified the original post to include a low cost relay PCB board for those who don't want to solder anything.
Maybe another way to think about it is that it's a delta sensor meaning it detects change in the input. I hear what you're saying, that it's not like the traditional microcontroller or PLC input. It would be nice to be able to change the logic from the app with the configuration. Perhaps that's an idea for a future revision. If someone understands one point of view they can select whichever configuration that works best for them. Perhaps a built in circuit to switch between the two with software would be a solution although, on the other hand I would rather have an A/D than that.
Once you understand how to work around this input limitation you can start working with what you have and start your project.
09-09-2014 09:41 PM
I'm sorry, I must be really thick... Won't the Wemo app simply show and act on "not triggered" when the sensor triggers by going high (active), and the app will show and act on "triggered" when the sensor goes low (inactive)? Why do I need to reverse the sense of the sensor? Why can't I just invert my thinking about the text and my rules and skip adding any components? What am I missing?
09-10-2014 08:23 PM
Does your sensor short the output to ground when it's in the "not triggered" state or is it equivalent to a open circuit?
09-10-2014 08:48 PM - edited 09-10-2014 08:52 PM
One last suggestion look into how the open collector circuit works. This might help you better understand it.
09-11-2014 06:57 AM
So this is an electronics concern only? I thought you were pointing out a problem with Belkin's app. Not to worry, I know exactly how an open collector circuit works. If your sensors use an open collector output you absolutely do not need to use an inverter, nor should you need one for that 5V PIR board that was the genisis of this discussion.
You may be making this more complicated than it needs to be. The only time you need a conditioner circuit is if you need to adapt to a different trigger level (to pick the right temperature from an analog sensor for example), or if you need to isolate the Maker electrically because you're using something other than a 5V sensor, or if theres some other problem like a very noisy environment.
Perhaps you can point me to the sensor you're planning to use - I'll be happy to analyse it for you.
09-11-2014 09:04 AM
I'm not sure what's going on here. In your earlier posts you mentioned you didn't understand the issue. Why are wanting to analyze my sensor if your asking all of these questions? Perhaps something was lost in translation?
09-11-2014 06:40 PM
Ah, it's 'cause I figured there must be something I didn't understand about the belkin app since I don't use it myself. Especially after I'd explained in the earlier thread that the PIR was probably going to work fine connected straight up. It shouldn't have been about the electronics as the maker interface is pretty simple.
As I'm an electrical engineer I can probably help with analysing the sensors - I understand this stuff reasonably well... Anyone that needs help can post a link to their sensor spec's and I should be able to figure out what's needed to make it work.
BTW there is one other case in addition to the ones I posted above. It gets a little complicated so I didn't bother to mention it - sensors that change load/current rather than voltage - thermisistors for example. Those will likely need some sort of conditioning/trigger, if they come up I'll explain how to use them.