Page 1 of 5 1234 ... LastLast
Results 1 to 25 of 103

Thread: SexyMF DIY controller - so far

  1. #1
    Xtreme Addict
    Join Date
    Nov 2005
    Location
    Auckland, New Zealand
    Posts
    1,075

    Post SexyMF DIY controller - so far

    As some of you know I decided to attempt to make a controller for a single system.

    The goal was to make it open source, easy to build and cheap.

    I decided on these specs:

    0.2C steps -55 to +50C
    Hardware settable condensor overtemperature set-point (activates an output) 0 -> 50
    Hardware settable computer on set-point (activates an output) 0 -> -55
    Hardware settable condensor temperature optimal point (for the fan control) 0 -> 50
    Automatic fan throttling based on condensor temperature

    Thermistor sensors
    LCD display

    This is the first time I have used thermistors and so it was a learning curve. A thermocouple implementation would have been a lot easier but price of

    thermocouples and the required CJC (cold junction compensation) ICs is to high - compared to the thermistor.

    The system is simple. It works using 3 potentiometers to alter the set-points. You hold down the only button while turning it on and it goes to a visual

    calibration mode. Turn the pots and when done release the button and the system moves on to a startup routien.
    The startup loop checks your setpoint against the current evaporator temperature. A pulse is sent out a port to trigger something (ie a relay). During the

    startup loop the fan is throttled and the condensor temperature is checked against the overtemperature setpoint.
    Once the on set-point is reached the condensor and evaporator temperatures are shown. The fan and overtemperature checks are also polled.


    Technical wise:

    Implementation of the temperature calculation was done using a massive (1k) lookup table. This was calculated in excel using manufacture datasheets for the

    thermistors I choose. Subsiquently I found there to be many thermistor manufacturers which supply software or precalculated tables (R/T curves).
    It became apparent that with such a large temperature range the thermistor resistance values change dramtically on the low scale but very little on the

    higher end. It was not possible to pickup the subtle change in voltage with the 10bit ADC on-chip. So I had to do some oversampling. The program uses an

    effective 5bit oversample for an effective 15bit ADC.

    The safety cutout is designed in the way that the controller has dedicated power. In an overtemperature situation the computer is first shutdown then the

    other port triggers. I had intended for this trigger to shutdown the compressor. The fan control coming from the uC remains on. During the pull-down before

    computer on, an overtemperature situation will not trigger the computer-on output. Only the cutout output.


    This is a work in progress. I am entirely self taught for AVR assembler programming. I built my programmer as many of you will.
    There are probably still some bugs I have not picked up on. This is were I would like your help.

    I offer you a barebones setup. Customisable because there is fully commented code.

    Enjoy this first installment.

    The prototype



    Temperature testing against a thermocouple (borrowed)



    Basic schematic - for now at least



    Code so far:





    Some references for some light reading:

    www.atmel.com
    www.avrfreaks.net
    http://avr-asm.tripod.com/
    http://www.geocities.com/dinceraydin/lcd/intro.htm
    http://www.sixca.com/resource/micro/index.html
    ADC oversampling http://www.atmel.com/dyn/resources/p...ts/doc8003.pdf

    AVRStudio http://www.atmel.com/dyn/products/to...p?tool_id=2725
    Pony Prog http://www.lancos.com/prog.html
    YAAP http://www.myplace.nu/avr/yaap/

    STK200 dongle http://sbprojects.com/projects/stk200/stk200.htm

    http://www.alldatasheet.com/datashee...I/74LS164.html
    http://www.atmel.com/dyn/resources/p...ts/doc1477.pdf
    Attached Files Attached Files
    Last edited by SexyMF; 11-24-2006 at 08:12 PM. Reason: Update

  2. #2
    Xtreme Addict
    Join Date
    Nov 2005
    Location
    Auckland, New Zealand
    Posts
    1,075


    Here are some very poor quality AVIs of the controller...


    Calibration... press the button and turn the pot

    Download Calibration.AVI

    Pull-down.. on at your setpoint.

    Download Pulldown.AVI
    Last edited by SexyMF; 11-24-2006 at 08:46 PM.

  3. #3
    Xtreme Addict
    Join Date
    Aug 2005
    Location
    Somewhere on earth between Taipei, Paris and Montreal
    Posts
    1,194
    This can be very interesting

    I search about using thermocouple for an extended range like -100*C to +100*C.
    Overclocking-TV Staff
    Quote Originally Posted by hipro5 View Post
    Ha, ha, ha.....NO WAY.....When I show someone preparing to take a shot, I hided the cigarette....

  4. #4
    -100c Club Member
    Join Date
    Apr 2004
    Location
    Portugal
    Posts
    591
    sounds interesting although i dont understand half the stuff

    .... i hate electronics heheh

  5. #5
    HVAC/R student
    Join Date
    Nov 2005
    Location
    Em City
    Posts
    519
    Nice work there MF. Could you possibly give us some wiring schematics? I know this is a work in progress, but it'd be nice to know how to wire it up, and of course what components to use.
    Last edited by Big SturL; 11-10-2006 at 04:53 AM.
    ...is no longer working as an assistant HVAC/R-installer...
    But, is still blasting 20000 songs of real Rap

  6. #6
    Xtreme Enthusiast
    Join Date
    Sep 2005
    Location
    Christchurch New Zealand
    Posts
    633
    Nice work there dude. Do you plan on making any yorself, for sale on any scale? or do you simply just want to design it? I have 3 SS DD units about to start, and probably more after that, I "could" be interested in a few.
    Quote Originally Posted by kayl View Post
    the ethylene in NZ is colder
    Quote Originally Posted by DetroitAC View Post
    When in doubt about an unknown substance, I taste it just in case it's pie.
    Quote Originally Posted by Pete View Post
    Would you be willing to piss over the mona lisa?

  7. #7
    Xtreme Enthusiast
    Join Date
    Oct 2005
    Location
    Sugar Land, TX
    Posts
    581
    I planned on building something like that. Can you please detail which IC pins go to which lines in the ATX connector (i.e. what wires to intercept and which to tap)?

    Quote Originally Posted by A HVAC friend of mine
    If Hannah was an air handler, I would be a condensing unit so I could open her TXV and pump my refrigerant through her evaporator coils.

  8. #8
    HVAC/R student
    Join Date
    Nov 2005
    Location
    Em City
    Posts
    519
    My guess Star, is that it is connected to the PWR-pin on the motherboard, not the ATX-cable.
    ...is no longer working as an assistant HVAC/R-installer...
    But, is still blasting 20000 songs of real Rap

  9. #9
    Xtreme Mentor
    Join Date
    Mar 2006
    Location
    Redvers, Sask, Canada.
    Posts
    2,974
    Op amps rock espesialy the 310 series from SG
    Bring back natural selection! No more warning lables!

    The one and Only MG Pony

  10. #10
    Xtreme Addict
    Join Date
    Nov 2005
    Location
    Auckland, New Zealand
    Posts
    1,075

    More detail

    SoddemFX:

    I had considered swapping ranges. The uC can be used as differential ADC inputs with gain. So no extra parts required. But the added bonus of oversampling is that it takes a good deal of time. Slowing the whole update rate down. Thermistors have a long settling time anyway. The fan automatical speed change doesn't go hunting because of too fast an update.
    I had intended the condensor temperature to be measured at the output. So if you hit 50C there then things are not going well.

    Big SturL:

    That is the full wiring schematic shown except for what you put on the PWM/Cutout/Computer ON outputs. Join the red labels to red labels and that is it.
    Vcc = 5V
    3 x 10k resistor (1/4 or 1/2W)
    1 x 1nF cermanic capacitor
    1 x ATMEL ATTiny26
    1 x 74LS164 8 bit shift register (alternatives will work, like HEF4094)

    This is technical but easily implemented.
    These parts are different depending on your needs:
    You must generate the 15 bit ideal ADC voltage tables for your chosen thermistor. This is done with the datasheet or software from the manufacturer.
    I used
    2 x 470K 1% tolerance resistor (1/4 or 1/2W)
    2 x Thermistor EPCOS B57861S0502J40 (5k 5%)

    The 470K [R1] is chosen as follows:
    the thermistor is in a voltage divider with 5V source.
    the thermistor has a resistance of ~481k @ -55C
    we want the voltage across the thermistor for input into the ADC to be just under 2.54V (that is the top voltage reference for the ADC)
    So you solve this 2.54 = 5 x R1/(R1+thermistor resistance) to get R1.

    I used an excel table to work out the nominal resistance vs temperature for my chosen thermistor.

    The PWM can be directly tied to something like an IRF7805 MOSFET. This is capable of handling both fans (condesonr and vent) in parallel.

    The computer on signal could be tied into a solid state relay like OMRON G3VM-351E N. Or drive a small signal transistor which is switching a normal 12V/5V relay. This would be connected in parallel with the POWER switch on the motherboard. That way you can still override the power on.

    The cutout signal probably should go to a small signal transistor switching a 12V/5V relay which is in series with your compressor. So as to shut it off on overtemperature fault.

    I simply used a 12V plug pack and a 7805 voltage regulator to power my prototype. If you used a 1.2A or so plug pack that is enough to run the fans at 12V and the controls at 5V. Something like an old scanner power supply.

    The LCD and controller use little current. It is the LCD backlight and fans which gobble all the juice. But they are only say 1/4 amp per fan and 1/4 amp for the backlight. My LCD didn't have a backlight. If you use a backlight then I would run it off another 5V regulator so as the keep the heat down.


    So to sum up. To build this, at minimum you require to build a programmer so you can insert the code and eeprom data into the uC. These are dead simply to build. The STK200 dongle is the standard but it can be done using just a few wires from the parallel port. Google is your friend.


    Once I'm happy with this I will fully surface mount it. The footprint should not exceed the size the the LCD.

  11. #11
    Xtreme Member
    Join Date
    Nov 2005
    Location
    wine city
    Posts
    148
    tip : there are nice and cheap temp sensors like LM35 for exemple (or alternative like LM335...)
    they give you 10mV/K (2.73V@0°C) and are rather linear
    well, just and idea
    nice work !

  12. #12
    Xtreme Addict
    Join Date
    Nov 2005
    Location
    Auckland, New Zealand
    Posts
    1,075
    tip : there are nice and cheap temp sensors like LM35 for exemple (or alternative like LM335...)
    they give you 10mV/K (2.73V@0°C) and are rather linear
    well, just and idea
    nice work !
    Yes but you require more wires and have to insert an entire IC into the evaporator/condensor. They are designed to measure ambient in a dry environment. They will fail. They are also non linear, and the wire leads running out of them will affect the temperature reading.
    Such ICs are used to measure temperature on a PCB, not as a remote sensor.

  13. #13
    Xtreme Enthusiast
    Join Date
    Oct 2004
    Location
    Crazypc.ro
    Posts
    582
    promis to open some alcohol and drink thinking at your kindness(i rarely drink alcohol 1time a beer in a month or less)

    hope my electronist friend will dig every litle thing and make this thing hapend

    thank you
    q
    Last edited by quintus; 11-10-2006 at 11:52 PM.

  14. #14
    HVAC/R student
    Join Date
    Nov 2005
    Location
    Em City
    Posts
    519
    Quote Originally Posted by SexyMF
    SoddemFX:
    Big SturL:

    That is the full wiring schematic shown except for what you put on the PWM/Cutout/Computer ON outputs. Join the red labels to red labels and that is it.
    Hehe, I guess I'm still a nub in electronics I've been in an electronics class for about three months now, but I guess I've still got a lot to learn. I'm used to seeing the "wires" and such on wiring diagrams. But one of my teachers used to program chips such as that before, so he can hopefully help me.
    ...is no longer working as an assistant HVAC/R-installer...
    But, is still blasting 20000 songs of real Rap

  15. #15
    Xtreme Addict
    Join Date
    Nov 2005
    Location
    Auckland, New Zealand
    Posts
    1,075
    Still going with this project. Just waiting on parts. They will be here in a fortnight or so.
    In the meantime I have updated the code to shift the outputs together to make routing the PCB easier.
    I'm working on the artwork, but this can not be finalised until I have the parts in my hand so I can check their component footprints.

    Not to far off now... (if anybody cares!)

  16. #16
    Xtreme Member
    Join Date
    Nov 2005
    Posts
    126
    Will be a interesting read when all is done, though last time i did any electronics was way back at school in the form of a crappy parking sensor lol!
    • 146 939 + DFI LanParty UT nF4 SLI-D
    • SS Chilly1
    • Geil Ultra-X (bh-5)
    • HIS X1900 XT Extreme

  17. #17
    -100C Club
    Join Date
    Oct 2005
    Location
    Essex UK
    Posts
    878
    Quote Originally Posted by SexyMF
    Not to far off now... (if anybody cares!)
    I Care, Keep this up fella

  18. #18
    Xtreme Member
    Join Date
    Apr 2005
    Location
    Nth QLD, Australia
    Posts
    221
    Great work so far shaun , if you need any help figuring out stuff, gis a yell and i'll pick the brains of the electrical post grads at the uni here, I know quite a few (i don't have enough knowledge to help you myself though ) . Keep up the good work.

    P.S how's the NL11F goin?

  19. #19
    -100c Club Member
    Join Date
    Apr 2003
    Location
    Riverside, California
    Posts
    4,740
    Good stuff
    Here are some parts that might interest people wanting to expand with this...
    AD595,
    http://www.micromegacorp.com/downloa...rmocouples.pdf
    Basically thermocouples, you amplify and filter (which is not easy to do accurately without dedicated chip) than read the value through A/D.
    Problem is... the part for amplifier is not cheap at all... was like $9-10 a piece I think last tie I checked unless purchased in volume.
    I would love to see thermocouple implementation of this eventually though... thermistor of high accuracy and big range does get mighty expensive.
    [SIGPIC]http://www.vapoli.com/Images/Forum/vapoli.jpg[/SIGPIC]

    Single Stage Work Logs

    Quote Originally Posted by killermiller View Post
    Those ccb's will die if you look at them wrong.

    heatware: jinu117

  20. #20
    Xtreme Enthusiast
    Join Date
    Oct 2005
    Location
    Sugar Land, TX
    Posts
    581
    What about using an AD590 like I'm going to do?

    Quote Originally Posted by A HVAC friend of mine
    If Hannah was an air handler, I would be a condensing unit so I could open her TXV and pump my refrigerant through her evaporator coils.

  21. #21
    -100c Club Member
    Join Date
    Apr 2003
    Location
    Riverside, California
    Posts
    4,740
    I just don't like -55c limitation that's all :P But it would make it hell lot easier to implement for sure...
    one thing I noticed is... thought -55c limitation might be moot point for ss as we keep tuning it for higher load...
    [SIGPIC]http://www.vapoli.com/Images/Forum/vapoli.jpg[/SIGPIC]

    Single Stage Work Logs

    Quote Originally Posted by killermiller View Post
    Those ccb's will die if you look at them wrong.

    heatware: jinu117

  22. #22
    HVAC/R student
    Join Date
    Nov 2005
    Location
    Em City
    Posts
    519
    Now, what would be nice is if you set up a step by step guide for those who have NO experience with this at all, like myself Like this:

    -Buy: this, and that, and this, and so on
    -Connect:this here and that there
    -Program: Using this prog, and these values
    -Be: Happy!
    ...is no longer working as an assistant HVAC/R-installer...
    But, is still blasting 20000 songs of real Rap

  23. #23
    Xtreme Addict
    Join Date
    Nov 2005
    Location
    Auckland, New Zealand
    Posts
    1,075
    There are many transducers but they are all very expensive compared to the thermistor. Yes, I have to make tables and more complicated code but I don't mind. It is what I can contribute to the forum.

    The AD range you are talking about is 4-10x the price of a best thermistor.

    This is just the first go at a controller. I will make other which use different sensors. But for now things like thermocouples are just to expensive. Currently the LCD is the biggest cost of the whole project.


    @jinu117

    I would have liked to go lower but if you look at most all the sensors -55 seems to be the decided number. Most are ranged -55 -> 150. I can't get thermistors which go lower than that. I would if I could. For a SS I expect under load people won't reach -50C (for the most of us!)

  24. #24
    -100c Club Member
    Join Date
    Apr 2003
    Location
    Riverside, California
    Posts
    4,740
    Heh I know exactly what you mean about -55c as I was thinking about making one myself while back That LTC2413 looks very good! For same price as the thermocouple amp, you also get D/A converter which definitely will reduce cost on microcontroller side (well not too much but every single bit helps I guess). I guess it could be used multiplexed as well easily?
    PM me on few things SexyMF... could give you some pointers for some things I've found after searching for nearly a year on many components
    [SIGPIC]http://www.vapoli.com/Images/Forum/vapoli.jpg[/SIGPIC]

    Single Stage Work Logs

    Quote Originally Posted by killermiller View Post
    Those ccb's will die if you look at them wrong.

    heatware: jinu117

  25. #25
    Xtreme Addict
    Join Date
    Nov 2005
    Location
    Auckland, New Zealand
    Posts
    1,075
    Seeing if believing (post #2 updated)
    Last edited by SexyMF; 11-24-2006 at 09:14 PM.

Page 1 of 5 1234 ... LastLast

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •