Use PWM signal for trigger. Can't have it be grounded.

Discussion in 'The Projects Forum' started by thebeephaha, Dec 9, 2013.

  1. thebeephaha

    Thread Starter New Member

    Dec 9, 2013
    6
    0
    I have a device which puts out a 30Hz PWM 5V signal, if the signal is grounded it triggers the device to switch to a different mode of operation.

    I need to be able to use that 5V PWM signal to trigger a relay on a common ground without the device knowing that the PWM signal is being grounded so that it does not switch modes.

    I have already figured out how to convert the PWM pulse to a solid voltage by means of an RC low pass filter, which I can then use to turn on a transistor to trigger my relay, but of course then the device switches modes as the signal is being grounded. This is where I am currently stuck.

    Ideas?
     
    Last edited: Dec 9, 2013
  2. MikeML

    AAC Fanatic!

    Oct 2, 2009
    5,450
    1,066
    Opto-isolator or relay
     
  3. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,397
    497
    I don't get it.

    Use PWM for the relay bit.
    Use a different digital i/o pin for mode switching.
     
  4. wayneh

    Expert

    Sep 9, 2010
    12,153
    3,059
    So your PWM source changes mode if there is too great a load on the output? What is the critical load amount?

    A logic level MOSFET would present virtually zero load to your PWM signal, and may take the place of your relay at the same time if you're switching a DC load.
     
    inwo likes this.
  5. thebeephaha

    Thread Starter New Member

    Dec 9, 2013
    6
    0
    Maybe let me rephrase it?

    The device constantly outputs a PWM signal but the circuit is open. If you close the circuit, ground it, then the devices internal IC logic switches some software behavior.

    I need to make a circuit that turns on a relay when my device is on, the only thing I can tap into to use as a trigger is this PWM signal. The issue is, if I use the PWM signal and the devices built in ground to complete the circuit it switches modes as the circuit is now closed.

    I basically need to use this PWM signal and the ground from the device to complete a circuit, without the device knowing so.
     
  6. MaxHeadRoom

    Expert

    Jul 18, 2013
    10,565
    2,379
    You may want to post some kind of graphic indication of exactly what devices you have?
    Max.
     
  7. thebeephaha

    Thread Starter New Member

    Dec 9, 2013
    6
    0
    I can try to make a diagram if needed.
     
  8. wayneh

    Expert

    Sep 9, 2010
    12,153
    3,059
    It is. There's really no such thing as a signal with infinite impedance.
     
  9. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,397
    497
    The first thing I don't understand is the PWM hardware that you have.

    In my, very limited, experience PWM is a series of pulses. These pulses are sent out...

    So you got a zero. Which is equivalent to ground? And you say as soon as you get zero the hardware switches the mode of operation. Is that what happens? I mean, that is very strange PWM hardware. With the microcontroller that I worked with I had to set PMW hardware as output, not input. Since it was set as output, it did not care what the input was. It just happily sent out the up and down pulses. Your hardware act as both? It is set to send out pulses, but it also watches those pulses and when the pulse gets to zero it takes that as input and switches mode of operation?
     
  10. thebeephaha

    Thread Starter New Member

    Dec 9, 2013
    6
    0
    I'm not sure how the device works, I'm sort of backwards engineering / hacking it to control an external relay. Obviously not something it was designed to do.

    Here is a stupid simple diagram of how I was able to make the signal trigger a relay successfully:

    [​IMG]

    The issue is, then the PWM signal is then grounded, and my device senses this and the internal logic switches which I don't want it to do.

    I need to somehow use that PWM signal to trigger my relay, without the device realizing I've done so.
     
  11. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,809
    1,105
    I agree with Wayneh: the PWM output won't know a MOSFET is monitoring it.

    Edit: What voltage/current does the relay coil require?
     
  12. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,397
    497
    How many volts do you need to trigger the relay?
     
  13. thebeephaha

    Thread Starter New Member

    Dec 9, 2013
    6
    0
    I'm actually using an 2N3904 transistor between the low pass and the relay (5v) otherwise there is not enough current to energize the coil. So I've got that covered.

    I'm assuming if I use a MOSFET, it will need to come before the RC low pass filter in my diagram.

    PWM --> MOSFET --> RC low pass --> transistor --> relay coil --> ground
     
  14. strantor

    AAC Fanatic!

    Oct 3, 2010
    4,302
    1,988
    Opto isolator, with a high value resistor. Look at hcpl4731
     
  15. thebeephaha

    Thread Starter New Member

    Dec 9, 2013
    6
    0
    After some research, I really like how the opto isolator works...

    If I go with this idea, I guess I'll start by finding at what resistance my device no longer switches at (and hope there is enough usable current left) then go with a HCPL-4701 since I don't need the dual channel of the 4731.

    My question is what are "VO" and VB" in this diagram?

    [​IMG]
     
    Last edited: Dec 9, 2013
  16. inwo

    Well-Known Member

    Nov 7, 2013
    2,435
    315
    What value base resistor?
     
Loading...