Can A PWM Deliver True 100% Duty Cycle?

Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum

Help Support Homebrew Talk - Beer, Wine, Mead, & Cider Brewing Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

SilverZero

Well-Known Member
Joined
Sep 6, 2011
Messages
1,013
Reaction score
109
Location
Bend
I'm wanting to control my SSR with a PWM based on Walker's design:

PWM_breadboard_wiring_switchPot.jpg


But the more I read about 555 circuits, the more I see they are not actually capable of delivering 100% duty cycle (always on). Is this true, or is it modified by the specific circuit?

Could I just add a bypass switch to run the DC directly to the SSR when I wanted a 100%-on signal to my element?
 
I used that circuit for my boil control. In the off position, I notice a very slight flash on. It has to be dark and doesn't even light the led fully it is so quick. I remember discussing this before and I believe it was concluded that the reaction time of the SSR is too slow to respond to such a quick pulse. So for all practical purposes, this is 0 to 100%.
 
I'm not really interested in programming at any level for right now, maybe in the future. I just want to control a boil, I'm not mashing with my heating system.

So can that PWM deliver 100%? I'm not worried about turning it off, I have a kill switch for that.
 
You probably won't get a true 100% with a 555 timer PWM circuit, but you are probably looking at something like 99%. You won't ever notice the difference. The timer will reset and then immediately pickup again. If you are that worried about it use a microcontroller or just simply wire a switch straight from your dc source to the SSR. When you want 100% simple flip the switch.
 
You probably won't get a true 100% with a 555 timer PWM circuit, but you are probably looking at something like 99%. You won't ever notice the difference. The timer will reset and then immediately pickup again. If you are that worried about it use a microcontroller or just simply wire a switch straight from your dc source to the SSR. When you want 100% simple flip the switch.

Look closely at Walker's circuit. It's a bit different.
 
A 555 will never truly get 100%
That being said, depending on your potentiometer, it may be so close to 100% that's it's a negligible difference

If it can adjust to 1k/99k (the two sides) you'll get 99% on time.

you could also add a switch that just holds the output high for on.

search for 555 calculator and you can figure an answer out.

R1 and R2 will add up to ~100k, and C1 is 33uF
 
A 555 will never truly get 100%
That being said, depending on your potentiometer, it may be so close to 100% that's it's a negligible difference

If it can adjust to 1k/99k (the two sides) you'll get 99% on time.

you could also add a switch that just holds the output high for on.

search for 555 calculator and you can figure an answer out.

R1 and R2 will add up to ~100k, and C1 is 33uF

Notice that the circuit above has no fixed resistors. That is the key.

Here is a link with some explanation and another link.

https://www.homebrewtalk.com/f170/pwm-circuit-trouble-229000/
 
While true, not all pots will go fully to 0 ohms / full rating. If they don't you won't hit 100%. but for this application, it's pretty dang close.

Exactly. That is why I get that little tiny pulse when set to 0% and probably a tiny pulse also when set to 100% (which I cannot notice). Using this circuit to control an SSR for boiling it becomes negligible.
 
I'm not really interested in programming at any level for right now, maybe in the future. I just want to control a boil, I'm not mashing with my heating system.

So can that PWM deliver 100%? I'm not worried about turning it off, I have a kill switch for that.

Don't fear code. Here's code for a PWM running at 1hz. This is a complete program for a ATtiny85 based PWM. No resistors, no capacitors, nothing.

I've made more complex curves, but this is all you really need for a traditional, linear, 0%-100% PWM.


Code:
#define potPin 1
#define ssrPin 4
#define windowTime 1000
unsigned long markTime=millis();

void setup(){
  pinMode (potPin,INPUT);
  pinMode (ssrPin,OUTPUT);
}
void loop(){
  int period = map(analogRead(potPin),0,1023,0,windowTime);
  if ((millis()-markTime)<period) digitalWrite(ssrPin,HIGH);
  if ((millis()-markTime)>period) digitalWrite(ssrPin,LOW);
  if ((millis()-markTime)>windowTime) markTime=millis();
}


That said, I think you *can* get 100% out of a 555, sort of. Your SSR only has 120 opportunities to shut off each second. If your 555 output goes low, then back high, in fewer than 8.33333 millis, then your output can certainly be 100% at the element, if not at the pin on the 555.
 
Very cool discussion, thanks everyone. I've already got the 555 circuit parts in the mail, but if I feel like moving ahead into microcontroller territory I like the above information.

It's amazing how my decision to get electric has put me into a whole new community within HBT. New faces (er, usernames) everywhere. :)
 
Don't fear code. Here's code for a PWM running at 1hz. This is a complete program for a ATtiny85 based PWM. No resistors, no capacitors, nothing.

I've made more complex curves, but this is all you really need for a traditional, linear, 0%-100% PWM.


Code:
#define potPin 1
#define ssrPin 4
#define windowTime 1000
unsigned long markTime=millis();

void setup(){
  pinMode (potPin,INPUT);
  pinMode (ssrPin,OUTPUT);
}
void loop(){
  int period = map(analogRead(potPin),0,1023,0,windowTime);
  if ((millis()-markTime)<period) digitalWrite(ssrPin,HIGH);
  if ((millis()-markTime)>period) digitalWrite(ssrPin,LOW);
  if ((millis()-markTime)>windowTime) markTime=millis();
}


That said, I think you *can* get 100% out of a 555, sort of. Your SSR only has 120 opportunities to shut off each second. If your 555 output goes low, then back high, in fewer than 8.33333 millis, then your output can certainly be 100% at the element, if not at the pin on the 555.

How do you attach your pot? I assume a pot is used to control the duty cycle or % on time? I've got some spare 555's and ATtiny85's lying around and would love to test both and give back to the community with the results. Maybe PM me and send me some more details.
 
I'd love a schematic as well. I'm using a variable SSR right now, it works fine but it's hot because it's at such a high frequency (not even sure what it is right now). I'd rather have it 30hz or so, and I'd like to wire something fun. I'm sure there's a wealth of info on all of this, and if it were the summer I'd go for it, but a turnkey solution would be better for some of us. :)
 
Looks straightforward but be warned that not just any old potentiometer will do for that circuit. As P-J correctly shows, the variable resistor needs to be rated 2W and should have an insulating plastic shaft because it is "hot".

You can do PWM any which way. Walker's circuit will get 0-100% near as makes no difference, micro controller circuits are less soldering, but these days I just hack an LED dimmer (see link in my sig).
 
It seems to me that you would be far better off (and much easier to accomplish) if you used a SSVR to control your unit.

Circuit:

SSVR40A_s_4.jpg


The device: 40A Solid State Voltage Regulator

Wishing you the best.

P-J

That's what I'm using now (it's a cheaper one) but it's quite simple. Like I said, it works well, but it has such a high frequency that it gets pretty hot.
 
That's what I'm using now (it's a cheaper one) but it's quite simple. Like I said, it works well, but it has such a high frequency that it gets pretty hot.

Could you explain? What gets hot the SSVR or the potentiometer. Does the potentiometer that comes with the SSVR from Auber Instruments adequate enough?

TD
 
I'd love a schematic as well. I'm using a variable SSR right now, it works fine but it's hot because it's at such a high frequency (not even sure what it is right now). I'd rather have it 30hz or so, and I'd like to wire something fun. I'm sure there's a wealth of info on all of this, and if it were the summer I'd go for it, but a turnkey solution would be better for some of us. :)

I don't have one of those VSSR's. Don't they work by phase angle control, not PWM? Well technically I guess it's still PWM, but at 120hz and timed to the zero crossing. I expect you'd be unsuccessful trying to use a 555 or an AVR to control it. A plain jane, cheap SSR on the other hand, should work fine with either one. And you could run it at 1hz, or 0.5hz, or whatever you want.

What schematic are you looking for? I'm not following. If you're looking for turnkey, I'd say you already have that in your VSSR. No? 555 or uC, either one, will require a DC power supply, etc.


How do you attach your pot? I assume a pot is used to control the duty cycle or % on time? I've got some spare 555's and ATtiny85's lying around and would love to test both and give back to the community with the results. Maybe PM me and send me some more details.

How to I attach the pot to what? To the chip? On the 555, you have to set up some additional resistors, diodes & capacitors. The SSR will go on PIN3.

On the ATtiny85, wire the pot sweep to 2, 3 or 7. Sides go to VCC & GND. The SSR can be anywhere, except VCC, GND, or RESET.

I don't want to drift this thread any further. So, ya, please PM me with any specific question or, better yet, start a thread and maybe we can generate some interest in the ATTinys. I'm amazed at some of the projects I've seen done with these things. For $1.50, how can they be so overlooked?!
 
I can't even remember now. Like I said, my SSVR works great. One SSR, one pot, nothing else. I'll move up to a PID soon enough, in the meantime this is a great solution. I had a 555 PWM set up on a breadboard early on, and I fried it trying to solder it all together. When I discovered the variable SSR I never looked back.
 
If any one is going to try pwm with a 555 timer this circuit works fairly well. All of the other ones I found on the net did not control my ssr. This circuit works and goes almost fully on according to my amp and volt meter on the output of the ssr, measuring at the element.
Thanks to the original poster for starting this thread.
 
Back
Top