Πέμπτη 21 Μαρτίου 2013

MAXIMUM RANGE OF ULTRASONIC MODULE

A trivial application of ultra cheap Chinese ultra-sonic modules like the US-020, is to use it as range finders. The question is what is the maximum distance we can measure. These modules have an on board microprocessor and so we don't have any access on front end receiving amplifiers or transducer driver stages. The signals we get are pre-processed. A search through the available cryptic manuals on the net depicts a polar diagram that shows max distance about 10' (~300cm) which is far less than the 400-500cm advertised on ebay.
We wanted our setup to be portable in order to have some outdoors measurements. So we connected our arduino mini to a linvor slave bluetooth module and used our mobile android phone as a terminal using an excellent free android application named Bluetooth SPP by Jerry Lee.  Bluetooth  SPP  realises the SPP bluetooth service on an android device and is rock solid, much more robust than standard microsoft SPP service on ms Win XP BT stack. Plus, it includes a file logger !!  At first we measured a distance of approx  5 metes and we certified it with a laser rangefinder. Accuracy is pretty good (within 1 cm )  for such a low priced device and consistency is impeccable as you can see in the following video.

Searching for the maximum distance in a noisy outdoors environment was quite difficult. We used an office chair to be able to rotate the measurement setup on  the horizontal plane. At last we could get 1009 cm as  the maximum reading in our terminal while 1135 cm seems to be our maximum software limt. Accuracy was in the range of 5cm and consistency was not bad at all using a simple software filter that rejected erratic measurements. 

Πέμπτη 3 Ιανουαρίου 2013

CENTRALIZED SPLIT UNIT AIRCONDITIONING CONTROL

  Maximum HVAC efficiency is obtained with the use of inverter airconditioning units that have a  CEP  3.5 or more.
  The idea is to control some (3 or more) sets of split type airconditioner units with a central (master)  unit.  This  master unit runs a time schedule by reading the onboard RTC, logs data and slave responces to a micro SD card,  communicates with the slave units via RF24L01+ modules at 2.4GHZ and even takes care of local room temperature by reading a precision centigrade temperature sensor LM35Z and controlling   the local airconditioner unit with an IR led that emulates the original (Hitachi's) infrared remote control. And last , but not least, an input from a power meter (like an Electric Owl CM160 ) monitors electric power consumed by all air conditioner units to prevent power overload.  
  Slave units comunicate with master via  RF24L01+ modules,  read temperature with a LM35's as well , and send infrared commands to the remote airconditioner units. In case of RF link failure they can even take over  local control.
     All units are based on Arduinos's MCU's. Behind the idea of centralised HVAC control is, of course the optimisation of mains power consumption. Below is a photo of a master unit  prototype. On the prototype shield on top of an Arduino duemillenove, you can see the RF24L01+ module, the RTC module (a DS1307) with the backup battery, the infrared led and 2N2222 driver. The temperature sensor LM35Z is behind the RTC module adjacent to the analog pins of the shield. Sd card is an optional add-on . On the paper are my so-far failed attempts to decode the manchester-encoded pulses of the electric Owl's  CM-160 receiver output. On the oscilloscope you can see the infrared pulses that control the shutter of a Pentax X-5 camera which plays the role of the receiving airconditioner unit just to make sure that no interrupt handling inside RF24,RTC,SD,SPI  or WIRE libraries interferes with the time sensitive infrared carrier signal of 38.4KHZ Two buttons are also  provided to send commands like "emergency Power OFF all units" or "set all units to SLEEP 1H  mode".  

Master unit prototype
Code on the master unit takes approximately 26K of flash memory and on the slave a mere 14K.(Atmega328). We can also provide all units with PIR detectors to sense human presence and to inform master to take care accordingly. Every unit can also be connected via USB to a pc for debugging purposes.