PWM..Show us How

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.
Here is one I have working with a grand total of 3 components:

555
2.2uf cap
500k pot

It has about a 1Hz rate

I have it working now for 2 hours, and am letting it run overnight to test stability, but the package does not get any smaller than this...


CircuitBee drawing

anyone have a quick way I can get the imbedded code below to have the drawing show up here?
<iframe width='500' height='350' frameborder='0' src='http://c.circuitbee.com/build/r/schematic-embed.html?id=0000000094'></iframe>

Can you actually get that circuit to 100% "on"? Your charge up time on the capacitor is constant with it set up like that, and you are only adjusting the discharge rate with the pot.

Is the time to charge the cap just so small that it isn't noticed?

edit; BTW... I like it. less parts = more betterer
 
actually the last 20% of the potentiometer is full on or appears to be, but it never goes completely off, there is a little blip.. hmmm.. my circuit does have the SSR + tied to +12v and pin 3 is pulling down... so 'not getting 100% on' is really 'not getting 100% off'? I have a BSEE, but these 555's are from high school in 1983-4, have not touched em since then :p

I am going to use a 4.7uf or 6.8uf cap for the real thing, 2 seconds is fine frequency and will not cycle SSR to death.

Side note, while searching, I found that 500k pots are common for guitars, and guitar knobs may be cool on my controller, although I have zero musical ability..
 
Side note, while searching, I found that 500k pots are common for guitars, and guitar knobs may be cool on my controller, although I have zero musical ability..

Make sure the pot has linear taper, many audio pots are logarithmic which would make for an interesting PWM controller...
 
So the FK804 DC Motor Speed Control kit showed up and I went a grabbed a 2.2uF capacitor. Now, I am a technical person and I can solder up a circuit board and follow directions, but if anything goes wrong I'm pretty much at a loss as to why. Frequently I just don't understand the symptoms of the problem I'm experiencing. So here's how it went and if anyone can help, well, I sure appreciate it.

I got it all soldered up and grabbed my trusty hacked PC power supply to use as the source for the +12VDC for this board. I checked the power outputs and it's doing just fine.

Got it hooked up and set my *analog* multimeter up connected to the + and - on the PWM board. The 500K potentiometer was full right (which I thought was full on).

Here's where things went wrong. First of all, the steady +12VDC is fine. No problem there. The output read just a few volts. I was unable to detect any pulsing of the power. I then turned the pot to full left and noticed the output voltage go up to about +3.5VDC. So I grabbed a small CPU cooling fan (12VDC 0.022A) and hooked it up to the PWM. I gave it a little help to start, but it did and it was very slow. When I hooked it up directly to my power supply it spun very fast and seems to move quite a bit of air. I was able to turn the pot left and the voltage out decreased and the fan slowed down to the point where he fan stopped.

So help me understand. I thought the PWM modification would cause about a 1 second cycle time, but I never saw that. I still connected the PWM to my SSR then plugged in an AC fan, but I never noticed if it had a pulse.

Is my testing method ok? I'm not sure if the PWM is working correctly.

Thanks for any help anyone can lend.
 
stlbeer said:
So the FK804 DC Motor Speed Control kit showed up and I went a grabbed a 2.2uF capacitor. Now, I am a technical person and I can solder up a circuit board and follow directions, but if anything goes wrong I'm pretty much at a loss as to why. Frequently I just don't understand the symptoms of the problem I'm experiencing. So here's how it went and if anyone can help, well, I sure appreciate it.

I got it all soldered up and grabbed my trusty hacked PC power supply to use as the source for the +12VDC for this board. I checked the power outputs and it's doing just fine.

Got it hooked up and set my *analog* multimeter up connected to the + and - on the PWM board. The 500K potentiometer was full right (which I thought was full on).

Here's where things went wrong. First of all, the steady +12VDC is fine. No problem there. The output read just a few volts. I was unable to detect any pulsing of the power. I then turned the pot to full left and noticed the output voltage go up to about +3.5VDC. So I grabbed a small CPU cooling fan (12VDC 0.022A) and hooked it up to the PWM. I gave it a little help to start, but it did and it was very slow. When I hooked it up directly to my power supply it spun very fast and seems to move quite a bit of air. I was able to turn the pot left and the voltage out decreased and the fan slowed down to the point where he fan stopped.

So help me understand. I thought the PWM modification would cause about a 1 second cycle time, but I never saw that. I still connected the PWM to my SSR then plugged in an AC fan, but I never noticed if it had a pulse.

Is my testing method ok? I'm not sure if the PWM is working correctly.

Thanks for any help anyone can lend.

Try hooking up a led to monitor when it is on and off. It will be difficult to tell with a motor at 1hz. It will also be difficult to read with a meter. Depending on the voltage of the switched output, you will want a resistor in line with the led to drop some of the voltage, 12v will kill a typical led pretty quick.
 
I used the LED on the SSR to view the output... but you can use a 330 Ohm resistor and an LED to monitor the output for 12V, I do it a lot when troubleshooting automotive stuff..

I did not have my small diameter solder handy, and fried a 555 getting a lead too hot... or was it shorting the output to ground?

I ended up using a 8-pin DIP socket, with 30ga Kynar Wire Wrap wire and getting all soldering done before inserting the 555. I then hot-glued the top of the 555 to the back of the pot, the cap is in between the DIP pins.. pretty slick if I say so myself.. I may do the 2nd one with a 14-pin DIP, so the cap can be changeable, perhaps in pins 8&9, and have the connection wires in 5,6, and 7. (cap and wires hot glued in)

I put a video on youtube of my little creation:
 
Last edited by a moderator:
Clearwaterbrewer.

I tried out your PWM circuit design, but I couldn't get it to work. My SSR doesn't have a pilot light, so I put an LED with a 300 Ohm resister as the load. The LED lit, but it never did oscillate. I have 11.98VDC at the load, but it's not changing from that. I do not have an oscilloscope and don't think I have access to one. I'm not sure what I did wrong. Would it be possible to get some more detailed pictures of how you have yours wired up?

Thanks!
 
What happens if you put the LED and resistor on the input, not the output?

SSR's need a pretty decent load if you are going to monitor the output, use a incandescent light bulb and 120V. At a minimum, 24VAC is needed according to the front label on my SSR, but it does not state the current

Here is the CircuitBee.com drawing



-mike
 
So the FK804 DC Motor Speed Control kit showed up and I went a grabbed a 2.2uF capacitor...


Mine came as well. My RadioShack didn't have a 2.2uF cap :)confused:), so I picked up 2 1.0uF and paralleled them. I soldered it up last night and it appeared to work as expected. I also hooked my output up to a DC fan and it seemed to do a good job of controlling the speed. I could tell it was pulsing by turning the duty cycle down to the low end, then holding the fan blade with my hand. I could feel a quick shot of resistance on the blade about every second or so.

I put the output on a multimeter, but I think even at 1Hz its a little too fast for the MM to pick up accurately. The voltage it dropped when I turned it down, but i think it was still at like 3-4VDC.

I'm in the same boat as you, I know enough to be dangerous, but I can't troubleshoot a circuit beyond the most basic issues.
 
What happens if you put the LED and resistor on the input, not the output?

SSR's need a pretty decent load if you are going to monitor the output, use a incandescent light bulb and 120V. At a minimum, 24VAC is needed according to the front label on my SSR, but it does not state the current

Here is the CircuitBee.com drawing



-mike

I'll give that a try later today. To clarify, I just had the 12V output going to the LED then the 300 Ohm resister and then to the ground. Do you think that wouldn't discharge the 4.7 uF non-polarized capaciter? I'm using a 5mm LED. The SSR was not attached.
 
If you look at my diagram, pin 3 (the output) is not connected to the SSR and then ground, it is connected to the SSR and then +12VDC (or +5VDC).. The 555 provides ground.

That could be entirely your problem...

(If it is, you can say thank you with a cold homebrew when I come up to Maryland Heights for work at the end of the month :p )
 
If you look at my diagram, pin 3 (the output) is not connected to the SSR and then ground, it is connected to the SSR and then +12VDC (or +5VDC).. The 555 provides ground.

That could be entirely your problem...

(If it is, you can say thank you with a cold homebrew when I come up to Maryland Heights for work at the end of the month :p )

Yeah, I saw that, I was just trying to test the circuit before putting in the SSR. I'll put the SSR into the picture tonight and see how it goes.

Also, when I put the LED + resistor into the mix, that all stays on the + side or should I put it on the Negative side. i.e. where would I put the LED + resistor to use as the SSR pilot light?

Too bad you're not in StL now for Craft Beer Week! We had a couple of new breweries open up this week.

If this works, I'll buy you a couple beers or you can come by and help me empty my kegerator.

Paul
 
in parallel with it... you could probably just solder the resistor to the LED, and insert the leads in the SSR control terminals along with your wires... low-buck way of getting a LED on your SSR ;-)
Current should not be an issue I have two SSR's each with LEDs off of a 555 running right now, one for each leg of 240V..
 
in parallel with it... you could probably just solder the resistor to the LED, and insert the leads in the SSR control terminals along with your wires... low-buck way of getting a LED on your SSR ;-)
Current should not be an issue I have two SSR's each with LEDs off of a 555 running right now, one for each leg of 240V..

Hoping that something would happen so I could at least diagnosis it, it hooked the circuit to my Auber 25A SSR. Both the inline LED and the one on the SSR came on. I hooked a 20W fan to the AC side of the SSR and the fan started.

Then things got interesting. I fried the 555. I smelled it first, then it fizzled and started smoking. It was in a socket and it melted pin 1 (ground) like a blown fuse where it went into the IC and it melted the socket a bit.

Before I plugged it in, I checked it against the circuit diagram and it looked right. So I must have screwed it up some other way.

If you've got yours working, maybe you'd be interested in selling some? Wanna shot me a price?
 
I just ordered 10 from futurelec.com for $0.25 each... I have one laying here, PM me and I can throw it in an envelope and wait for those to arrive. Are you using a breadboard? Care to take a pic of your wiring? Obviously we don't want this happening to the 2nd one...

shorting the output to ground or Vcc can smoke it I bet.. they can handle 200mA

Edit: If you are in a hurry, Radio shack has em for $1.99 http://www.radioshack.com/product/index.jsp?productId=2062595
 
Perseverance pays off. I went back to my FK804 PWM project board and replaced the 2.2uF cap with the 4.7uF cap and the circuit works the way it's supposed to. Turns out the 2.2uF cap is polarized and the 4.7uF is not. I'm guessing that's what the difference is (though I soldered in the 2.2uF cap each way).

I'm getting 12VDC on the output and the LED is blinking on the SSR.

Mike - thanks for your help!

Paul
 
My replacement caps are polarized, as well. It hasn't given me a problem, but I haven't run it more than a minute or two either.
 
I did a little research (key word: little) and from what I could tell, polarized vs. non-polarized shouldn't make a difference in this circuit.
 
I can say for sure it does not work with an electrolytic cap that measures as 'bad' on my meter and works with every one I find that does measure good, between 1uf and 10 uf..

Sometimes circuits can be confusing, but here, one lead is ground (along with pin 1 of the 555), the other goes to pin2&6 (which through 500k goes to V+)... if you get a cap backwards in that situation, I don't have much sympathy for ya ;-)

-mike
BSEE from SIUC '94
 
I can say for sure it does not work with an electrolytic cap that measures as 'bad' on my meter and works with every one I find that does measure good, between 1uf and 10 uf..

Sometimes circuits can be confusing, but here, one lead is ground (along with pin 1 of the 555), the other goes to pin2&6 (which through 500k goes to V+)... if you get a cap backwards in that situation, I don't have much sympathy for ya ;-)

-mike
BSEE from SIUC '94

I honestly didn't know if it would matter which way I aligned the cap, but I could tell from the drawing which way the voltage gradient was going, so I went with that.
 
Hooked mine up to the boil kettle tonight. It worked great. I'm looking forward to not having my BK not be controlled by an on/off controller.
 
Hooked mine up to the boil kettle tonight. It worked great. I'm looking forward to not having my BK not be controlled by an on/off controller.

Does this mean you've been using a manual switch to control the boil? The PWM is simply an on/off switch that is automated. The width (duration?) of the pulse is set by the cap (in my case 4.7uF) and the duty cycle, the portion of on time vs off time, is set by the variable potentiometer. I.e. - a 50% duty cycle means the element is on 50% of the time and off 50% of the time. However, the for the portion of time it is on, it is on at full power.
 
Does this mean you've been using a manual switch to control the boil? The PWM is simply an on/off switch that is automated. The width (duration?) of the pulse is set by the cap (in my case 4.7uF) and the duty cycle, the portion of on time vs off time, is set by the variable potentiometer. I.e. - a 50% duty cycle means the element is on 50% of the time and off 50% of the time. However, the for the portion of time it is on, it is on at full power.

I've been controlling it with the internal relay of a PID controller. It cycles every 10-30 seconds. So it goes from full on boil, to no boil. The PWM cycles often enough that there is an effective averaging of the power.

I suppose I could have set the PID parameters to cycle the element much more often, but due the accuracy and response of the thermocouple it probably still would go from full boil to no boil, just a little more often, and would likely kill the internal relay on the PID.
 
The 'easy' way is to use a PID that has the 'manual' function such as Auber to turn on a pair of SSR's. I have not seen many of the cheap eBay ones have that, and theirs is $40, If i sold my little pot/555 thing, I would want at least $20 for my effort, and you may blow that much building your first one, so the Auber with manual control it the obvious way to go unless you really want a 'knob' to control your boil. (I don't have a PID, I have a BCS-462 controller, and wanted a 'quick' way to tune the duty-cycle for boiling.)
 
I have an old auber syl-1512 before they had any fancy features in their pids. they only had two models back then, and that was pretty much it. they didn't even have ssrs back then.
 
We seem to have on this thread some folks here who understand PMW electronics. So here's a question for you: I bought the kit, built the PMW, reduced the frequency to about 12 as I recall, and it works great to attenuate the power to my 5500 watt boil kettle element. I also have an analog ammeter in the circuit so I can see if the element is powered, and to what extent. The problem is that the ammeter needle flickers visibily. It is worse at low power, but still noticible at full power. I originally changed the capacitor to see if that would eliminate the flicker, but to no effect.

The system works really well, the flickering doesn't seem to affect the perfomance of the system at all. So, experts, any insight into this behavior?
 
We seem to have on this thread some folks here who understand PMW electronics. So here's a question for you: I bought the kit, built the PMW, reduced the frequency to about 12 as I recall, and it works great to attenuate the power to my 5500 watt boil kettle element. I also have an analog ammeter in the circuit so I can see if the element is powered, and to what extent. The problem is that the ammeter needle flickers visibily. It is worse at low power, but still noticible at full power. I originally changed the capacitor to see if that would eliminate the flicker, but to no effect.

The system works really well, the flickering doesn't seem to affect the perfomance of the system at all. So, experts, any insight into this behavior?

Your ammeter probably doesn't work well with 12 Hz and variable duty cycle. I'd expect problems there.
 
The ammeter is wired into the high voltage circuit between the SSR and the element. The full current runs through it. Not sure why the 12 V would make a difference.
 
The ammeter is wired into the high voltage circuit between the SSR and the element. The full current runs through it. Not sure why the 12 V would make a difference.

12 Hertz. 12 pulses per second. I was not referring to the control voltage on the SSRs.

True RMS meters should measure voltage and current correctly when it is pulsing, but I still think this is the problem.
 
Oops, misread Hz for volts.

Help me to understand this: the identical ammeter in a similar circuit for my HLT where the power is controlled by a mechanical relay and a PID controller is as steady as a rock, despite the 60 Hz 240 V AC passing through it. The ammeter in the PWM controlled circuit flickered wildly when the frequency in the timer circuit was 264, and improved when I changed it to 12 Hz. The flickering is irregular and slow enough to be readily visible to the eye, let's say 2 or 3 Hz, and worse at low power, better at high power.

You say you'd expect problems, why would you expect them and what can I do to eliminate the problem? Others who have added digital ammeters in these circuits don't seem to have a similar problem, why is that?
 
Oops, misread Hz for volts.

Help me to understand this: the identical ammeter in a similar circuit for my HLT where the power is controlled by a mechanical relay and a PID controller is as steady as a rock, despite the 60 Hz 240 V AC passing through it. The ammeter in the PWM controlled circuit flickered wildly when the frequency in the timer circuit was 264, and improved when I changed it to 12 Hz. The flickering is irregular and slow enough to be readily visible to the eye, let's say 2 or 3 Hz, and worse at low power, better at high power.

You say you'd expect problems, why would you expect them and what can I do to eliminate the problem? Others who have added digital ammeters in these circuits don't seem to have a similar problem, why is that?

you have 60Hz pulsing at 12 Hz, and the meter cannot read it correctly, a True RMS meter should be able to. An O-scope would show it. Slow you pulsing to 1Hz or .5Hz or .25Hz and you will probably see it correctly..
 
The ammeter is to have a clear visual indicator of power to the element, a gauge to show me how much power for repeatability, and for old fashioned analog coolness. Not necessarily in that order.

I'll try slowing the pulse to one hertz or so and see what happens.

Thanks.
 
I think you will not be happy with PWM if you really want a steady ammeter reading... you would want a phase angle controller or some other method that does not have it switching on and off at slower than 60Hz.. You will likely experience much higher cost and complexity, and will have lower efficiency with such a setup... You could go as complex as a 3000W audio amplifier and boil your beer to the theme of apocolypse now if you really wanted...
 
Thought this might be useful. Some visuals of the Bakatronics board in use. Swapped out C1 with a 2.2uF electrolytic capacitor as others have done.


The board is descriptive, telling you where each component goes.
IMG_20110918_141221.jpg


The components and schematic.
IMG_20110918_140327.jpg


The finished board powered by a 9V battery, wired to the SSR. The bulb pulses according to the potentiometer setting.
IMG_20110918_183601.jpg
 
Back
Top