Temperature regulator #2516
Replies: 14 comments
-
Posted at 2016-01-04 by @gfwilliams I've only had time for a quick glance, but it looks good to me. Only things I'd say are:
With the whole PID thing, I'd really like to come up with a PID library for Espruino that had some kind of self-calibrating functionality. Getting the correct values seems like magic to me! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-04 by LawrenceGrif ....Getting the correct values seems like magic to me! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-06 by verdeimpacat Thanks Gordon! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-07 by UliMerkel @verdeimpacat |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-08 by verdeimpacat Danke UliMerkel ! It is mentioned indeed!
My "mission" over the week-end: tweak the HTU21D module and define instead some sort of a function that reads the values of temperature and humidity from two potentiometers just to move forward with code debugging and triac control while awaiting for the prototype components. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-08 by Frida
Is it a mistake of using htu.readHumidity (); both for temperature and humidity? |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-09 by verdeimpacat Thank you Frida! I corrected this error by editing the yesterday posting. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-09 by luwar @verdeimpacat
I put this call to the constructor of HTU21D which will be called during "require('HTU21D').connect(…);". Soft Reset is recommended in the data sheet, so nobody can forget it.
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-09 by verdeimpacat Wise! My compliments luwar! I will edit my posting two days ago to reflect this advice. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-12 by verdeimpacat The testing over the weekend went fine and revealed several errors that are already corrected in the second version of the code published above. Meanwhile, all the prototype components arrived and I will move from software to electronics. It will take a while so... make no mistake, the project is not dropped!
|
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-13 by @gfwilliams Thanks! Glad it's working so well for you! |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-01-30 by verdeimpacat The power control looks like this: Attachments: |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-18 by verdeimpacat Updated code after extensive testing:
And few thoughts after the prototype build:
The regulation precision is 0,15°C with the suited PID parameters but may easily move to +/- 1°C when the PID parameters are not adequate. No humans, animals or Espruino pico boards were hurt during this experiment, do not attempt to build this project if you are not familiar working with mains electricity and power electronics. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2016-12-19 by @gfwilliams that's great - thanks! Really nice to see a direct use of a triac too :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2015-12-27 by verdeimpacat
I received my first pico boards few days ago ( thank you Gordon, brilliant design from both software and hardware perspective!).
I started this temperature regulator project, mainly to have a start with Java Script which is unknown to me until now, but also with a real application in mind: as an amateur photographer I maintain a nice inventory of vintage cameras and lenses in a dependency of our house which is unheated over the winter.
Now, the design goals, adapted to this application are:
-maintain a low regulated temperature when I am not working, for the sake of decent electricity bill;
-maintain a comfortable temp whil I am spending time in that room;
-take care about the condensation and avoid rapid jumps in temperature when moving between the two;
Nice to have:
-remote control;
-temperature indication on some LCD or LEDs;
-Air Conditioning control for the summer days;
-some possibility to check for efficiency and status of control algorithm;
-real time clock to be able to program on a daily basis the target temperature;
I was not wise and I commited the aquisition of some components before having in mind the final design and thus I spend few good days trying hopelessly to write a HTU21D module... Christmas miracle: on December 22nd I found the just published HTU21D module on the Espruino site !!! Thank you Tom Gidden and Luwar !
Now, the code as of today ( functionality not checked yet since I am awaiting the prototype components):
As you may notice the code is under construction and not all the design goals are fulfiled as of today. But I would welcome your thoughts on the approach, any errors I might have done sofar and ideas for code optimization.
Beta Was this translation helpful? Give feedback.
All reactions