balena-ikea-vindriktning
A balena application for "sniffing" IKEA VINDRIKTNING readings from its internal MCU testpads
What
The IKEA VINDRIKTNING is an affordable infrared PM2.5 air quality sensor. It has an embedded MCU that performs serial reads over 5V logic every 2 seconds and outputs the data in the form of a 3 stage RGB LED strip:
Why
The design of this device is very hacker/tinker friendly:
- The case and the internal MCU PCB uses only standard phillips head screws (albeit tiny, I believe those are self-tapping, 2mm diameter) without any glue or seals.
- The actual sensor is connected via 2 JST plugs to the MCU PCB and the pcb has intuitive silkscreen that helps figuring it out.
- The MCU PCB has testpads for power and serial, so it is pretty easy to hook up.
- Since the MCU already performs reads, the only required action in order to have a reading is sit on those testpads and "sniff" the TX pin for serial communication between the MCU and the sensor.
- In a time when attention to air quality and ventilation should be very high, having cheap,widely/globally available and easy to hack platform to work on, is very valuable.
How
BoM
QTY | Name | Notes |
---|---|---|
1 | IKEA VINDRIKTNING | link defaults to US - browse your local country IKEA website! |
5 | Jumper jerky cable | I used 5 from this set: https://shop.pimoroni.com/products/jumper-jerky?variant=348491271 |
1 | Raspberry Pi zero / zero W / zero 2 | |
1 | 8GB+ uSD card | |
3 | 2mm x 4mm self tapping screws | I used screws from this set: https://www.amazon.com/dp/B08YDP9DBF/ |
1 | 3.3V to 5V logic level shifter | needs to be SERIAL/I2C/SPI safe, such as https://www.adafruit.com/product/757 |
1 | 3d-printed lid for Raspberry Pi zero / zero W / zero 2 | https://github.com/balena-io-playground/balena-ikea-vindriktning/blob/master/ikea_sensor_rpi_lid.stl |
Instructions
- On the rear side of the device there are 4 phillips head screws to remove (you will need a decently long shaft screwdiver to access them)
- Once the 4 screws are removed, the front and rear parts can be gently pulled to reveal the interior. You can either slide off the whole fan+sensor module or disconnect the 2 JST plugs from the PCB (the latter is suggested since we will be soldering 3 cables to the MCU PCB testpads). Make sure you also pop off the front part the LEDs lightguide, it will be needed later.
- Remove the 3 phillips head screws from the MCU PCB and slide it out of the front lid
- Cut off one end from 3 jumper jerky cables so that the opposite end is a female connector ( RED for 5V, BLACK for GND and a color of your choice for TX is suggested) and solder them to the right testpads on the MCU PCB :
- Cut the other end of the TX cable and solder it to one of the High Voltage pins of the logic lever shifter. Then solder to the corresponding Low Voltage pin a same-color jumper jerky cable so that the opposite end is a female connector
- Cut the other end of the GND cable and solder it to one of the High Voltage GND pin of the logic lever shifter. Then solder to the corresponding Low Voltage GND pin a same-color jumper jerky cable so that the opposite end is a female connector
- Insert and press-fit the LEDs lightguide into its slot on the 3d printed front lid
- Secure the MCU in the 3d printed lid (compared to the picture below, your MCU will have the 3 floating cables attached). Use the original front lid as a support while you are operating so that when you apply pressure from top to bottom, the lightguide won't be pushed off its slot
- Mount a rpi0/rpi0w/rpi0-2 and hook the RED cable (5V) to PIN #2, BLACK cable (GND) to PIN #6, COLOR cable (TX 3V3 shifted) to PIN #10
- Slide the logic lever shifter and the floating cables aside the Raspberry Pi zero / zero W / zero 2
- Close the rear and front case parts and secure them with the 4 phillips head screws on the rear
- Use the rpi0/rpi0w/rpi0-2 power input to power the whole assembly.
- Deploy this application
- [WIP] Get readings at the device local IP address or public URL
Progress
- investigate the sensor internals and ways to tap in and read data
- Implement a simple MVP hardware-wise
- Design and test a small adapter that allows a Raspberry Pi Zero/Zero W/Zero 2 device to be mounted
- Make sure data reading is working
- Decode/parse data
- Expose an interface for accessing the data
- Re-design the adapter so that it encloses and protects the Raspberry Pi Zero/Zero W/Zero 2, the logic level converter and the floating jumper jerky cables