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

Thread Starter

thebeephaha

Joined Dec 9, 2013
6
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:

wayneh

Joined Sep 9, 2010
17,496
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.
 

Thread Starter

thebeephaha

Joined Dec 9, 2013
6
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.
 

shteii01

Joined Feb 19, 2010
4,644
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?
 

Thread Starter

thebeephaha

Joined Dec 9, 2013
6
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:



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.
 

Alec_t

Joined Sep 17, 2013
14,280
I agree with Wayneh: the PWM output won't know a MOSFET is monitoring it.

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

shteii01

Joined Feb 19, 2010
4,644
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:

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.
How many volts do you need to trigger the relay?
 

Thread Starter

thebeephaha

Joined Dec 9, 2013
6
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
 

Thread Starter

thebeephaha

Joined Dec 9, 2013
6
Opto-isolator or relay
Opto isolator, with a high value resistor. Look at hcpl4731
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?

 
Last edited:

inwo

Joined Nov 7, 2013
2,419
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
What value base resistor?
 
Top