Noob questions - Failover on 555 PWM circuit

Thread Starter

AfterEffect

Joined Jan 3, 2021
6
Hello,

I'm working on a PWM circuit based off a 555 timer to run a 12v dimmer in a vehicle. I have limited electronics knowledge, as I'm just a maker working on personal projects.

My issue is I need a "failover" if the PWM circuit fails. Failure point is the potentiometer, where one or both sides lose continuity due to wear and the lights turn off. My goal is to add a function where if continuity is lost on the PWM circuit, the lights default to "on", but otherwise are controlled by PWM.

I have attached my diagram, I apologize for any mistakes. My thought is, I could potentially put a NOR gate on both sides of the potentiometer which runs a second mosfet on the output. Since this is where I'm generating the frequency I don't know if the NOR gate would work there or if it would cause any other issues with the circuit.

Am I going in the right direction? Am I overthinking this? Is there a simpler answer? Thanks in advance. Note010321_0.jpg
 

dl324

Joined Mar 30, 2015
16,916
Welcome to AAC!

You could configure another 555 timer as a missing pulse detector and add some logic for it to turn the light on if that happens.

BTW, the way you've drawn your schematic is a terrible way to convey circuit functionality. You give a MOSFET part number, but you drew it as an NPN transistor.
 

Thread Starter

AfterEffect

Joined Jan 3, 2021
6
Thanks Dennis,

I hadn't considered another timer for that application. I'll have to look into how that could be accomplished.
Again I apologize for the schematic - Regarding the mosfet I was originally using a NPN transistor which proved to be too small for the job, so switched things around to use that N channel mosfet without redrawing the symbol. I havent shared a schematic before, so I'll keep that in mind for next time.
 

dl324

Joined Mar 30, 2015
16,916
I hadn't considered another timer for that application. I'll have to look into how that could be accomplished.
From the 1979 Signetics Linear Applications Handbook:
clipimage.jpg
The Signetics style isn't very useful either and they assume that everyone has pin function memorized. Most will draw symbols so that inputs are primarily on the left and outputs are on the right. That will facilitate the left to right flow preferred by most.
Again I apologize for the schematic
No problem. Obviously you've learned that style from someone who didn't know what they were doing either.
 

Ian0

Joined Aug 7, 2020
9,809
Isn't the only possible failure the loss of contact between the wiper and the track, which will stop both charge and discharge?
Then a simple solution would be to place parallel resistors between wiper and each end. It will affect the pwm frequency, and the "law" of the potentiometer (but who wants a linear pot for dimming control?), but it will continue to work.
You probably need a current limit resistor to stop a direct short between output and capacitor when pot is at maximum travel.
 

Thread Starter

AfterEffect

Joined Jan 3, 2021
6
The Signetics style isn't very useful either and they assume that everyone has pin function memorized.
I think I may continue drawing with the pinout of the components for the time being just because assembling the circuit is easier with the reference. I can see how that would be a better and easier to read format for those who have memorized the pins though.

Isn't the only possible failure the loss of contact between the wiper and the track, which will stop both charge and discharge?
This makes more sense than my assumption of the failure based on a couple of continuity tests. I'll check the failed component again and try this solution. Since this is a dimmer for an incandescent bulb, I don't think overall frequency is really an issue so much as duty cycle. Thank you so much for the suggestion!
 

Ian0

Joined Aug 7, 2020
9,809
I'd suggest a log pot, otherwise all the apparent dimming will happen at one end. Your eyes register "brightness" as the logarithm of light level.
Using the parallel resistor method, the PWM frequency will reduce if the pot fails. Maybe that will make it flicker if the frequency is already quite low. Maybe you can call the a "feature" as it indicates pot failure!
I would also suggest a flyback diode between MOSFET drain and V+. I know that a lamp is not an inductive load, but there is never a circuit with no inductance!
 

Thread Starter

AfterEffect

Joined Jan 3, 2021
6
I'd suggest a log pot, otherwise all the apparent dimming will happen at one end. Your eyes register "brightness" as the logarithm of light level.
Using the parallel resistor method, the PWM frequency will reduce if the pot fails. Maybe that will make it flicker if the frequency is already quite low. Maybe you can call the a "feature" as it indicates pot failure!
I would also suggest a flyback diode between MOSFET drain and V+. I know that a lamp is not an inductive load, but there is never a circuit with no inductance!
I noticed the "flat spot" in the middle today while testing. A couple 68k resistors seemed to hit the sweet spot with my existing circuit. They also cause the circuit to "fail" at only partial brightness which is actually ideal - I won't be blinded by full brightness dash lights if it does go out. The style of pot I have only seems to be available as a linear model, so this will have to do.
Good idea on the diode, I'll leave a couple pads open for it and test both ways when I make the PCB. I'm also wondering what the impact of dirty power will be from the vehicle, and whether I'll need to clean it up or regulate it for the 555 timer. Something else to test.
On a comment from your previous post, I'm not quite sure why I would need a current limiting resistor on either of the capacitors, as they're not on output. Am I missing something?

This is just a hobby project for myself, but I'm learning quite a bit and I appreciate everyone who has chimed in! It's a steep learning curve for someone with no experience, but the next step is changing to a P channel mosfet (oversight on my part, the output is positive, with ground to the vehicle), verifying everything still works, fixing any remaining issues I find or are mentioned, then learning EasyEDA to create the schematic and PCB. Expensive and time consuming for a one-off, but the eventual goal is to have a PCB that fits in the original space.

I'll post a new schematic with what I've learned as soon as I have tested with the new mosfet. Thanks again!
 

Ian0

Joined Aug 7, 2020
9,809
why I would need a current limiting resistor on either of the capacitors, as they're not on output.
Well, actually they ARE on the output - with the pot at the end of its travel, the only thing between output on pin 3 and the capacitor is a diode.
 

Thread Starter

AfterEffect

Joined Jan 3, 2021
6
the only thing between output on pin 3 and the capacitor is a diode.
I see what you mean now. I would never have caught that. A higher value impacts power output at minimum PWM, so I added a 22ohm resistor there just in case.

The circuit seems to work perfectly with the changes. With the change to a P channel mosfet I found out that I needed to invert the signal, which I did with a small NPN transistor. Here is an updated schematic. It's still a bit messy but I'm getting there. I should be at the point I can test it in the vehicle before attempting to make a PCB layout. Dimmer1.png
 

Thread Starter

AfterEffect

Joined Jan 3, 2021
6
Why?
The phase of the signal has no effect on the output.
If it's related to pot rotation versus PWM duty-cycle, then just reverse the pot.
Using the N channel mosfet and switching ground, the duty cycle increased turning the pot clockwise. Using the P channel pot switching VCC, the output was inverted and duty cycle increased turning the pot counter clockwise.

I know there are a few other ways to drive the 555, but I haven't figured them out yet. I'm not quite sure what you mean by "reversing the pot". I don't think reversing the diodes polarity of the pot would do anything, but I've been proven wrong in this thread several times already!
 
Top