PWM on enable output of SN74HC595 shift register

Thread Starter

fieldeng

Joined Nov 1, 2019
15
I am using SN74HC595 serial in-parallel out shift register (https://www.ti.com/lit/ds/symlink/sn74hc595.pdf?ts=1595412667873&ref_url=https%3A%2F%2Fwww.google.com%2F) and each parallel output is connected to the gate of a logic MOSFET.

I would like to regulate the voltage on the gate. In case I connect the enable output pin to ground, the voltage level of the output pins will be Vcc. Do you think this is possible if, instead of grounding the enable output, I connect it to a PWM signal coming from my micro-controller?
 

crutschow

Joined Mar 14, 2008
25,265
I would like to regulate the voltage on the gate. In case I connect the enable output pin to ground, the voltage level of the output pins will be Vcc. Do you think this is possible if, instead of grounding the enable output, I connect it to a PWM signal coming from my micro-controller?
The /OE pin high puts the outputs into an open-circuit condition, so if you want the outputs to go to Vcc when that pin is high (high-impedance output), then put a 10kΩ pullup resistor from each output to Vcc.
 

Thread Starter

fieldeng

Joined Nov 1, 2019
15
What I would like to do is have the outputs to go in a value between 0 and Vcc, and pick this value according to how I set my PWM. I have seen examples where the brightness of LEDs is changed in this way (i.e. here https://lastminuteengineers.com/74hc595-shift-register-arduino-tutorial/). But I am not sure I understand it correctly. I mean I am not sure if the PWM on /OE will change the voltage level of the output to something lower than Vcc.
 

crutschow

Joined Mar 14, 2008
25,265
I am not sure if the PWM on /OE will change the voltage level of the output to something lower than Vcc.
It depends upon whether the outputs have pull-up or pull-down resistors, and what each output state is in when the /OE signal is low.
In any case, to get a "lower voltage" you would need to average the PWM signal with a filter.
Do you want this voltage to appear at the MOSFET gate or at whatever the MOSFET is driving?

You need to more completely explain what you are trying to do instead of giving us bits and pieces, so we don't have to engage in a game of 20 question.
 

djsfantasi

Joined Apr 11, 2010
6,718
What I would like to do is have the outputs to go in a value between 0 and Vcc, and pick this value according to how I set my PWM. I have seen examples where the brightness of LEDs is changed in this way (i.e. here https://lastminuteengineers.com/74hc595-shift-register-arduino-tutorial/). But I am not sure I understand it correctly. I mean I am not sure if the PWM on /OE will change the voltage level of the output to something lower than Vcc.
You cannot use the tri-state output, so as @crutschow stated, you need a pull-up (or pull-down) resistor.

If you PWM OE, then all output pins will change. Is that what you want?

To understand what you’re doing, why are you using the 74HC595 shift register?
 

Thread Starter

fieldeng

Joined Nov 1, 2019
15
This is my block diagram. I want to turn on and off the actuators and in case they are on to regulate the current i on the actuator by adjusting the voltage on the gate.
1595429576511.png
 

Attachments

Papabravo

Joined Feb 24, 2006
14,243
I see absolutely no advantage in putting a voltage on the gate that is not at one of the extremes. It has the possibility of putting the MOSFET into the linear range, raising power consumption and risking damage to the parts. This has to be the "strangest" idea I've heard of in a very long time. If you have a valid reason for doing it; I'd really like to hear it.
 

Thread Starter

fieldeng

Joined Nov 1, 2019
15
I see absolutely no advantage in putting a voltage on the gate that is not at one of the extremes. It has the possibility of putting the MOSFET into the linear range, raising power consumption and risking damage to the parts. This has to be the "strangest" idea I've heard of in a very long time. If you have a valid reason for doing it; I'd really like to hear it.
Thank you for the comment. I would like to connect four types of actuators, each needs a different value of current. All outputs of the shift register will be connected to the same type of actuator. But I might need to test my circuit for the four different types. So, I was thinking to change the PWM instead of having a different hardware implementation for every type of actuator. And I was just wondering if this is possible...
 

Papabravo

Joined Feb 24, 2006
14,243
Wait a minute. You seem to be under the impression that you need to control the amount of current that the actuator takes. Won't the actuator take what it needs without any help from you? It certainly can't take more than it needs.
 

Thread Starter

fieldeng

Joined Nov 1, 2019
15
Wait a minute. You seem to be under the impression that you need to control the amount of current that the actuator takes. Won't the actuator take what it needs without any help from you? It certainly can't take more than it needs.
I am using a specific type of actuator and I have to control its current. It's a basic requirement of my system.
 

atferrari

Joined Jan 6, 2004
4,069
I suspect that you do not understand how PWM achieves the control. The usual way is fully ON - fully OFF always. What you vary is the ON time of every pulse.

I suggest you start afresh by reading what is PWM all about. Heard of average?
 

crutschow

Joined Mar 14, 2008
25,265
Yes, you should be able to control the average actuator current of those that are ON using PWM on the /OE input as long as you have pull-down resistors on all the outputs (resistor value determined by the PWM frequency and the MOSFET gate capacitance/charge).
Of course, all the ON actuators, will have the same PWM generated current.
 
Last edited:

Thread Starter

fieldeng

Joined Nov 1, 2019
15
Yes, you should be able to control the average actuator current of those that are ON using the PWM on the /OE input as long as you have pull-down resistors on all the outputs (resistor value determined by the PWM frequency and the MOSFET gate capacitance/charge).
Of course, all the ON actuators, will have the same PWM generated current.
Great. Thank you very much for the answer!
 

djsfantasi

Joined Apr 11, 2010
6,718
Great. Thank you very much for the answer!
I repeat something I said earlier. If you have connected more than one actuator to the shift registers, ALL of them will be affected by using PWM on OE. That is, you will not be able to control the current/voltage of individual Actuators.
 
Top