New Gadget project started. Fridge fan controller. (2 Viewers)

OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
Looks complicated I will stick to mechanical things
Bill

Looks can be deceiving. I will post construction instructions later. If you can solder two wires together you should be able to do this.
 
Nov 18, 2011
11,862
43,022
Planet Earth
Funster No
18,938
MH
A van
Exp
Over 25 year's
Looks can be deceiving. I will post construction instructions later. If you can solder two wires together you should be able to do this.
So if I can rebuild a mig welder that had two Wier's to solder a capasetator. To replace five resistor's and a bridge rectifier
Wire fead dead motor and a broken switch
Had fallen in the canal and shorted the hole marina stunning every bit of maren life within ten feet :Eeek:Thinks I should be OK then (y)
 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
So if I can rebuild a mig welder that had two Wier's to solder a capasetator. To replace five resistor's and a bridge rectifier
Wire fead dead motor and a broken switch
Had fallen in the canal and shorted the hole marina stunning every bit of maren life within ten feet :Eeek:Thinks I should be OK then (y)
This will be a walk in the park in comparison to that Bill :D

Subscribers  do not see these advertisements

 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
Just heading off to pick up the parts now :) Tomorrow I should be able to make a start on the hardware.
 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
Collected the next batch of arrivals... 17 Packages..... Guess what? The electrolytics for the PSU section haven't arrived yet :(

Not a problem just yet as I can crack on with what has arrived.

I will do a picture thingy later. However one of the items was a variable power supply. Using a small adjuster on the board I can adjust the output voltage from 1v to 17v. The input being 4.75-23V.

I was expecting something about an inch long and 3/4" wide. It is actually smaller than my thumbnail. Brilliant. I can solder it directly to the prototyping board so it becomes integrated into the design. It is tiny :D
 
Aug 18, 2011
12,139
18,005
derbys
Funster No
17,808
MH
AUTOSLEEPER SYMBOL
Exp
since 2007.Tugger before since 1970
I did buy a temperature sensor/controller when I bought the fans but fitting it started to get complicated, needed more wires, holes etc and began to confuse me so reverted to quick and easy fix.

I don't switch them on and off much, just leave them on if it's hot as I can't hear them it is not a problem and I work on the theory that if they are on when not really needed it won't do any harm ( I hope:) ). I f the fans wear out prematurely they are not expensive so will just replace.
Exactly what i did,,,i am still in the stone age,,keep it simple,,BUSBY.

Subscribers  do not see these advertisements

 
Aug 18, 2011
12,139
18,005
derbys
Funster No
17,808
MH
AUTOSLEEPER SYMBOL
Exp
since 2007.Tugger before since 1970
The problem with that for me as previously mentioned is
a) the fan is going full blast.
b) the fan is running all the time.

I am sensitive to fan noises and that would drive me up the wall.

Think i must be deaf don't even hear a fan heater when i am in bed,,,,BUSBY,,,:D:D
 
Apr 9, 2014
1,307
6,596
Lincs
Funster No
30,922
MH
Coachbuilt
Exp
2012
Nothing useful to add. Just wanted to express admiration for the explantions, keep it coming please, thanks :)

Subscribers  do not see these advertisements

 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
Just been playing around with the breadboard layout, realised I don't have a spare cigar socket plug to get 12v from so another order has been placed.

This is first messings.

Before the eagled eyed amongst you point at that the resistors are the wrong value, I just took the first ones out of the bag to get the layout sorted.
And the pins on the CPU are wrong I just put them there temporarily while I got the rest of the circuit done.


breadboard-messing.jpg


After this play around I am actually not going to develop this on the raw chip, I am going to develop using the Arduino Uno I have, then once the circuit and the software tests out migrate the design to the ATTiny85 and vero board.
 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
The software is now in progress.

I am going to monitor the temp differential every 5 seconds and keep 5 previous values in a FIFO buffer (first in first out).
Rather than using a PID algorithm to set the speed I am going to monitor the effectiveness of the fans and adjust based on that.

Roughly speaking,
  • If the temperature is falling, the fan will stay at that speed for 3 cycles then slow by one unit.
  • If the temperature is stable but over a threshold it will increase the fan speed by one unit and monitor for 3 cycles.
  • If the temperature is rising, the fans will increase in speed every 2 cycles until the rate of change reduces (Then possibly back off).
  • If the temperature difference is less than 15°C turn the fans off.
  • if the absolute temperature of the bottom fan is below 15°C turn the fans off.
There is more to it than this and I will test and adjust the monitoring period, the size of the FIFO buffer and various other parameters.

It occurred to me that basing it purely on the difference in temperature and using PID to control the fans towards a target temperature would mean that each of these circuits that are built would need to be tuned for each fridge cabinet. I had believed that a happy medium was achievable by only using 2 parameters for the PID, however although this would kind of work it wouldn't give the optimal results I was seeking.

I am currently waiting for a cigar socket plug to arrive so I can supply 12v to the mosfet that will control the fan speed. This arrives next tuesday so should be able to do some real world tests later next week.

Arduino/Atmel C++ is an easy language for me fortunately so I didn't have much of a learning curve on that :)
 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
One more bit of news. I found out that Eagle Cad has a free version that will hande PCB's up to 100mm x 100mm for free. I have downloaded that and am getting on with it nicely. I also found a PCB manufacturer who can do 10 Boards for $10. So I may even be able to supply a few professionally made PCB's. Although this is not certain yet.

http://www.pcbway.com/orderonline.aspx

Subscribers  do not see these advertisements

 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
Had a bit of a play today sorting out the 12v to 5v buck converter. I noticed a very slight buzzing which I suspect is the 100Khz clock on the oscillator. However I can't really tell. I also suspect there is some ringing... I am really stretching my memory 25 years to my electronics theory so I am struggling without an oscilloscope..

Time to spend some more money :(

I can't afford a high end or even medium budget oscilloscope so I am looking at the budget kit ones from China. I only need it to be able to handle 100KHz or there abouts. The maximum voltage I will be dealing with is 5V and I won't be doing anything complicated like multi channel, timings or FFT. So I think this one should do the job.

Broken Link Removed

Unfortunately I have to build it myself and I reckon it will take a good 3-4 hours... But for £20 for a piece of gear that would have cost me many £100's 25 years ago I cannot complain.

So I have to wait another 10 days or so for delivery of this. However I can still get on with the actual project in the meantime.

Oh and if you are wondering what I was doing with the buck converter. The CPU runs at 5V and the Fans at 12v. So I need to step down convert the 12 to 5v. I have a couple of separate buck converters for my own project. But if I decide to make a PCB I will want to integrate the MC34063A SMPS chip onto the same board as the Arduino.

http://www.ebay.co.uk/itm/141664251045
 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
Damnit. Placed the order with BangGood. Then thought I would see how much Amazon sells it for.



£2 more but would have been here in 2 days instead of 10-16. That will teach me to rush into it :(
 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
I have been playing with the code a bit more and have simplified it some more.
1) If the lower temperature is below 15°C switch fans off.
2) If the difference between the two fans is less than 15°C turn the fans off.

So the fans only come on once the temperature behind the fridge reaches 30°C.

Then what I am doing is keeping a log of the last 2 temp readings plus the current one at 10 Second intervals. This appears to be the time it take for the temperature to stabilise in a 2 meter column with 2 fans pumping. So the 20 seconds ago temp reading is now stored in A, 10 seconds ago B and current in C. The following rules are used.

If A<B<C then increase fan speed.
If A>B>C then decrease fan speed.

For all other eventualities leave the fan speed as is.

Basically what this means is that if the temperature is falling over 3 measurements, decrease the fan speed. If the temperature is rising over 3 measurements increase the fan speed. If the temperature has gone up then down, or down then up maintain the fan speed until the direction of travel has been established.

Remember these figures are the difference in temperature less 15C.

The only thing I need to test now is how much to increment/decrement the fan speeds each time. They are in a % range from 0%-100%. If I choose too low a value say 1% it will take forever for the fan to get up to speed (at 1% every 10 seconds). At 10% change each time it may make the variations too big and never find a stable range. So at 5% it moves fast enough to have an effect quickly but not so fast that it creates massive swings. Now the value to inc/dec each time is what I need to figure out through testing. I am guessing it will be either 5%, 10%, or 15%. But only testing will give me the answer.

What I am planning to do is mockup a fake fridge box with 2 vents out of corrugated cardboard and test it out. I will make it with an inner box on the bottom and an outer box on the top so I can slide them apart to test it on different height fridges. I will buy a cheap 12v hair drier to inject heat into it. I know it is a bit heath robinson but should give me a reasonable guideline on the most effect speed increment.

Work on this project is now on hold for a week while I get some money earning work done.

Subscribers  do not see these advertisements

 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
Just had another thought.. Will test later.

Z = speed change inc/dec rate. ie 5% or 10%.
A>B<C = inc speed by Z
A<B>C = dec speed by Z
A>B>C = inc speed by Z x 2
A<B<C = dec speed by Z x 2

As before if the temp has increased or decreased over the 3 monitoring period increase the fan speed by 2 X the inc/dec rate.
However if the temp went up then down we now reduce the fan speed by 1 x the inc/dec rate. This up then down indicates that we increased the fan speed in the previous cycle and it had a good effect. We don't want to over run so we will reduce it by 1 unit. The same goes for the other direction. If the temp fell then rose, it probably indicates that the fan was having an effect and we slowed it down but the temperature is now rising again...

I think this will give us a good balance of getting the fan roughly to the right speed but reduce over run/under run issues.
 

OldAgeTravellers

LIFE MEMBER
Jan 6, 2014
1,207
1,387
Telford, UK
Funster No
29,599
MH
A Class
Exp
Since 1970
All looks very good, but the testing will tell. Would it not be better to use a couple of light bulbs for the heat source rather than introducing moving air with a hair drier?
I am amazed by that £20 scope. I will be very interested to see what you think of it when you get to use it. I notice that the one from China came with a case which the Amazon one didn't.
Best of luck with the project. I am enjoying it very much. Shame you have to stop to make money. So pleased to be retired, should have done it 40 years ago. Really don't think I could find the time to work now!
Steve
 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
Looking at the PCB options I have decided to do prototypes using through hole mounting for speed of testing/rip down.

However when going for the final design I will be doing SMD (Surface mount) on dual sided boards.

I was just looking to see if anyone did a kit of SMD caps/resistors and found this. For those into electronics is it beautiful sight...


resistors-caps-1085.jpg


I can get them at almost half the price from China, but I think when I am ready to order this I will want it quick :)

PS: I found the problem with the buzzing from a previous post. It wasn't the 100KHz from the switch mode supply. It was the very low frequency I was using for the PWM from the arduino. My next task will be how to change the PWM output frequency up to around 25KHz which is above audible range. The ringing was sorted by increasing the size of the resistor on the gate of the Mosfet. I am going to play around with this a bit more to get the optimal size for this resistor once I have increased the frequency.

Subscribers  do not see these advertisements

 

Riverbankannie

LIFE MEMBER
Mar 11, 2016
10,533
61,537
Bristol
Funster No
41,967
MH
IH 630 RL PVC
Exp
12
Been a while since I caught up with this "simple £4 fridge fan with controller" project. @Gromett you seem to be morphing into "What I bought today" @Techno !
 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
Yes, but think of all the exciting projects he can think up when he has all that kit.:LOL:
The problem I am having is I am building an electronics lab from scratch. I keep realising I need more stuff at each stage which is slowing the process down.
Over £200 spent so far to make a £4 fan controller :eek:

Future projects will make the expense worthwhile though :D

Subscribers  do not see these advertisements

 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
I have just had an hour thinking over the various requirements for this project. I have these three contradictory requirements.
1) Can be made and programmed by anyone on here.
2) Is ultra lower power as small as possible (for me)
3) Can be manufactured using a commercial process.

The first option requires a built in usb port and through hole mounted components. This is so that it can be programmed and reprogrammed if I produce updates. It also means you don't need to buy a separate programmer and faff about with ISP configurations which can be messy. The downside of this is you will be using a tiny bit more power keeping the USB chip powered up even when not programming it. It also means there will be 2 boards, the microcontroller and the actual circuit. The final downside is the price as an arduino with a usb port will cost at least £2. The upside is, it is very simple to make at home. I would also make it using an analogue regulator for power to keep it simple.

The second option which was my original plan was to make it using a bare chip, using the minimal possible components. I would program the chip using an ISP then solder it to the final board This would leave me with a single circuit board that was very small and use the lowest possible power. How it would be hard for a lot of people to replicate and wouldn't be suitable for manufacture.

The final option, required a single PCB with build in power supply (to convert 12v to 5 using switch mode), it must have an ISP port on it so that it can be programmed after assembly. This would add a bit to the cost as a switch mode psu is a bit more costly requiring things like an inductor as well as the regulator chip.

What I have decided to do for the forum, is to make the option 1 and document it fully so anyone can make one. It won't be as cheap as £4 but will be very easy to make.
Once it is tested out and working, I will make my own version. Then at a later date if required can do the third version.

What this means, is that I will be using an arduino nano for your version. A second board will have the 12v and 5v circuits on it and the fan control mosfet. I will design it so that you can either use Dupont style header pins to connect the boards or single wires directly soldered. Don't worry if you don't know what any of this means, it will all become clear.

A new batch of components arrived today but I am still missing the electrolytic capacitors which was one of the first things I ordered. However I do have enough to work on the fan control and the temp sensors. My LCD display arrived today so I can do the debug work without having to link in a serial port :)

I am back on a money earning job at the moment but hope to have some time monday/tuesday to make some serious progress, publish pictures and perhaps even some code :)
 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
Just to clarify a point and explain something.
It is my intention for my own project to use the ATTiny85 which is an extremely small fully self contained microcontroller that comes in a very small 8 pin chip. But has no peripheral components such as USB or voltage regulators etc. It only has 6 IO ports.
For the public version of the project I will use the Arduino Nano which has lots of onboard stuff such as USB interface etc etc.

At ATTiny85 costs me about 50p each but needs lots of work to program and support.
The Nano costs about £2.50 but is an entire computer on a chip and comes with tonnes of IO ports.



Rather than try to explain the difference here is a video someone else did. You will also see the micro which needs an external programmer. I hope you find this helpful/interesting.

 
May 29, 2013
2,597
19,230
Tyneside
Funster No
26,231
MH
Chausson best of Flash 10
Exp
Several years now
What are you using as the temperature sensing elements ? Thermistors ? I'd be concerned that the speed of response for your temperature sampling could be too quick, ie, you might get random "snap-shots" of air temp. How about fixing the themistors to small heatsinks ? That way you'd even out the temperature variations. Might make the software sampling simpler as well.

Subscribers  do not see these advertisements

 
OP
OP
Gromett
Feb 27, 2011
14,737
75,972
UK
Funster No
15,452
MH
Self Build
Exp
Since 2005
What are you using as the temperature sensing elements ? Thermistors ? I'd be concerned that the speed of response for your temperature sampling could be too quick, ie, you might get random "snap-shots" of air temp. How about fixing the themistors to small heatsinks ? That way you'd even out the temperature variations. Might make the software sampling simpler as well.

No I am using accurate digital temperature sensors. DS18B20 – 1 wire temp sensors.
If you look back you will see I am using a method that allows for any lag in change. The sample rate is every 5 or 10 seconds.

I didn't even consider using thermistors as they are inefficient and slow to react.
Thanks for the suggestion though :)
 

Join us or log in to post a reply.

To join in you must be a member of MotorhomeFun

Join MotorhomeFun

Join us, it quick and easy!

Log in

Already a member? Log in here.

Latest journal entries

Funsters who are viewing this thread

Back
Top