Insert BS here A place to discuss anything you want

Looking for PID controller for 120v fan

Thread Tools
 
Search this Thread
 
Old 08-23-2021, 12:41 PM
  #1  
Elite Member
Thread Starter
iTrader: (2)
 
fooger03's Avatar
 
Join Date: Jan 2009
Location: Columbus, OH
Posts: 4,140
Total Cats: 229
Default Looking for PID controller for 120v fan

I hope this is way easier than I'm making it out to be.
I recently installed a 6" in-duct booster fan for the HVAC vent to our home office. It's been getting to 80 degrees or more in there during the day, especially with the sun coming through the picture window every morning until about 1130 am. I installed the booster fan as far away from the actual heat/cool register vent as possible (nearest the HVAC trunk line), but even so, it's extremely loud at full blast, though it does probably quadruple the volume of air going through the single register vent in the office. I've found plenty of what appear to be PID switches on amazon and such, but it looks like they use electric relays for on/off performance versus variable speed, which means the fan would just be alternating between LOUD and OFF all day long, which sort of defeats the purpose of the office. I'm guessing that since it uses 120V AC power, I need to be using a voltage regulator instead of a pulse width modulator, but I'm not even sure that's correct. The fan has a simple **** controller for speed on the power cord to vary the fan speed, which I'm guessing is just a simple voltage controller, so I know that regulating fan speed is obviously possible.

Is there a solution out there which I'm totally forgetting exists which consists of a temperature probe to mount in the office, an interface to set the temperature (and possible pid parameters), and a voltage regulator or perhaps a PWM controller to control the speed of the 120VAC inline duct booster fan?

Thanks, electrical engineers, arduino geeks, IFTTT power-users and all other all-knowing peoples.
fooger03 is offline  
Old 08-23-2021, 02:07 PM
  #2  
Elite Member
iTrader: (3)
 
deezums's Avatar
 
Join Date: May 2014
Location: Kansas
Posts: 3,146
Total Cats: 201
Default

A voltage regulator would require rectifying to DC and then getting a new fan, either that or getting an expensive variac. If the AC motor has multiple speeds, they usually do it with capacitor. If you wanted to PWM, you'd have to use a triac since you are switching AC. That is going to greatly limit the frequency you can PWM at, and that's probably going to make it sound like ****.

I don't know of any cheap way to do what you want, but you want a VFD.
deezums is offline  
Old 08-23-2021, 02:19 PM
  #3  
Senior Member
iTrader: (1)
 
gesso's Avatar
 
Join Date: Mar 2010
Location: Bay Area, CA
Posts: 811
Total Cats: 270
Default

Originally Posted by fooger03
[...]The fan has a simple **** controller for speed on the power cord to vary the fan speed[...]
Did the fan wire directly into the house mains or does it have a wall wart/plug?
Do you have a link to the fan in question?
Mostly I'm wondering if it's actually a 120v fan or if its a DC fan with a rectifier already attached (the speed control **** is what makes me wonder).
gesso is offline  
Old 08-23-2021, 03:49 PM
  #4  
Elite Member
Thread Starter
iTrader: (2)
 
fooger03's Avatar
 
Join Date: Jan 2009
Location: Columbus, OH
Posts: 4,140
Total Cats: 229
Default

Amazon Amazon

Fan @ attached link. Thank you for the response so far.

I'm not opposed to buying a different fan if that's the best solution.
fooger03 is offline  
Old 08-23-2021, 04:24 PM
  #5  
I identify as a bear.
iTrader: (8)
 
Joe Perez's Avatar
 
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,104
Total Cats: 6,639
Default

For a simple AC motor like that, you can buy fan speed controllers right off the shelf at Home Depot.
Joe Perez is offline  
Old 08-23-2021, 07:50 PM
  #6  
Senior Member
iTrader: (1)
 
thebeerbaron's Avatar
 
Join Date: Dec 2007
Location: San Jose
Posts: 659
Total Cats: 341
Default

Originally Posted by Joe Perez
For a simple AC motor like that, you can buy fan speed controllers right off the shelf at Home Depot.
He's already got the fan speed controller built into the product, what he's looking for is to replace the three position **** with thermostatic control.

I have no idea how to do that, but I suspect you do, Joe.
thebeerbaron is offline  
Old 08-24-2021, 01:32 PM
  #7  
Junior Member
 
Spaceman Spiff's Avatar
 
Join Date: Apr 2018
Location: Central Texas
Posts: 356
Total Cats: 93
Default

Looks like the speed control done by the little **** box thingy is nothing fancy. VFD would be proper, but also way overkill for this application (that said if you're interested, Automation Direct sells a great, cheap micro VFD for ~$100).

If I had to guess (as most cheap fans use this) it's a permanent split capacitor motor. Basically, you have different valued capacitors attached to a rotary/multi-pos switch between line and one of the motor windings. Changing capacitor value changes the phase/amplitude of the waveform sent to the windings and thus the motor torque.



You could take apart the little controller thing, but odds are the circuit looks something like this (though obviously capacitor values vary with exact motor, https://www.circuitlab.com/editor/#?id=84x8uw, https://electronics.stackexchange.co...17837#217837):



where your speed control might follow:
Code:
SW1   SW2   SW3   Speed
Off   Off   Off   Off
On    Off   Off   Low
Off   On    Off   Medium
Off   Off   On    High
You could do a little testing with some common capacitor values to see what gives you acceptable noise levels, and then setup a small home automation setup over ZigBee/Z-wave with a ras pi controlling some relays which adjust capacitor value to the winding, and a temp-sensing light switch or something along those lines in your office to act as the process value for the "thermostat" (i.e. prefer fan on when room unoccupied, temp high, lowest setting when room occupied, temp high, off when temp low). In all likelihood you'll be using something closer to bang-bang control vs. PID, but it should work!

Some smart home links:
https://www.home-assistant.io/installation/raspberrypi/
https://magpi.raspberrypi.org/articl...h-raspberry-pi
Amazon Amazon
Amazon Amazon

Hope that helps! Not an expert by any means but you gotta occupy the time somehow when you're pooping at work.
Spaceman Spiff is offline  
Old 08-24-2021, 05:56 PM
  #8  
Elite Member
Thread Starter
iTrader: (2)
 
fooger03's Avatar
 
Join Date: Jan 2009
Location: Columbus, OH
Posts: 4,140
Total Cats: 229
Default

Thanks so much! this is awesome! My poops are way cooler with MT.Net on my side!

The rotary dial on the fan has markings for "low", "medium", and "high", but its actually infinitely adjustable - there are no detents for those three fan speed positions.
fooger03 is offline  
Old 08-24-2021, 06:08 PM
  #9  
Elite Member
iTrader: (3)
 
deezums's Avatar
 
Join Date: May 2014
Location: Kansas
Posts: 3,146
Total Cats: 201
Default

I could send you some links for controlling a stepper motor with arduino, plus adding a temp sensor and PID loop for calculating stepper position. Duct tape the motor shaft to the dial. You'd be able to kick start the fan if it's needed to get it moving. You could probably even add a trigger off the AC, so the fan only tries to run when the AC is on. What I'm picturing is just a bunch of "libraries" piled together with maybe two or three variables for you to manage yourself, no real coding on your part.

Parts off ebay or amazon would probably be less than ~$20, and you wouldn't be playing with any dangerous voltages...
deezums is offline  
Old 08-24-2021, 07:25 PM
  #10  
Elite Member
Thread Starter
iTrader: (2)
 
fooger03's Avatar
 
Join Date: Jan 2009
Location: Columbus, OH
Posts: 4,140
Total Cats: 229
Default

that sounds like a great idea; I think I'd enjoy the challenge of learning arduino. I imagine I could print a mount for the stepper motor to the fan controller with the 3D printer.
fooger03 is offline  
Old 08-24-2021, 08:23 PM
  #11  
Senior Member
iTrader: (1)
 
gesso's Avatar
 
Join Date: Mar 2010
Location: Bay Area, CA
Posts: 811
Total Cats: 270
Default

Attach the stepper to the side of the controller, and connect the stepper shaft to the controller **** with a rubber band (a big broccoli one would likely work well). The smaller stepper shaft and larger control **** would give you nice "gear" reduction for the stepper motor.
gesso is offline  
Old 08-24-2021, 08:27 PM
  #12  
Junior Member
 
Spaceman Spiff's Avatar
 
Join Date: Apr 2018
Location: Central Texas
Posts: 356
Total Cats: 93
Default

Originally Posted by fooger03
Thanks so much! this is awesome! My poops are way cooler with MT.Net on my side!

The rotary dial on the fan has markings for "low", "medium", and "high", but its actually infinitely adjustable - there are no detents for those three fan speed positions.
In which case ignore everything I've said haha.

I like deezums idea, you could just mount the fan controller to a plate and use standoffs to mount a standard nema stepper to the same plate. no fab necessary beyond some holes.
Spaceman Spiff is offline  
Old 08-24-2021, 08:59 PM
  #13  
Elite Member
iTrader: (3)
 
deezums's Avatar
 
Join Date: May 2014
Location: Kansas
Posts: 3,146
Total Cats: 201
Default

You might even be able to pull the **** off the controller and use a piece of 5MM ID tube as a very low tech coupler. I think those potentiometer/encoder/rheostat shafts are usually 5mm?

I'd get a basic arduino uno, the one with the barrel jack. You'll also need a 9VDC wal-wart, or the one from a jimstim works most times. I think unos are good for 16V. That will be enough to run the stepper motor, too.

Amazon Amazon

Amazon Amazon

I would look for DRV8825/A4988 stepper drivers on the little breakout boards meant for 3d printers. You'll need some male to female jumper leads to hook it up. Any nema17 motor will probably be more than enough with no gearing, if there aren't any detents.

Amazon Amazon

Depending on where you want the temp sensor compared to where your speed controller is kinda matters. If it's a long way away, more than a few feet, I'd get a thermistor style, otherwise you could try a digital style. With an analog one you'll need to make a voltage divider with a single resistor and thermistor, otherwise the digital ones just plug in. It seems BMP180 breakout boards are getting cheap, with one of those you could sense temperature and pressure. If it's in the duct you could probably pick up when the main blower was actually running. Some soldering required.

Amazon Amazon

Amazon Amazon

That's more or less where I would start.

https://github.com/laurb9/StepperDriver
https://github.com/laurb9/StepperDri...pperDriver.ino

That's an arduino stepper library and a really basic example. You'd want to use the setup function to make sure the motor is cranked all the way back. I'd probably also use the enable feature to keep the stepper motor from burning up when it's not doing anything.

Here's the PID library, which should work.
https://playground.arduino.cc/Code/PIDLibrary/

This is more or less how you "start" PID on the arduino using the library. Input, output, and setpoint. Going through the documentation a bit more and you'll find the way to set the limits of the output and other stuff.
https://playground.arduino.cc/Code/P...ryConstructor/

https://playground.arduino.cc/Code/P...yBasicExample/

That's a really basic example. Instead of calling "analogWrite(3,Output);" you'd be able to write an alternative function controlMotor() or whatever that does stuff like enabling the motor and letting it have time to adjust before calculating a new move, ignoring no change or small changes in outputs, bump starting the motor from being stopped and all that other good stuff.

Last edited by deezums; 08-24-2021 at 09:19 PM.
deezums is offline  
Old 08-24-2021, 10:49 PM
  #14  
Elite Member
Thread Starter
iTrader: (2)
 
fooger03's Avatar
 
Join Date: Jan 2009
Location: Columbus, OH
Posts: 4,140
Total Cats: 229
Default

So if i wanted to measure temperature approximately 20' away, it wouldn't be as simple as wiring in a TMP36? It seems like the voltage is appropriate for the arduino. I feel like I'm missing a fundamental rule here.

Except for the temp sensor, I'm now about $45 poorer. :-)
fooger03 is offline  
Old 08-25-2021, 01:38 AM
  #15  
Elite Member
iTrader: (3)
 
deezums's Avatar
 
Join Date: May 2014
Location: Kansas
Posts: 3,146
Total Cats: 201
Default

That would be alright, it might pick up some noise but I doubt it's enough to matter.
deezums is offline  
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
rleete
Insert BS here
25
08-06-2019 05:12 PM
Dr. Nick
Insert BS here
156
12-14-2013 05:53 PM
rmcelwee
Insert BS here
1
07-20-2013 08:16 AM
rmcelwee
Insert BS here
13
12-24-2011 01:10 PM
JEMERY
Insert BS here
4
06-12-2010 11:42 PM



Quick Reply: Looking for PID controller for 120v fan



All times are GMT -4. The time now is 09:28 PM.