*Ss Brewing Technologies Giveaway - Enter Now!*

Home Brew Forums > Home Brewing Beer > DIY Projects > ChuckJaxFL's PWM
Reply
 
LinkBack Thread Tools
Old 08-01-2012, 12:46 AM   #1
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 18 Times on 11 Posts
Likes Given: 23

Default ChuckJaxFL's PWM

I finally put together a PWM.

A friend wanted a PWM to use alongside the PID already installed in his awesome BIAB system. He's more than capable of building his own, but I told him I wanted to throw one together for him.

He didn't want a DPDT between the PID & the PWM. I forget now why, but that was one of the design goals. We started, initially, to consider just putting diodes on the +'s of both the PWM and PID. Once the PWM was turned on, the temp would rise and the PID would stop sending signals. I wanted a tighter control, so this is what I came up with.

__________________
chuckjaxfl is offline
CS223 Likes This 
Reply With Quote Quick reply to this message
Old 08-01-2012, 12:51 AM   #2
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 18 Times on 11 Posts
Likes Given: 23

Default

Some pics

image-4055375811.jpg   image-192077746.jpg  
__________________
chuckjaxfl is offline
 
Reply With Quote Quick reply to this message
Old 08-01-2012, 02:27 AM   #3
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 18 Times on 11 Posts
Likes Given: 23

Default

The PWM can run on 7-12vdc. The PID is wired into the PWM, rather than the SSR. When the switch is in the "off" position, the PID controls the SSR. Once turned "on", the PWM takes over control of the signal.

The schematic & board were drawn in Cadsoft Eagle (freeware version). I used iTead's CAM files to create the gerber files for the boards, and then had them produce the boards for me. I emailed the files on 7/8/12, the boards arrived 7/30/12. 10 boards cost me $18.90 to the door. It would have been less, but I got them in black, just because.

I considered using a 555, but went with an ATtiny85 instead. With a 555, I'd have to recalculate resistors and capacitor values, and then actually break out a soldering iron again to change anything. With this chip, I can change the code on it in seconds if I want to change the function. The downside is the ATtiny85 costs a little more and requires a voltage regulator.

It was going to be all through-hole parts, but CS223 encouraged me to try using these surface mount components. The parts on the back (that 8 pin chip, the two brick shapes pieces and the voltage regulator) were a breeze. Much easier than expected. On the front, there's 8 or 9 components in that little area behind the potentiometer. They are 0603 components (0.06" x 0.03"). This is the LAST time I'll use them. WOW those are tough to handle. The take-home lesson is to stick with the surface mount stuff (small & cheap), but use the more manageable 0805 or 1206 parts. I've got enough parts to make a handful of these PWM's. Maybe once I'm done, I'll have had enough practice to think differently.

If there's some way to do it, I'll zip the Eagle files and post them here. I put the OSHW logo on there, and the CC-SA license in hopes that someone will take the files and build something more impressive.

The code is stupidly simple:

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();
}

The code could easily be modified, though. For instance, you could have the knob start at 30% instead of 0%. Or max out at 80% if you wanted to. Or reverse direction.

For my own copy, I will have the first 10% of the knob cover from 0-40%, the last 10% cover 80-100%, and then have doubly fine control from 40-80% (the range where I suspect most of us are boiling).
__________________
chuckjaxfl is offline
 
Reply With Quote Quick reply to this message
Old 08-01-2012, 01:21 PM   #4
CS223
HBT_LIFETIMESUPPORTER.png
Feedback Score: 0 reviews
Recipes 
 
Join Date: Feb 2012
Location: Gainesville, Florida
Posts: 256
Liked 36 Times on 10 Posts
Likes Given: 8

Default

Such a clean elegant solution. Congrats on going with the SMT, it's not that difficult once you try. Can't wait to put it to use.

__________________
My BIAB RIMS E-Brewery Build : My spunding valve build : My shamelessly cheap stir plate build : Cereal Killer Mill Tear-down : My Temp Controller Build : My awesome LHBS

Of all the things I've learned from HBT the single most important lesson has been: RDWHAHB.
CS223 is offline
 
Reply With Quote Quick reply to this message
Old 08-01-2012, 07:58 PM   #5
stamandster
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jun 2011
Location: springfield, ma
Posts: 761
Liked 51 Times on 44 Posts
Likes Given: 26

Default

Dude can I buy one?? that's awesome!

stamandster is offline
 
Reply With Quote Quick reply to this message
Old 08-02-2012, 12:56 AM   #6
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 18 Times on 11 Posts
Likes Given: 23

Default

I'll barter one instead? Click on my name and do the "donate" thing for a membership for me, and I'll send you one. That way, the board here actually gets the money. Sound fair?

Wait until I get another one put together, though. I've got some family here with health issues. If you do send the money, then I disappear for a week or more before I get it to you... that would bother me a lot.

__________________
chuckjaxfl is offline
 
Reply With Quote Quick reply to this message
Old 08-02-2012, 05:32 AM   #7
NiteOwlBrewing
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jul 2008
Location: Dayton, OH
Posts: 143
Default

Will this work as a stand alone element controller? It seems it would.

__________________
NiteOwlBrewing is offline
 
Reply With Quote Quick reply to this message
Old 08-02-2012, 12:27 PM   #8
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 18 Times on 11 Posts
Likes Given: 23

Default

Quote:
Originally Posted by NiteOwlBrewing
Will this work as a stand alone element controller? It seems it would.
Sure it would. But if that's your plan, you can leave out all but just a few components.
__________________
chuckjaxfl is offline
 
Reply With Quote Quick reply to this message
Old 08-02-2012, 08:15 PM   #9
stamandster
Feedback Score: 0 reviews
Recipes 
 
Join Date: Jun 2011
Location: springfield, ma
Posts: 761
Liked 51 Times on 44 Posts
Likes Given: 26

Default

Quote:
Originally Posted by chuckjaxfl View Post
I'll barter one instead? Click on my name and do the "donate" thing for a membership for me, and I'll send you one. That way, the board here actually gets the money. Sound fair?

Wait until I get another one put together, though. I've got some family here with health issues. If you do send the money, then I disappear for a week or more before I get it to you... that would bother me a lot.
Pm sent! How do you connect to the chip to adjust the PWM? I like the idea of the fine tuning of the percentages but looking for a full off and then full on @ 0 and 100% respectfully.
__________________
Untappd - @TheBarleyMen - The Barley Men - Blog
stamandster is offline
 
Reply With Quote Quick reply to this message
Old 08-02-2012, 09:26 PM   #10
chuckjaxfl
Feedback Score: 1 reviews
Recipes 
 
Join Date: Feb 2010
Location: Jacksonville, FL
Posts: 327
Liked 18 Times on 11 Posts
Likes Given: 23

Default

Quote:
Originally Posted by stamandster

Pm sent! How do you connect to the chip to adjust the PWM? I like the idea of the fine tuning of the percentages but looking for a full off and then full on @ 0 and 100% respectfully.
I'll have to do that for you before I send it. I temporarily solder a six pin header into the corner and hook up a programmer as I'm assembling it.

Where would you want the center of your 'fine control' band to be?
__________________
chuckjaxfl is offline
 
Reply With Quote Quick reply to this message
Reply



Quick Reply
Message:
Options
Thread Tools