• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
duration switch protocol
#1
Since I'm using the doorbell notification I'm having false positives using the pilight gpio switch protocol.
The pin that is read is already pulled to ground with a resistor so it doesn't float, but somehow it still seems to trigger and pilight takes action.

Any ideas how to solve this or how to realise (an alternative for) this: ?

"IF ReadDoorbell.state IS on FOR X milliseconds THEN switch DEVICE NotificationCamshot TO running"
 
Reply
#2
You can add an intermediate generic_switch that you turn on after one second to buffer these changes. When a new command is received, the previous execution will be canceled.
 
Reply
#3
Maybe I dont understand your alternative sollution, but this is what I ment:

I mean, when the doorbell is pushed x milliseconds long it should trigger.
With this I hope it doesnt trigger on a unexpected spike caused by interference on the pin.
 
Reply
#4
(01-08-2017, 11:36 AM)creamers Wrote: Since I'm using the doorbell notification I'm having false positives using the pilight gpio switch protocol.
The pin that is read is already pulled to ground with a resistor so it doesn't float, but somehow it still seems to trigger and pilight takes action.

Any ideas how to solve this or how to realise (an alternative for) this: ?
It is not good design policy to rely on a design requiring to pull an input to ground to guarantee a floating condition.
Reason:
On TTL designs (other logic families have similar requirements) output current capabilities of the output driver is limited and the pull down resistors adds to that load. The maximum tolorable voltage level to guarantee 100% that the output enforces a logical LOW condition on its output line is 0.4V, despite that typically 0.8V are still sufficient, and 2.7V to guarantee 100% that the output enforces a logical HIGH condition. Have a look at your particular logic family.

OC (open collector) outputs do not require floating states, depending on the polarity of the transistor (pnp or npn) you use them to either actively pull the voltage to ground or to +V (note that your controlling sensor also should be a corresponding pnp or npn type).

In short, i believe you have an improper digital design layout in particular with regard to overvoltage conditions caused by your devices (capacitors in parallel to your contacts plus capacitors and diodes in parallel to your relais coils) and improper spike supression on the grounding rod (star grounding, 100nF ceramic capacitors on all chips plus multiple 47µF tantalum capacitors for the supply on the PCB, voltage regulators ....), in order to suppress spikes on your ground wire triggering false readings.
 
Reply
#5
Thanks for you reaction wo-rasp , but I dont know enough about electronics to understand it fully but I did somehow understand what you meant Wink

I searched some more and it appears that long wires (with low voltage signals) are prone to picking up interference.

This thread tells me on the end of the conversation that I need to put a 0.1uF capacitor between the gpio pin and ground.

Do you agree that this could work out? Is it possible to connect a 0.01uF capacitor from pin to ground without any other resistor and not short-circuit and fry my pi Smile ?

ps, I have 22pF lying around but I guess those are to 'small'?
 
Reply
#6
@wo-rasp I found a 10uF capacitor , could that work instead of a 0.1uF that is adviced?
 
Reply
#7
10µF is typically not a ceramic one.

Why ceramic, why tantalum ? They are both electrostatic capacitors, (no chemical reaction) thus the internal resistor parameter is low at ultra high frequencies and thus delivering/absorbing current at high frequencies and reducing the "delta i/delta t" time.

Regular capacitors behave well in the frequency range of kHz, Tantalum in the frequence range of MHz and ceramic capacitors in the range above.

Thus you use 100nF ceramic next to the chip with wires as short as possible (low impedance), 4.7µF along the GND/+V and individual voltage regulators and higher capacitance values next to the power supply.

Important is to separate GND for the power supply line from GND for data and to use a star configuration to connect the two.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  skipping overridden action switch do1eh 2 617 01-19-2019, 05:25 PM
Last Post: do1eh
  Can't switch Relay device by rules: Error switch.lua:77 wobbi 6 964 07-31-2018, 06:25 AM
Last Post: curlymo
  Send on command when switch is already "on" joshovki 1 574 01-28-2018, 11:27 PM
Last Post: curlymo
  Problem with a Rule for a One Button Switch martin-dj 1 1,274 03-06-2017, 12:01 PM
Last Post: pilino1234
  action: switch Niek 54 20,008 03-31-2016, 06:24 PM
Last Post: jjj
  [Solved] Trying to switch my light using datetime manmetdehamer 2 2,304 11-25-2015, 01:33 PM
Last Post: manmetdehamer
  multiple use of ping protocol bastelwastel 3 2,125 10-11-2015, 02:42 AM
Last Post: wo_rasp
  Switch device multiple times do1eh 0 1,338 08-07-2015, 10:31 PM
Last Post: do1eh
Question [SOLVED] - How to switch a device 15 minutes after sunset with newest nightly Seebueb 8 4,447 08-02-2015, 11:03 AM
Last Post: curatio
  remote switch to off multiple times koos147 0 2,872 04-28-2015, 06:53 PM
Last Post: koos147

Forum Jump:


Browsing: 1 Guest(s)