Project Case : Blends into the background

I built some thermometers from ESP32 and BMP280 sensor. I looked around for a project case but couldn’t find anything that wasn’t a little black box that come off a 3D printer. Couldn’t find anything like this on the forum. Rather then, than design something myself I went for an object that has gone through years of R&D and is generally accepted in the household. Something people have come to accept and something the wife won’t pass comment on. So I decided to use an airfreshner case.

Took the air freshner apart following BigCliveDotcom youtube video.
There was room for a momentary button on top and an RTTTL passive buzzer in the back. Used a bit of black metallic mesh to cover the holes in the front. Mounted the ESP32 on a protoboard. Pushed 2cm of fireproof insulation between the sensor and the board. This was to help prevent the heat creep from the ESP32.

My ESPhome code:

  name: backroom
  platform: ESP32
  board: esp32dev

# Enable logging

# Enable Home Assistant API
    - service: play_rtttl
        song_str: string 
            rtttl: !lambda 'return song_str;'

  password: "Redacted"

  ssid: "Redacted"
  password: "Redacted"
  fast_connect: false

  # Enable fallback hotspot (captive portal) in case wifi connection fails
    ssid: "Backroom-Temp-Rtttl-Button"
    password: "Redacted"


  - platform: ledc
    pin: GPIO19
    id: rtttl_out
    inverted: True

  output: rtttl_out
  - platform: gpio
      number: GPIO16
      mode: INPUT_PULLUP
      inverted: True
    name: "momentary_button1"  
  - platform: bmp280
      name: "Backroom Temp"
      oversampling: 16x
      name: "Backroom Pressure"
    address: 0x76
    update_interval: 90s
  sda: 22
  scl: 21
  scan: True
  id: bus_a    

type or paste code here

more photo please - I am curious.
how do you handle the power source? any wire going out? what is the use case of the button and buzzer?

Old phone charger runs in from underneath supplying 5V. I use the button via automation to turn on light outside as a toggle. HA sees the button press as a binary sensor. Will take it apart and photograph. Just made it yesterday.
The Buzzer can be set to announce Mail delivery or door bell (can’t hear it from this room). Also will set it to announce alarms like rise in temperature in other rooms.
RTTTl tunes can be pushed thorough to it as a service.

I mounted it on a protoboard to give some protection to usb port and I could group all the dupont cables at the top.

I had to drill in through the top of the case to break the 3 plastic welds holding the grey body in. Drilled a hole in back of the grey body to place buzzer. I had to remove the white driver for the air freshner to allow more room to push cables for RTTTL and momentary button through to the bottom section.

Cut flat bit of metal mesh out of old basket and it fits in easily between grey body and outer case. On the protoboard I have a ground and 3V rail. Connect BMP280 to SDA/SCL/ground/3V. RTTTL needs data/ground/3V. Button needs ground and one pin pulled high.

I drilled hole for button in center but this meant it touched against plastic so had to cut into this to allow it all to fit. Long wires needed to allow having wires connected to button and have ESP32 outside the case at same time. Room for 2 more buttons on the top. I have only one button and it turns on a light instantly.

Nice idea.

If you were to use smaller parts (ie: no massive proto board, ESP12E board etc) you could have kept the air freshener internals so it’s original task remained functioning.

Might be difficult. I’m sure there were huge gears and levers and a motor inside also, plus a can / a bottle, so that to spray whatever flavour that was once this Air Wick.

Very clever.

Thanks. Got the idea when I was looking at the BRUH multi-sensor. A very good project but the 3D printed case reminded me of Fly-Killer blocks from the 1980’s.

Bruh case

I didn’t have a 3D printer anyway. Electronic project cases were also just plastic boxes. Cost wise an Air freshner is about the same as the project cases. I’m was a bit surprised that no-one else seemed to be recycling these household objects.

I too used the Bruh as inspiration. Alas, my case is blocky and black as you described. Very abstract thinking you’ve got there.

I realise that, I modified one myself to include a Wemos D1 mini and motion sensor. Mine however used a separate small enclosure below to house a 240Vac - 5Vdc power supply.

Post a photo of it please.

This was just a prototype to test functionality. I plan on removing the bottom enclosure, using a plug-pack power supply instead and then mounting everything in the air freshener case. The way I coded the ESP allows for normal (original) function or motion controlled a spray timer so that it only operates when people are around. The reason for this is that it is not actually an air fresher, but an insert repellent spray used outdoors.

1 Like

Ha. Your table looks like my kitchen table at the moment, apart from no sunglasses on mine. What’s the effective range of the sensor? I take it that it’s a PIR sensor? :grinning: :grinning:

Hahaha. That was my makeshift work bench while I was waiting for my new shed to be built.

It is a PIR, haven’t properly tested the range but I will do when I get a chance
In keeping with my slightly unkind response to @ kpeyanski otherwise good article on DIY sensor here are some ideas for cases you can put your DIY sensors in other than 3D printed cases without that response from the people you live with “were you planning on leaving that sitting there?”

Depends on your taste and willingness to slightly modify things and mostly imagination.