# Calculate R+ RC to stretch pulse from hall effect output

I have a Optek OH090U hall-effect.

I am trying to stretch a pulsed output by adding an RC circuit. Basically I want the output to be on (low) as long as there is a pulsing of the magnetic field and high when not pulsing. The present value for my pull up resistor is 960 ohms (24V/25mA = 960). Which provides the wave shown. My magnetic pulse a 70/30 duty cycle at 10Hz (65ms high, 35ms low). The output is normally high. With no magnetic field (stopped), the output transistor is OFF = +24V (pulled up by pull up resistor). Specs on downstream device's input: Input voltage 4.25-26.4 V Input resistance 5.4 kΩ

I would like to add a parallel RC in series with the pull up as follows:

Question: How to calculate R2 & C2 to stretch the 65ms pulse? Thanks in advance!

• "Basically I want the output to be on (low) as long as there is a pulse and high when not." Well then you don't want a pulse extender - you just use a pull-up resistor. Please clarify your original post. – Transistor Jul 21 '16 at 15:25
• OK, I see the edit and understand. We need to know (1) the threshold (switchover) voltage of the device you are feeding, (2) its input impedance and (3) the maximum input voltage. – Transistor Jul 21 '16 at 15:49
• I am somewhat new to this forum. Should I be replying to your comment or adding the reply to original post? Specs on device's input: Input voltage 4.25-26.4 V Input resistance 5.4 kΩ – JoeChiphead Jul 21 '16 at 15:55
• Best to put all the details in the original question so that anyone else answering has all the details in one place and doesn't have to trawl through the comments. It's a good idea then to notify whoever asked for the additional info in the comments. Pop an @ in front of their name and it will show up in their messages. – Transistor Jul 21 '16 at 16:19
• Good work with the schematic but you don't have to screen grab it. Just hit save and it's automatically embedded in your post and, best of all, can be edited later. – Transistor Jul 21 '16 at 18:25

This is an incomplete answer but the thought process may help.

There are very many details left out of your question including

• the threshold (switchover) voltage of the device you are feeding,
• its input impedance
• the maximum input voltage.

But most importantly, you haven't specified whether the device can stop pulsing in the on or off state or if it could be either. This affects the solution.

simulate this circuit – Schematic created using CircuitLab

Figure 1. Typical PLC interface for current sinking sensor to current sourcing input with C1 providing extended "low" time. The problem with this circuit is that when Q1 turns on the pulse of current from C1 may damage the transistor.

If this is the situation you are trying to address and the sensor stops with Q1 turned off then the solution may be very simple. Q1 will discharge C every time Q1 turns on and will light D1. When Q1 turns off R1 will recharge C and D1 will turn off. Proceed as follows:

• Switch your multimeter to DC mA and measure the current from PLC input to ground. This will tell you the rate that C1 will be charged at. It will also, should you so wish, enable you to calculate the input resistance of the PLC.
• Using the relationship $I = C \frac {dv}{dt}$ we can calculate the capacitor value required to limit the rise of voltage as follows: $$C = \frac {I} {\frac {dv}{dt}}$$

e.g. We measured the source current as 10 mA and we want the voltage to rise at 5 V / 100 ms then

$$C = \frac {10m} {\frac {5}{100m}} = \frac {10m \times 100m}{5} = 200~\mu$$

So something about 200 uF would do the trick.

Update (after blowing the OP's sensor).

simulate this circuit

Figure 2. (a) R2 will limit the current but will raise the "low" voltage on the PLC input. (b) Moving R2 and addition of D3 solves the problem.

The problem we have seen with the damaged sensor is that C1 charges up to 24 V and delivers a high current pulse through Q1 when the sensor turns on. To limit the current to < 25 mA we need to add a 1k resistor. If we try this as shown in Figure 2a we will find that the minimum voltage on the PLC input will be about 4 V due to the potential divider effect of R1 and R2. This doesn't give us a robust operating margin and will mess up the capacitor calculations.

• When Q1 turns on it pulls the PLC input low immediately. The PLC will source $I = \frac {V}{R} = \frac {22}{5k6} = 4~mA$ (allowing 2 V for the LED voltage drop).
• It will also discharge C2 through R4. R4 has been increased to 1k2 to reduce the max current from C2 to < 20 mA so that the total through Q1 < 25 mA. $R = \frac {V}{I} = \frac {24}{20m} = 1k2$.
• C2 will discharge by 99% after five RC time constants. For example, with 200 uF $T_{DISC} = 5 \tau = 5 RC = 5 \times 1k2 \times 200u = 1.2~ms$

Unfortunately this is too long for your application.

In retrospect I suspect a 555-based pulse extender may be a better option. The standard 555 only works up to 15 V. If you use a 12 V Zener diode between the +24 V power rail and the 555 you might be able to keep the component count low.

• I Updated the original post with downstream input device specs. – JoeChiphead Jul 21 '16 at 17:30
• Thanks. I think there is enough information in my answer for you to recalculate with your values. Consider my point about the stop condition - on / off / either. – Transistor Jul 21 '16 at 17:34
• You are showing the capacitor across the transistor output. Why wouldn't I put it in series with the pull up? – JoeChiphead Jul 21 '16 at 17:57
• The pull-up is in the PLC. If you put C in series with the pull-up then no DC can flow. The capacitor will charge once and stay there. – Transistor Jul 21 '16 at 18:03
• I have a 960 ohm pull up resistor as recommended by the the hall effect data sheet. – JoeChiphead Jul 21 '16 at 18:10