Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

11 January, 2016

Build your own fully customizable Energy Monitor for 30 bucks

Arduino UNO with a 2.4 "TFT monitor the consumption of a house
The crisis continues, so If you want to know how much electricity do you need every hour of the day, or switch power contract to the TDH or reduce the contracted power, or make estimates, you can install an expensive energy monitor, or, as we will see in this post, we manufacture ourselves .
IMPORTANT : If your supplier has telemetry on your electricity bill, chances are that hourly consumption can be consulted on the website of the supplier.

Version 1.0 of the program and debugged

04 September, 2015

Home Automation: How to activate a relay via USB on Windows to control devices (blinds, lights, etc)



Although it is most economic and versatile use Arduino as a programmable electronic board, so we avoid the known unreliability of Windows, when you want to activate a equipment is sometimes easier to use a USB relay, either because we have a computer that has to be always on, or for other reasons, allowing us to theoretically control up to 8 switches for each USB connector on the same PC. 
I had to replace an old system that used the LPT1 port for controlling a time alarm (not compatible with Win XP or 7) so after investigating it I bought 2 pcs. of this USB-controlled relay  in Aliexpress.

And if we want to control multiple devices there are up to 8 channels (relays) in the same unit, with each relay 10A capacity, so the possibilities are very extended.




26 October, 2014

How to use a thermistor or temperature sensor with Arduino: Code for the NTC/PTC types

Checking the operation of the program
One of the most common applications of Arduino is an electronic temperature control via a simple thermistor (temperature sensor), for example if we want to activate a fan when the temperature rises to a certain value in a computer / engine, or activated by an relay a circulator motor in a boiler when we detect that the temperature is rising (and thus the fire is on), as we did in home boiler with AKO or Keld thermostats, only with Arduino will not only allow us to activate a device, but allowing us much more play, controlling and managing other parameters for our stove, such as temperature of the fumes, or air injected into the combustion chamber, etc, as already explained us Oscar Gonzalez in BricoGeek from a project from Xoel (from Asturias).
A thermistor (thermistor) is simply a resistor whose resistance varies as its temperature varies (though non-linearly); there are many kinds, but in this post talk about one NTC (Negative, whose resistance value decreases as the temperature increases), and measure different temperature ranges of -50 to + 99 ° C in this case.If we measure a higher temperature, we would need a thermocouple type K or J, but we'll see later.  
But to use a thermistor whatever we can get, is not enough to measure the value of resistance and apply a rule of three, because as we said, is not a linear (but curved) value, with the biggest differences resistance with increasing temperature so hyperbolic.

To use a thermistor, or know their values ​​(datasheet), or we have to approach them; according to the formula Steinhart-Hart, we have to find a value, called β (Beta) (so-called value of characteristic temperature of the material), and use it along with your formula to get the C to a given value. Here is very well explained , and this explained the Steinhart-Hart formula .

Although it seems difficult to understand for those who give them bad math (like me), but do not worry, in the end you have a program that you can use and just change the header data (values ​​of two points, the resistance of your thermistor 25 and the actual value of your Arduino 5Vdc and little else) will be able to use it in your project without having to understand the formulas involved, but I prefer to go into detail for those who like it as much as me "why of things. "

But how do we calculate the β value? 
To obtain the value of β, using the Steinhart-Hart formula, give the values ​​of resistance and temperature at two different points, as far as possible from each other, for greater accuracy. The formula tells us that β is equal to:

Obtaining resistance values ​​of 25 and 100 (for example), we get β