IKEA Air Quality Sensor: 7-in-1 ESPHome Update Hack

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Oh Hello in this video I'll show you how  to upgrade one of these Ikea Air Quality   Sensors with ESPHome for your Home Assistant  setup but not just Particle Count I'm going to add a   bunch of other sensors too. First of all let's  get into the Ikea sensor itself I'm pop that   open take that out don't need any of that these  are four Phillips head screws um I don't have   a screwdriver that's small enough so my little  terminal driver does the job there's always one   OK we'll keep those we might need those again  inside quite simple we've got the center unit   itself where it's intake and then underneath  this just slides out underneath you can see   there's a little fan that just spins around  so it sucks through the top blows it out the   bottom and both of those intakes and outtakes  are at the back of the unit let's disconnect this and we'll put both of those to one side  now on the bolt we've got a row of connectors   here got a connector there we're not interested in  that we're interested in these five pads here in   particular we've got plus 5 volts that comes in  from the USBC connector round which is the next   one in and the only other thing we need to worry  about there's this pin here second one in from   the end uh it's called rest but it's actually RX  from this pin here which is the actual sensor so   that's attach some wires to these onto that Bol  down so I'm going to add a red a black for the   power a blue for the data that's coming off of  it and the brown so we'll get these soldered up   and as always I am going to solder I'm ending the  whole wire but I want to leave a little blob near   the base of the cut off there cuz that's where I  want a solder from the rest of it is going to be   cut off anyway so we'll just heat up the wire  and just try and leave a little blob it's not   necessary it just makes it a lot easier to do that  so we'll trim those off next up we're going to add   some solder to the pad so the first one there  that's 5 volts so I'm just going to put a nice   blob of solder on there not too much next one in  there that's the Z volts we'll have one on there   and then the rest one there we pointed out ear  one and then spinning it around there's a couple   of connections there for the fan now the Fan's  controlled by a mosfet up here and this is an   nend Channel mosfet so it's controlling the zero  volts of the fan I'm going to put wire on that   second pad there where it says fan minus let's  put a BL solder on there right attach the wires   first one is 5 Vols and obviously that's going  to be red black one next to it which is the Z   volts and then for that data I'm going to use  blue I'm just going to come off of there and I   do not like that connection so we're do it again  and then that fan there I'm going to use Brown   bend the wire up just to get it a bit of an angle  so I can push down from above the board and that   sticks there like that so that's the main function  of the air quality sensor however if we take the   Bard off and it's just three screws there so we  got the six LEDs which gives you the two green   two orange and the two red above that just about  to see it there there's a little sensor and that   is a light sensor and this bold uses it to dim  these LEDs at night so why not use that so this   little sensor has got a supply on this side and  then over here is a voltage out we can use that   on a D1 mini so I'm going add a little bit more  solder on there and we're going to attach a wire   to that so very carefully cuz it's a surface  mount component and you don't have to do this   um it's on there so I thought well why not so I'm  just going to say very carefully I'm going to put   some solder on my tip of my iron there and then  I'm just going to hold it very quickly just little   quick bursts and then just do up every now and  then bit of solder on there so hopefully you can   see there I've got a nice little doller solder  on that side it hasn't lifted up the component   so we're good to go and we're just going to add a  wire to that I'm going to add a green wire but I   don't want to add it directly I want to put a 10K  resistor just to drop the voltage down for the D1   mini cuz it only looks about 1 volt and I found  that 10K resistor just drops that volage down   a little bit the resistor there is brown black  orange that's a one a zero and three that's 1 0   0 0 0 10K so on one side of the resistor I want to  sold it all the way up to the body itself so I'm   going to put blubber solder there that's where my  wire is going to go and then we need a little bit extra to come off of that Bol and just to come  out of there so I'm going to cut that off about   there so that was about halfway down that leg and  put BL solder on the end and then that's probably   a bit too much solder so we'll just take some of  that off as long as it's tinned that's fine bit   of solder on the iron and then what I'm going to  do is I'm going to rest that wire on top of that   solder blob that we put on the Bol and then using  my iron I'm just going to push down on the wire   itself just to melt the solder so the heat will  go through the wire melt the solder under leaf and   that makes a nice connection there okay so we can  cut this bit off here we'll attach our green wire   to it so another BL of solder on there same thing  again nice and quick and then we'll put a little   bit of heat sink over there just to make sure it  doesn't heat anything and then move a lighter or   some sort of superable heat sauce heat that on  there I don't want to go too far I don't want to   melt sensor so as long as the resistor is held and  the wire is held in the heat rink that'll be fine   so that's the sensor bolt done we can put this  back on here now clip on this side so I'm just   going to put that underneath there at a slight  angle is that wire and then I'm going to use the   screw there just to hold that wire on right now  these screws are really fiddly and my big old   sausage fingers The Trusted tweezer like so and  then finally that top one there red black blue   on those pins blue ones going to the rest there  we got the brown wire coming off that fan minus   and then finally we got that green wire there  connected to our sensor which is on the front   of the device good stop there we got some space in  that case so let's add some more sensors so let's   put this away to one side and we'll talk about  those the other sensors I'm going to add this   is a BME or bmp280 this will give me temperature  humidity and pressure on an i squ c bus and then   the other one I'm going to use this is actually  called a ccs 811 and again this is a nice squ c   unit and this is Handy I'm not sure if it's the  same with all sensors but if I line those two up   like so you can see VCC ground SLC and SDA are in  the same positions so I can stack these on top of   each other and to do that I'm going to take one  of these eight-way sensors that come with the D1   mini I'm going to break it in half and then on  one of them I'm just going to pull the pins out   get rid of that and that and that and I'm going  to put that on top of the longer pins let's get   the right way out they there little indentation  there same was there so we're going to line those   up as well and then on the desk I'm just going  to push those down so I've got a double-sided   one in the top of the CO2 sensor I'm going to  put it that way around then I'm going to take   the BME and uh put it on top like that so let's  solded that together so as you can probably tell   that's all a c wus as they say so what I'm going  to do is I'm going to solder this first pin give   it a nice little heat cuz I've got a p in there  which is quite thick and then I'm going to solder   the other side on the top side here won't need  so much heat cuz that pin's already heated up   a little bit now and then as you can see that's a  bit that's a bit nasty that is so use my fingers   and I'm just going to pull this that way while I  heat up this pin at the bottom just to straighten   that up there and we'll do the same for the  top so I'm just going to use my middle finger   there to lift it up use my nail to keep it from  coming off the pin and I'm just going to slowly   move that up so they're roughly parallel now  they're all in line I can sold the rest of the pins okay so that's all solded top and bottom  and let's throw it on the floor Dave right so   that one solded top and bottom we need to add  our four wires for our supply and data however   the CO2 sensor needs one other connection and  that's that W AK which is wake that needs to   be connected to Zer volts so I'm going to run a  white black wire from this wake pin here to the   ground at the top a bit of wire we can put that  off there and I'm going to put that through the   Bol like so and then I'm going to sold that in  there like that and then as always with voice   I'm just going to straighten it up by reheating  it reflowing the solder and so that one's done   going to cut that off as I say this one needs  to go to Zer volts so I'm going to come this   way around pull the wire a little bit there then  using my nail I'm just going to stop that so I can   bend it so we got a nice little right angle there  and then I want to come off little bit so couple   of mil e of an inch for my American cousins and  obviously I'm using silicon wire there so I can   cut that off of me now which is quite nice you'll  find a link in the description for uh an Amazon   Lis in of the Silicon wire that I actually use  I use 24 and 26 gauge wire that's the aw gauge I   think it's called I've tinned that I don't need  that much wire so I've got like a millimeter or   so and then I'm just going to bend that there  and connect it to my ground try toest the wire   and the pin together and then we've got our  connection and then we can just simply knen   that up a little bit just to keep that reasonably  tidy that'll do and add the wir to this that I got   to connect this to the D1 mini obviously I'm  going to use a red and a black for the supply   and I'm going to use a white and a yellow for  my I squared C so these don't need to be that   long couple of inches I'm going to cut these down  anyway and again we'll cut we'll trim all these   off get them tinted let's just get their Senter  out the way so we don't blob over the solder on it so we've got very short stumps the size of  the pads or these things so working away from   the bottom I'm going to miss one that's their  extra black wire that we added so I'm use the   the second one up that one's going to be  a white wire so it might be a little bit   awkward but I want the wires coming out with the  the sensor that weight I'm going to turn it this   way round and I want these wires to come out of  the right next one up is yellow for the second   data the next one up is ground and the last one  is the supply and who can guess what color I'm   going to use there leave a comment below if you  guessed right # interaction that's our sensor   Bol done with our Ikea sensor done next we want  to do is we going to connect both of these to   our D1 mini and we'll start flashing and get  it working now I'm not going to use any pins   on this I'm not putting on a VAR bolt um I want  to make this as low profile as possible just to   keep that air flow in the case I'm going to Tin  up the pads that I'll be using on this board also   I'm going to be using the 5 volts and the grounds  um for the power coming off the Ikea so I'm going   to Tin this side on the bottom I'm also going  to Tin the other side as well so do need some   more connections on this and I'm going to be  soldering wires to both sides of this Bol so   back on the bottom I'm going to solder out D4  a z nice big blobber solder on there thank you   Mrs and then the only other one I want on this  side is that D7 right that's the pad's done now   it's going to be a bit tight there with the wires  hanging off the Bold so we've got another couple   of ground points here this is the case for the  USB connector so it's all Zer volts so I'm going   to put a blob of solder on one of those so I  can add my black wire to that one instead this   will take a little bit more heat so be patient  got about Ikea bolt so the shortest wire there   is that brown wire so I'm going to cut all of  these so they're roughly the same length and   let's connect these two together so first of all  let's do the red and then this one I want to do it   a slight angle we can get in Focus we can getting  focus there camera be much appreciated so slight angle come off of there like so I say black wi is  going to come off off of there and that's going   to be a little bit shorter now cuz it's closer  so what I'm going to do is I'm going to spread   this out and let's see where that wire goes so  I'm going to pinch it there leave a little bit   for my tinning we'll cut it off there pinch that  off and I'm going to try and make all these wires   roughly the same length for the space that I'm  going to use them in uh let's go the other way   here and then that one's going to go on that pin  there so again slight angle coming off with that   one next on this side we're going to do the  blue wire that's going to go to our D7 which   is the bottom one there so same thing again I'm  not pulling it but I am pulling it enough just   to get these wires nice and straight and then  we'll line that up and that's pretty much where   I want to be anyway that's length of wire and we  just tin that blue wire there I say that one's   going to go on D7 so around we go again cuz I'm  left-handed don't want it to have it in line with   that next pin we want to come it in at a slight  angle so about 45 should be safe next one uh on   this side is the green wire now unfortunately that  looks like it's not going to be long enough cuz   I've made the one's too short so okay I tried  it's not critical I'm just trying to be neat here so this green wire is coming off that light  sensor on the front of this board and that's an   analog signal so that's going to go into the  analog zero pin 45° roughly just so it's not   covering ads or any other pins underneath  it should be fine and then finally we got   that brown wire coming off the fan connection and  that's going to go into D4 the only reason being   really I mean it gives you an indication in home  assistant that the the device is taking a sample   I'm using D4 because that's the light on a D1 mini  and I want the light to show up when it's sampling   I mean you're not going to see it it's cuz to  hang out the back of the case but you know it's   there we can use it we can use it why not I mean  these things are quite powerful and I'm not doing   a lot with it so we might as well use all the  functionality that we've got available to us so   there we go that's the sensor array from the Ikea  going into the D1 m h and you can stop there but   I'm going to add our extra sensors and that's  our little stacked Bol there now this doesn't   need to be that long it doesn't need to be that  far away let's cut all these wires down about an   inch inch and a half not critical you can leave  it a little bit longer if you want I don't think   these wires are going to restrict that much air  flow inside that Ikea case it'll still be out of   side and we're going to Tin all of those now then  just going to snip the tip now this one I'm going   to put on the top side of the bolt and it should  make it a little bit easier I don't want too   many wires Crossing each other here I'm going to  cross them in front of the actual chips that make   a difference on a D1 mil D1 and D2 I'm going put  them on first cuz these ones will not be getting   cut down white wire here as for the code I've  used anyway that goes on D1 yellow wire yellow   wire on D2 the Zer volts goes on the ground over  here and then the red wire I'm going to cut that   down so again not got too much in there and then  we'll connect that up to that 3.3 Vol on that side   okay so that's the hway done let's flush it with  ESP home and I'll talk you through the code that   I'm using let's make a new device in ESP home to  load the code to that continues out I'm going to   call this one Studio air quality don't really care  about any of this so we'll just do the basic stuff   skip that then let's edit this then we're going  to go to the GitHub page you'll find a link in   the description and this first sensor here we want  the version one so click on that over on the right   here we've got copy raw file copy that that's  going to copy that into my clipboard so we go back   to ESP home and then just crl + V that into there  first thing you need to do is whatever you've   called yours we're just going to copy that out  there and replace that with that name and then all   we need to do now is change the name I've called  this one AQ for air quality and I'm putting this   one in my studio so all my entities are going to  be called Studio AQ and then whatever the entity   is showing so temperature humidity particle count  Etc so Standard Oil plate here if you're not using   Secrets put in your Wi-Fi SS ID and password for  that the logger I've disabled these sensors and   components just so I can unclog the log next up  is the uarts that is the serial pull uh and that's   the blue wire on this board that comes into the  D1 mini on D7 I've left the TX pin on there we're   not using it it's just there as a reminder uh  next up is the i squ c p that's the sensors here   that's the temperature humidity pressure sensor  that little Bard at top there and the CO2 and VC   sensor on the bottom there that's D1 and D2 which  is that two white and yellow wires on the D1 mini   next up is the binary sensor now coming in on D4  which is that fan connector here that's just an   on and off so I'm basically just doing a binary  sensor and this uses the substitution there which   is Studio AQ so this comes into home assistant  it's a studio AQ for air quality and then fan   and that just gives us an indication that the  fan is on in home assistant and because it's on   D4 it lights up the blue LED on the boolt which  is nice you can never have enough blue LEDs the   other bino sensor is the brightness so this is  again using the substitutions Studio AQ bright   and this is just going to be on or off depending  on whether that sensor on the front of the board   there that we connected to green wire to and  that's just detecting whether it's bright or   dark and we're bringing that into home assistant  you can use that in various automations uh for a   brightness or a darkness of the room next up is  the sensors we've got the particle sensor itself   the PMS that's on that bolt there and that uses  the serial data from the UR there substitution 2.5   microgr next sensor is the CO2 and total VOC  sensor that's that larger bols at the bottom   there and that comes in again substitution name  for CO2 substitution name for voc's now this Bol   also likes to have a temperature and humidity just  so that the CO2 and the vocc have got a baseline   for the environment that is sitting in so it gets  a nice temperature and humidity settings there so   we bring those in this here BME temperature  that's the ID for the temperature sensor of   the BME and the same for humidity that's the  ID I've called that the Cal ation we'll get   to that after I flash this and I'll show you how  to calibrate that that's the calibration for the   CO2 and the VOC sensor and then the BME sensor  itself pretty much boiler plate here we've got   the substitution name for temperature humidity  and pressure also both these sensors I've set   to 10 seconds update and then the last thing we  got here again with that brightness sensor on the   front of the board that comes into the ADC of the  D1 mini which obviously is the analog PT there of   a zero now I've give this an update of 1 second  so your automations are fairly Snappy this not   the best sensor in the world so don't rely on it  but it does give you an indication and we don't   really need to see the voltage coming out of this  ADC so that's again on the sensor there we don't   see that data so I've given you an additional  log there and it just gives a light level of   the voltage on this sensor we don't really need  to use that because you've got the binary sensor   to tell us whether it's dark or bright that's what  that little Lambda does there we're looking at the   value of x x is an internal variable for the  sensor that it's attached to so in this case   this is the ADC sensor so we're looking at x and  we're we're asking if x is greater than 0.01 if   it is we're going to turn on or publish State  true bright and bright look up here that's the   ID for this binary sensor that we've called right  so when the light level coming in that sensor or   the voltage coming off that sensor gets Above  This threshold it's going to publish the state   true to that binary sensor otherwise or else it's  going to publish State false which basically means   it's going to turn on and off this brightness  binary sensor right so that's the code explained   let's install it and this is the first time I've  installed this one so I'm going to do a manual download okay that looks like it's almost  done 155 seconds so I'm going to save that   to my desktop overwriting the one that's already  there yes right that's done we're going to close   that down and we can close that down going to  minimize that for a second and let's bring up   the ESP home flasher so that's ready we're going  to plug this in you may have already noticed that   the round wire here has been disconnected so I've  taken it off the ban minus on the Ikea bolt there   I found that some of these D1 minis don't like  the D4 connected even though that's a floating   pin there must be some sort of voltage creeping  onto that fan minus pin there if you have trouble   flashing yours if this stage doesn't work just  disconnect that brown wire right there so do a   quick dly do Let It find the D1 mini there  it is comp 3 H the BRS and Flash all right   there it goes it's scanning the Wi-Fi looks  like keep connected so close that down let's   go back to es home scroll down we should see  that online there if we go to logs we should   see some data coming in so there we go quick  sany check we've got two I Square seed devices   found on the addresses there so we can close  that down we can now disconnect that and I'm   going to solder this brown wire back on now yep  so that brown wire's back on there let's glue   this into the case now this is quite shiny so  I'm going to make some scores here just so the   hot glue has got something a bit more to rip on  to so I'm just going to scratch the head out of   the inside of this case so I'm going to do some  horizontal I'm going to do some vertical scores   I'm going to do some diagonal scores just really  go to town and make sure we got some deep scores   there and then the same for this side where we  got to put sensor package and we tap that out and   just going to brush everything out obviously this  is a particle matter sensor so I don't want too   much dust inside here we get that get that good  clean and let's tidy up a desk get rid of all this tritus and it's all over me nice we're going to  line up these wires just so they're reasonably   flat like that and I'm going to put a nice  big blob of hot glue in the center of here   then we'll stick that to the top of our case so  pretty much all the way down in the center like   so and we'll just wait for that glue to set and  then our sensor package we'll do the same thing   let's grab our tweezers and put a nice big blob on  there not that heavy don't need a lot and then I'm   just going to grab that and then we'll just hold  that that while that bit sets with the fan Outlet   facing downwards we can slide that over the rails  there we'll connect it up there then we'll push   that one into there just make sure these wires  here are not F in that hole I'm just going to   bend them down just so that they clear of that  stand there where the screw comes down and this   post here and then on the other side I'm just  going to pull all these wires down here just to   get them out of the way um right okay looks like  I made a little bit of an error there I've got a   little bit of so yeah I've turned light a little  bit you can see that it's not quite it's not quite   clear and the reason being is this little post  here is hitting M D1 mini so I'm going to snip   the top off of that cuz that's not good and then  that should now on their flush there we go that's better plug the power back in which is see  it go through its calibration where see it's   little test in there and then start measuring  the particles turn that down a little bit you   see a little bit of flash these are these  lights are strobing uh the camera's picking   it up but you don't really see that uh in real  life I'm going to wait for this hot glue that   we used to stick the balls in to cool down  completely and then we need to calibrate the   CO2 sensor by just sitting this on the window  seill in front of an open window or in my case   I'm going to hang it out the window for about  half an hour let that uh settle down and then   we'll get that base number to en calibrate the  CO2 sensor right then back in home assistant   we can see I've got a new device let's check  it out that looks like something we've just   made so I configure that yes I want to submit  it and I'm going to put this in the office now   if we go to ESP home we scroll down to Studio  air quality and we're just going to refresh   that sensors don't come in straight away so we  can see we've got a particle count the particle   count is 400 for the CO2 we can see the fan going  on and off I think it's off for 20 seconds and on   for 8 seconds so every 20 seconds that comes  on we got our humidity pressure the vo and   the studio temperature so let's test this CO2  I'm just going to breath into the back of this thing yep there it goes so that's working now  this is not going to be a proper reading until   we calibrate that sensor and the way we do that  we go to ESP home we have a look at our studio   quality first thing I to do is go to edit and  and I'm just going to uncomment that and we'll   flash that wirelessly it won't take too long  cuz it hasn't got to install any components   or anything we'll let that wirelessly Flash and  then wait for the locks it's not ready yet we   just wait for that it's every 10 seconds so do  it a little while we'll start getting data in   in a moment okay there we go we've got the CO2  level and the VOC level and you can see there   it's got a baseline of that now to calibrate it  what we need to do is put our sensor on a window   seal we can't find an open window where there's  nice clean airs now for me that's going to be a   case of putting it out the window which I shall  do now okay so that's outside the window now in   the nice clean fresh air and we're going to  keep an ey on that so we're currently 302 now   that sensor will take about 20 to 30 minutes to  calibrate so I'm going to leave it hanging out   the window for half an hour and we'll come back  okay one cup of tea and a couple of sandwiches   later and it looks like our Baseline here seems  to be to to BB so I'm just going to copy that   copy that out there we'll go to edit scroll down  to the calibration area and going to paste that   in there and I'm going to uncomment that line so  all this is doing is giving it a baseline number   that it's going to use to say at this value the  air is clean and every time you boot this device   it's going to use this number as a baseline  so with that done we can uncomment this now   so that it doesn't clog the logs and I'm going  to refresh it right that's back on the network   and connect to the home assistant and if we go  back to our sensor now we'll just wait for this   data to come through and there it is we've got  CO2 count of 400s that's outside so again this   is the ambient or quote unquote clean air and  looks like we got some voc's outside so there   you go we've taken an Ikea sensor which would  normally just give one data point we've added   a few more so yeah that works well I hope  this video was helpful with your projects   please do share it so others can find it as well  I upload videos whenever I can so subscribe and   hit the Bell icon to get notified that's it  thanks for watching okay I love you bye-bye
Info
Channel: 3ATIVE VFX Studio
Views: 114,100
Rating: undefined out of 5
Keywords: ikea air quality sensor upgrade, Ikea air quality sensor home assistant, VINDRIKTNING, air quality sensor, Ikea vindstyrka, home assistant sensor, smart home, smart home ideas, home automation, home automation ideas india, Vikings, air quality monitor, diy home automation, air quality monitoring, temperature sensor, humidity sensor, pressure sensor, co2 sensor, voc sensor, Espar 12f, diy electronics, esphome, smart home projects, esp8266 projects, D1 mini
Id: YmqtMTO5NVc
Channel Id: undefined
Length: 27min 38sec (1658 seconds)
Published: Wed Nov 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.