Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


Question

Posted

I have been struggling for the past few days to make the UBS work with a very basic motion sensor. The UBS and the motion sensor are hooked up to a 12v adapter. IN1 is connected to the LOAD terminal of the motion sensor. I've setup Parameter 3 in HC2 to be a Normal Open

 

My problem is that the UBS is always indicating a breach. It never goes into a non-motion state... 

 

The only way I can force the UBS into non-motion state is by connecting IN1 to GND on the motion sensor.

 

What I've noticed is that the voltage on IN1 is 2.75v by default. This is also the voltage on the LOAD terminal when there is no motion.

 

So what I'm guessing is that because the motion sensor doesn't connect LOAD to GND in a non-motion state the UBS never goes into a non-motion state... The answer is probably pretty simple but what should I do in this case to make the UBS work in this setup?

 

I'm 100% sure the motion sensor work because I've check with a multimeter what happens on the LOAD terminal when it switches. The voltage on the LOAD terminal rises to 12.5v.

 

The setup is very basic and the attached photo should tell whole story. 

Please login or register to see this attachment.

13 answers to this question

Recommended Posts

  • 0
Posted

Please try this. Connect the output of the Motion Sensor to a 47 k resistor, that goes to the base a NPN transistor. Connect the emitter to GND and the collector to IN1. I posted a schematic to a similar problem here:

Please login or register to see this link.

Let me know how it goes...

  • 0
  • Inquirer
  • Posted

    Thanks Peter, I was suspecting that I would need to pull the 2.7v to GND somehow. I'll order some NPN transistors and go for route like you described.

     

    In your other post you mention that it would also be possible using a 12v relay. I have one of those laying around. How would that setup look like as I don't see right away?

     

    Still curious why this is not just a software parameters as it's easy for fibaro to detect when IN1 is high and when it's at the base value.

    • 0
    Posted

    Regarding the relay. You put the relay coil on the motion sensor (hoping that it can deliver enough current to switch the releay reliably). Then connect the output of the relay (the NO side) to the IN1 and the common of the relay output to the ground. But don't do that yet!

    If the manual of the motion sensor does not specifically say that it can drive a relay, then you have to be careful. A relay on an "open collector" can destroy that output. So you need to put a universal diode "in reverse" in parallel with the relay coil. A diode like 1n4007 or 1n4148 will do. you connect the side with the ring (on the diode body) to the relay coil and the output of the sensor. The other side goes to the GND of the sensor and the other connection of the relay coil.

    Please login or register to see this link.

    Nothing in this world is impossible... But the IN1 was designed to detect the open/close of a switch (dry contact), as is often used with alarm systems. So There is a 1k pull up resistor to 2,7 V and a trigger point (with some hysteresis) around 0,6 V. So if you can pull current out of IN1, below 0,5 V the module registers a closed switch. If your device cannot *pull* the pin below that voltage, you always see "open". So... wouldn't it be possible to design an input stage with switchable resistor? One that goes tho gnd instead of 2,7 V? A friend of mine works in that business and he thinks it all depends on expected sales volume. Maybe making the resistor switchable between pull down and pull up you're is a good idea for the next version of the UBS

    Please login or register to see this image.

    /emoticons/default_icon_smile.gif" alt=":-)" />

    • 0
  • Inquirer
  • Posted

    There relay I have is a really basic module like

    Please login or register to see this link.

     (just realized that this relay needs to be driven by 5v so it won't work). I guess that this relay can be driven with very little power as it's meant for usage with the output pins of a microcontroller. And the only diodes I currently have laying around here are LED... 

     

    Regarding the transistor. I have to brush up my knowledge here. Not sure how to select the right transistor. You use the BC547. I've ordered a pack with a bunch of different transistors so I have some spare ones for future use. The pack contains the 

    Please login or register to see this link.

    the 

    Please login or register to see this link.

    I think both should work too right? 

     

    The point you make about the switchable pull up/down comes very natural for anyone who has been playing around with Arduinos. The pull up/down resistors are built right into the MCU there which is very useful.

     

    Thanks for the help so far!

    • 0
    Posted

    An LED isn't a great diode. ... It would work on a miniature relay but there are diode kits e.g. from Velleman that contain better devices. Anyway, to me it looks like the relay you have is indeed equipped with a diode or even some active circuitry.

    The 2n3904 fits your purpose. The S9018 isn't quite as good because of its low CE voltage and other specifications. That 's because it is a high frequency transistor. It will probably work too, but it isn't first choice.

    I use an Arduino too. Nice to tinker with. ...

    • 0
  • Inquirer
  • Posted

    Next to the transistor pack I've ordered a 12v version of that relay. You never know when it might come in handy.

     

    If you like the arduino you'll love the ESP8266. Give it a try if you haven't done that already.

    • 0
  • Inquirer
  • Posted

    Please try this. Connect the output of the Motion Sensor to a 47 k resistor, that goes to the base a NPN transistor. Connect the emitter to GND and the collector to IN1. I posted a schematic to a similar problem here:

    Please login or register to see this link.

    Let me know how it goes...

     

    I've hooked up the 2N3904 transistor and the 47K resistor today like you described but the setup unfortunately doesn't work...

     

    This is what happens:

    Motion sensor HIGH > IN1 = 1.1v

    Motion sensor LOW > IN1 = 2.7v

     

    Based on what we've discussed my guess is that IN1 should drop to GND when the LOAD is HIGH and that is not happening.

     

    I've probably missed something very simple.

    • 0
    Posted

    Close, but no joy... Aha. Maybe your transistor has a lower gain than mine (the BC54X series is pretty good). Can you try a lower base resistor? 4k7 or even 1k. What's the voltage output of the sensor (HIGH)?

    • 0
    Posted

    Or... maybe you've switched C and E. The E goes to ground. Just try both configurations, it won't destroy the transistor (at these operating conditions).

    • 0
  • Inquirer
  • Posted

    Close, but no joy... Aha. Maybe your transistor has a lower gain than mine (the BC54X series is pretty good). Can you try a lower base resistor? 4k7 or even 1k. What's the voltage output of the sensor (HIGH)?

     

    The voltage on the output of the sensor is 12.5v.

     

    The transistor does work in some way because the voltage changes on IN1 from 2.7v to 1.1v... But I would suspect that this would be the other way around actually. That the voltage on IN1 would drop when the sensor is LOW not when it's HIGH.

     

    I'm pretty sure that the C and E are connected correctly. You should be able to see that on the photo that I've attached in the previous message.

     

    So the best thing I can try is a lower value resistor?

    • 0
    Posted

    I don't see a photograph, maybe you uploaded it but didn't attach it to the message? But I trust you!

     

    As you've noticed, the transistor works as an inverter, and that's how it's meant to work. Only this configuration allows you to get the voltage on IN1 to get below 0.5 V. That's to get a "sensor closed" from UBS (in a reliable way). If you used a PNP transistor instead, you'd get a non-inverting buffer *but* that would not allow IN1 to go low enough. That may work for other sensors, but not for the UBS.

     

    So try to swap C and E and if that doesn't help please try lower resistor values.

    • 0
  • Inquirer
  • Posted

    Awesome, switching C and E did the trick (I didn't have to change the resistor). Thanks Peter!

    • 0
    Posted

    Glad I could help! Have fun with you project!

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...