Sensors from Yoctopuce - weather at home

    Some time ago I was looking for a pressure sensor for one site . The requirements were simple - a USB connection and a minimum of a soldering iron, as I have experience in using this tool only in cryptanalysis. It turns out that, unlike temperature and humidity, the Chinese have not yet mastered this market, and the simplest and cheapest option is to buy any barometer, point a webcam at it and analyze the readings.
    Despite the delirium of this venture, it was seriously considered, but in the end it was marked out for a banal reason - at night it needs lighting. Those. the system will not work at night, and if it does, it will require additional configuration efforts.

    Of the other options, the USB Meteo Board was the most suitable.from Sparkfun based on Arduino, or a home-made system based on the same Arduino or Netduino.

    But by chance I came across Yoctopuce , and realized that this is it. Their sensors and sensors amazed me so much in the details that I can’t be silent and want to share with the Habr community about these wonderful sensors.



    About yoctopuce

    This is a Swiss company, with a cute octopus on the logo. The name is just derived from the octopus (octopuce) and the prefix yokto- (10 -24 ). They start all their devices and APIs with the Yocto prefix. However, for convenience, I call them ectopukes, and I really like this option. :)

    As I understand it, there are very few people who are engaged in all kinds of smart things, and they decided to organize a production and a store of all kinds of sensors as a bonus. At the same time, they are guided by 2 important criteria: workmanship and ease of use.

    Sensors

    There are not many sensors available:
    • 5-button sensor
    • Light sensor
    • Temperature sensor
    • Meteo device (pressure, temperature, humidity)
    • Device with two tri-color diodes
    • Relay
    • Controller for servomotors
    • micro-USB hub for the convenience of working with many devices
    • Connectors, wiring, hardware
    • Green Diode Demo


    I now have 4 of them in stock: Yocto-Meteo, Yocto-Temperature and Yocto-Light and Yocto-Demo.

    General


    All sensors have common properties and are built on one base:
    • Packed in antistatic bags with name and production date (!!!)
    • All sensors are digital. Do not require calibration and special algorithms for processing results
    • Connect via micro-USB (no drivers required, no COM-port emulated)
    • They have an ecto button and an ecto diode. They are needed to detect a device on a computer or vice versa. Those. if you have many identical devices, then by clicking on the button on the device you can see what it is called on the computer, and by calling the corresponding function in the API you can turn on the beacon on the device.
    • Friendly live with other devices
    • Unpacked
    • Have mounting holes
    • Instead of micro-USB, you can solder the wires directly
    • In many cases, the board can be broken into 2 parts
    • Device and API firmware constantly updated

    In general, attention to detail is striking in devices. A very good base has been made and convenient, on which various sensors are now hung.

    API

    Yuktopuk has an excellent API (remember I spoke about simplicity): it is divided into high-level and low-level. High-level: the http-server rises on the 4444th port, and it can be accessed through JavaScript or PHP. Low-level: everything is classic here: Objective-C, Delphi, C ++, C #.
    There are versions for Windows, Mac and Linux.

    All devices have standard functions (module name, current consumption, operating time, firmware version) and specific ones (find out the temperature, turn on the light bulb, etc.).

    You can subscribe to events connecting a new device or disconnecting. Actually talking about the code is somehow wrong, it’s better to show:

    staticvoidMain()
            {
                string errmsg = "";
               //подключаемся к хабуif (yAPI.RegisterHub("usb", ref errmsg) != yAPI.SUCCESS)
                {
                    Console.WriteLine(errmsg);
                    return;
                }
                yAPI.DisableExceptions();
               //берём первые попавшиеся устройства нужных типов
                YPressure ypr = YPressure.FirstPressure();
                YHumidity yhu = YHumidity.FirstHumidity();
                YTemperature yte = YTemperature.FirstTemperature();
                while(true)
                {
                     //забираем текущие значения и логгируемdouble pres = ypr.get_currentValue();
                    double hum = yhu.get_currentValue();
                    double temp = yte.get_currentValue();
                    Console.WriteLine("{0:0}\t{1:00}\t{2:0.0}", pres, hum, temp);
                    Thread.Sleep(5000);
                }
            }
    

    This code takes temperature, humidity and pressure from the first sensors that come across. As you can see, it is difficult to write more banal code. Naturally, if you wish, you can determine the name of the device and select the one you need, in general I send it to the site , there for each of the devices there is elegant documentation for all functions.

    Virtualub

    In addition to the API, you can always go to http://127.0.0.1-00-00444/ and see a list of connected devices, reflash them, see current data, and possible functions. Those. even without programming, everything can be quite conveniently used.


    Bonuses

    Most devices can log data on their own when not connected to a computer. Naturally, there are no miracles here, and they need to be given food, but nevertheless, such an additional nice opportunity. At the same time, according to the developers, in case of memory overflow (~ 500,000 readings), logging will not stop, everything will not be overwritten in a circle, instead, the old data will gradually be downloaded (once per minute, once per hour, once a day). So the possibilities are enough for a long time.

    The devices themselves (the ones that I have)

    Yocto-meteo


    Measures humidity, pressure and temperature. Humidity 0 to 100%, a temperature of from -40 ° to 125 ° (sensor accuracy ± 0.2 °, readings with accuracy to 1 / 16 degrees, API rounds to 0.1), pressure in millibars, in mmHg can lead independently if desired.

    The board can be broken into 2 parts - the base and separately the sensors, connecting them with 4 wires for transmitting information. You can break in two places - for connectors or direct soldering.
    The humidity sensor can be covered with a special cover (sold separately) to protect it from dust. Because the humidity sensor does not make sense to pack hermetically, unlike temperature and pressure.
    Yocto-temperature


    A simplified and cheaper version of Yocto-Meteo only measures temperature.
    The temperature sensors from the meteorological board and this one, put together, show an almost identical temperature of ± 0.2-0.4 ° (within the limits of the declared error).

    The board was cut, the wires were soldered, it turned out something like this: Further, the heat-shrink tube on the sensor was processed with a hairdryer and electrical tape. The board itself was packaged for insulation purposes, and the sensor was packaged in its own antistatic bag. The final result:




    Yocto-light


    It measures the illumination in suites, breaks down only in one place (there are no holes for the connectors). The developers used to create a smart mailbox (they shone with a laser and determined the presence of a letter by interruption of the signal).

    Yocto-demo


    The most stupid device for testing the size of 2 by 2 cm. You can control one green diode, change its brightness, turn on / off, blink in various ways. The purpose of the device is to demonstrate the capabilities and functionality. You can understand the API and decide how to use other, more functional and useful devices.

    Purchase

    Everything is simple here. Card payment (PayPal not supported), in dollars, euros or Swiss francs. Delivery by regular mail (tracking provided), took a month (the package left Switzerland in a day, then everything is in the good of our mail). From 100 francs, delivery is free.
    Sensors are not very cheap, for example, Yocto-Meteo ~ $ 67, but, in principle, ease of use and simplicity are worth it.

    Analogs

    There are not so many of them:
    • Arduino and analogues. It allows you to make cheaper and more functional devices, but you need to spend more time on manufacturing and tuning. Alternatively, a ready-made USB Meteo Board kit , already assembled by professional people for you.
    • Phidgets - a much larger selection of sensors, there are entertainment kits with a bunch of sensors, boxes for devices and much more, but a little more fuss with the connection, if you do not need a lot of sensors, it turns out not very nice for the price.
    • USBTenki - in some photos, the build quality is not very fun, limited by the API (although someone may like the fact that OpenSource).
    • Demos from Freescale and others - sensor companies provide sensor evaluation kits. Perhaps such sets will be interesting to someone. Problems - the sets are in general completely not intended for the end user and it is necessary to tinker with configuration and programming.



    Also popular now: