Results 1 to 9 of 9

Thread: Photo transistor into digital input

  1. #1
    Automated Home Sr Member Alexc's Avatar
    Join Date
    Apr 2013
    Posts
    82

    Default Photo transistor into digital input

    This is a bit of a mixture of threads, but a specific issue and I would appreciate some advice.

    Based on the thread about electricity meters and using the flashing output of the meter, I have some BPW85C photo transistors. As Karam wrote, I have the long lead connected to 0v on an input on a QRH module and the shorter lead into one of the inputs. If I shine a torch directly into the sensor, the input changes state.

    My problem is that I have a neon indicator (now part of hot water controls) and I put the photo transistor up to the neon. I expected it to change state when the neon came on. What actually happened is that the QRH sent a stream of data to Cortex, so much that it crashed the software! It then gave me odd fault reports about my PCU.

    I reset and started again, but the same thing happens. Is it picking something up from the neon - perhaps an induced current? I've disconnected it now.

    So - a few questions...

    1 - is it likely that the transistor is too close to the neon?

    2 - from the thread about electricity meters, is there a better, more sensitive sensor that I should try, perhaps that can be mounted a cm or so from the neon? It is in an enclosed box, so would not receive other light apart from when the neon is on.

    3 - I can't remember whether the bottom LED on my PCU-001 should be permanently on or not?

    Thanks.

  2. #2
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,674

    Default

    If it's a neon, won't it be going on & off fifty times a second ?

  3. #3
    Automated Home Sr Member Alexc's Avatar
    Join Date
    Apr 2013
    Posts
    82

    Default

    Ah! That would explain it!

    Is there a way I can measure over time? Should I try changing the device to a meter pulsing input?

  4. #4
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,674

    Default

    Some sort of filter is needed - onboard the module, before going out on the network ... Not something we've done yet, but imagine there's something there ... The data sheet might be first port of call

  5. #5
    Automated Home Sr Member Alexc's Avatar
    Join Date
    Apr 2013
    Posts
    82

    Default

    Thanks Chris. I guess otherwise the traffic would be too great. What about a capacitor in series with the photo transistor? My electronics isn't good enough to know if this is practical, or what size/type.

    Or should I swap the neon for LED?
    Last edited by Alexc; 11th August 2015 at 12:20 AM.

  6. #6
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,674

    Default

    if you can swap, sounds best - but the voltages driving them will not be the same, so not easy to arrange ...

    wonder if there might be other things that could be used - eg: what's switched on & off ...

  7. #7
    Automated Home Legend Karam's Avatar
    Join Date
    Mar 2005
    Posts
    817

    Default

    There is some internal filtering on the inputs but not so aggressive since they have to be able to pulse count at a fair rate. You can try putting a capacitor across the digital input channel, perhaps something like a 47uF. If (as is likely) polarised then ensure the -ve terminal goes to the 0V terminal. You may have to experiment with the capacitor size as its a tradeoff which depends on the effective resistance of the transistor when it is illuminated and for how long (i.e how much it can discharge the capacitor each cycle).

  8. #8
    Automated Home Sr Member Alexc's Avatar
    Join Date
    Apr 2013
    Posts
    82

    Default

    I added a 47uF (25v) capacitor to the digital input channel, and it cured the problem, without even needing to experiment! Thanks for the advice.
    All working now - when Cortex is calling for hot water, if the temperature has been reached and therefore the cylinder thermostat has kicked in, the 3-port valve energizes the grey wire, the neon comes on, and the digital input reads this as true.

    The other two ways I can think of achieving the same outcome would be either to add another cylinder thermostat to the cylinder and connect that to a digital input, or add a temperature sensor to the tank. As I don't have an analogue module yet, I think this was probably the best way to get to this point. It only costs a couple of pounds too! I'll probably also know if the 3-port valve develops a fault, as Cortex will tell me what's going on.

  9. #9
    Automated Home Legend chris_j_hunter's Avatar
    Join Date
    Dec 2007
    Location
    North Lancashire
    Posts
    1,674

    Default

    well done, good to know, too - we have a few things in the pipeline that might find us doing something similar !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •