Tekforums

Chat => Guides & Projects => Topic started by: zpyder on July 08, 2021, 00:15:26 AM

Title: Door open timer switch thingymajig
Post by: zpyder on July 08, 2021, 00:15:26 AM
Hi all, here's an interesting electronics project/problem.

At work we have a desiccating cabinet that is used for drying filter papers and things out. Our technicians have a bad habit of leaving the door open, or unlatched, resulting in normal air getting into the cabinet and so the stuff that's meant to be dry ends up with some residual moisture.

I built a simple buzzer alarm that would sound whenever the door was open. Was just a buzzer, 9V battery, and a magnet reed switch on the door. The issue was that the proximity required for the reed to switch states meant that the buzzer wouldn't sound if the door was pushed closed and not latched - which isn't acceptable.

I'm now wanting to build a buzzer V2.0, with improved functions:


If anyone has any recommendations that'd be good. Cheapest, simplest option is preferred, I'd love to do a raspberry pi thing but I think that's overcomplicating it. I'd also love to be able to say to the technicians to make sure the door is closed and for them to actually do it, but that's never going to happen either...
Title: Re: Door open timer switch thingymajig
Post by: XEntity on July 09, 2021, 18:30:32 PM
Use an ESP8266, such as the Wemos D1 Mini, you can power from USB, costs about £2-3 and will run Arduino code programmed direct from the Ardunio IDE, can attach a piezo speaker, if you want to internet connect then has wifi, has multiple IO so you can connect reed switches/ ultrasonics / hall sensors.. whatever you like and will simply do timed delay without the overkill of a Pi..
Title: Re: Door open timer switch thingymajig
Post by: zpyder on July 10, 2021, 21:28:24 PM
I decided to get an arduino starter kit so I can just have fun learning the whole ropes. Was the equivalent of £30 from the nz equivalent of maplin. Having fun so far :D
Title: Re: Door open timer switch thingymajig
Post by: XEntity on July 10, 2021, 21:55:18 PM
Cool basically if you get something working, I’d recommend still running it from an ESP just because they are smaller, cheaper and usually more powerful.. if you need any help let me know
Title: Re: Door open timer switch thingymajig
Post by: Serious on July 19, 2021, 14:50:36 PM
 Obvious answer would be an automatic closer, same as on fire doors, problem is some idiots tend to put things in the way to stop the door closing.

FRIDGGI actually produce a fridge open alarm, exactly what you are trying to make, for about £20, bound to be other options.
Title: Re: Door open timer switch thingymajig
Post by: zpyder on August 03, 2021, 21:16:30 PM
Got a prototype working with an Uno, now sorting out a polished version on a Leonardo Tiny. (https://uploads.tapatalk-cdn.com/20210803/66e9216b03e9b03c1caf089b8be60106.jpg)(https://uploads.tapatalk-cdn.com/20210803/fc9358f12413becc3d6a3bdbaf0a93d1.jpg)

Sent from my SM-G998B using Tapatalk

Title: Re: Door open timer switch thingymajig
Post by: XEntity on August 03, 2021, 21:36:51 PM
Nice work! The Wemos D1 Mini BTW has stackable proto boards

Here’s an IR setup I built

https://imgur.com/a/4KLUX6H (https://imgur.com/a/4KLUX6H)
Title: Re: Door open timer switch thingymajig
Post by: zpyder on August 10, 2021, 20:12:13 PM
Installed and working.

Colleagues have already begun feature creeping requests for the next version haha. (https://uploads.tapatalk-cdn.com/20210810/1ed20629272da46ca3b11dcc612e21e3.jpg)

Sent from my SM-G998B using Tapatalk

Title: Re: Door open timer switch thingymajig
Post by: Clock'd 0Ne on August 11, 2021, 09:01:08 AM
Impressive how quickly you put it together, nice job!
Title: Re: Door open timer switch thingymajig
Post by: zpyder on August 31, 2021, 04:53:56 AM
Wasn't as hard as I thought it would be. I've learned a fair bit of VBA for excel I think my job in the last 2 years. Gave me a good enough coding foundation that once I got used to the syntax it was fairly transferable.

And then the electronics... So long as I think of the pins as integers or boolean variables that's not too difficult either.

The hardest bit is soldering and just knowing little tips and tricks like always needing a resistor on an LED etc. I've blown one clone mini Arduino up with a short circuit somewhere (I think) but they're pretty cheap so not too concerned.

Once I finish a Udemy course on it I've got several projects in kind. I want to make an air quality monitor (rotorua is very bad in terms of geothermal sulphur, smoke from wood burning stoves, and pollen) and a small robot to send under our house to try and figure out where the ants are coming in. I can crawl under there but it's super creepy and a squeeze!

Sent from my SM-G998B using Tapatalk

Title: Re: Door open timer switch thingymajig
Post by: knighty on September 06, 2021, 12:47:35 PM
how do you dry the cabinet out?   or is that a tray of desiccant in the bottom?
Title: Re: Door open timer switch thingymajig
Post by: zpyder on September 06, 2021, 20:28:57 PM
Tray of silica dessicant in the bottom. We have two of them. Each morning we swap the one in the cabinet out with the other one which has been drying out in an oven set to 104 degrees celcius.

Daily swapping is overkill as the dessicant goes pink when it's used up, and never does. We used to go about a week between changes but found without strict protocols the technicians slacked... Hence this alarm!

Sent from my SM-G998B using Tapatalk

Title: Re: Door open timer switch thingymajig
Post by: knighty on September 08, 2021, 21:50:42 PM
Tray of silica dessicant in the bottom. We have two of them. Each morning we swap the one in the cabinet out with the other one which has been drying out in an oven set to 104 degrees celcius.
Daily swapping is overkill as the dessicant goes pink when it's used up, and never does. We used to go about a week between changes but found without strict protocols the technicians slacked... Hence this alarm!
Sent from my SM-G998B using Tapatalk

well in that case.... phhhh have I got something sexy for you!

https://www.youtube.com/watch?v=Vabq-s62IVM

:-)
Title: Re: Door open timer switch thingymajig
Post by: zpyder on September 08, 2021, 22:46:19 PM
Tray of silica dessicant in the bottom. We have two of them. Each morning we swap the one in the cabinet out with the other one which has been drying out in an oven set to 104 degrees celcius.
Daily swapping is overkill as the dessicant goes pink when it's used up, and never does. We used to go about a week between changes but found without strict protocols the technicians slacked... Hence this alarm!
Sent from my SM-G998B using Tapatalk

well in that case.... phhhh have I got something sexy for you!

https://www.youtube.com/watch?v=Vabq-s62IVM

:-)
Oohh... Intriguing.

I'm currently making a temp/humidity/uv meter.

The silica is probably a bit quicker. Though it's making me think that perhaps I could make a fan that circulates air inside when the door is closed and the humidity is above a set level.

Sent from my SM-G998B using Tapatalk
(https://uploads.tapatalk-cdn.com/20210908/48c1858669376d2cb03e761bfd7f0143.jpg)(https://uploads.tapatalk-cdn.com/20210908/b4c8cb252cc861f86459be4d30139794.jpg)
Title: Re: Door open timer switch thingymajig
Post by: knighty on September 14, 2021, 21:49:03 PM
a fan should make a a massive difference...

you'll defiantly have a dryer area around the silica and a wetter area around the stuff being dried
Title: Re: Door open timer switch thingymajig
Post by: zpyder on September 18, 2021, 19:54:43 PM
Cool basically if you get something working, I’d recommend still running it from an ESP just because they are smaller, cheaper and usually more powerful.. if you need any help let me know
So funny, when I first asked the question and you started talking about ESP stuff I had no idea what you were talking about except it sounded like extra work.

Now I find myself looking at them and thinking that's the next step. I just need to work my way through the Arduino boards I've bought so far first haha.

I'm building a fairly broad air quality monitoring gadget which is currently using a Mega as the number of sensors exceeded the Unos capabilities. Already I'm thinking that WiFi would be nice, but maybe I'll keep that for V2.

Sent from my SM-G998B using Tapatalk

Title: Re: Door open timer switch thingymajig
Post by: XEntity on September 18, 2021, 20:17:03 PM
Now I find myself looking at them and thinking that's the next step. I just need to work my way through the Arduino boards I've bought so far first haha.

Haha, I’d highly recommend the Wemos D1 Mini (this is the ESP favourite in the community), it’s pretty much adding one line in to the arduino IDE to support pretty much all ESPs, they are cheaper than arduino, gives you WiFi, are easy to stack accessories and proto boards, will just run off usb for the most part (if you need more power solder over the regulator or power direct from the 5v pin) if you have any questions or problems I’m happy to jump on any chat/screen share platform
Title: Re: Door open timer switch thingymajig
Post by: zpyder on October 04, 2021, 21:25:34 PM
Version 2.0 with fan control. Makes a huge difference, thanks knighty. (https://uploads.tapatalk-cdn.com/20211004/40187b4ed7ba50b3b2a7b7d9c2e26edc.jpg)(https://uploads.tapatalk-cdn.com/20211004/df05939c83fe6b22d74cf2568fcb67c6.jpg)

Sent from my SM-G998B using Tapatalk

Title: Re: Door open timer switch thingymajig
Post by: XEntity on October 05, 2021, 07:28:28 AM
That looks excellent! Which display are you using? And any pics of the inside?

I guess you have additional circuitry to handle the fan load, if so you can simplify this with a PWM fan.

Also if still considering the ESPs, checkout the TTGO boards with built in colour display, buttons, WiFi and Bluetooth  and powerful enough to run Tetris!
Title: Re: Door open timer switch thingymajig
Post by: zpyder on October 05, 2021, 07:40:07 AM
It's just a bog standard 0.96" I2C oled display. Was going to put a scrolling graph but not enough memory on the nano.

No clear pictures of the inside, but details are:

Nano Pro microcontroller.
BME280 temp/humidity sensor
5v relay
5v 1" fan
0.96" oled
Thin film pressure sensor
RGB led with resistor.
Active buzzer

The fan is hooked to the relay which is hooked to the 5v out pin.

The pressure sensor is on the 3.3v rail so max analog output is 6xx. Basically have the door open alarm set so that when the pressure drops below 500 it's open, turns fan off, and starts the countdown to the buzzer going off. Also changes the Led from green to red. (https://uploads.tapatalk-cdn.com/20211005/d916d431dd472a0a6e6647b019a168da.jpg)(https://uploads.tapatalk-cdn.com/20211005/708a72ed1c1d79f37da1e37868ce4990.jpg)(https://uploads.tapatalk-cdn.com/20211005/04ec3ea1055cffb17a73d89f953d2392.jpg)

Sent from my SM-G998B using Tapatalk

Title: Re: Door open timer switch thingymajig
Post by: zpyder on October 05, 2021, 07:43:34 AM
Will check out the ttgos... I just bought a pack of 10 d1 minis for temp/humidity monitoring through the house.

Still have a big air quality monitoring project to work on but the sensors are pretty naff. Tend to drift and don't provide very meaningful results.

Sent from my SM-G998B using Tapatalk

Title: Re: Door open timer switch thingymajig
Post by: XEntity on October 05, 2021, 08:40:47 AM
Nice, looked like you’ve got it pretty compact too!
Title: Re: Door open timer switch thingymajig
Post by: zpyder on October 05, 2021, 08:43:20 AM
Yeah, have found getting things into a small package the biggest challenge. Many headaches!

Tend to solder most stuff on but then have to use header pins to do final connections between the two sections using a pair of tweezers to hook em up! Think the motor wires and oled screen are connected that way so if I need to open it up I can.

Sent from my SM-G998B using Tapatalk

Title: Re: Door open timer switch thingymajig
Post by: XEntity on October 05, 2021, 09:08:35 AM
I just bought a pack of 10 d1 minis for temp/humidity monitoring through the house.

Still have a big air quality monitoring project to work on but the sensors are pretty naff. Tend to drift and don't provide very meaningful results.

The D1's will be ideal for that, just a couple of things to consider for temp monitoring, which might not be so much of an issue with the BME280 but I had a couple of challenges when using a thermistor.. Obviously proximity to the ESP/Arduino can throw the readings off just due to the heat being generated from it, but the other issue I found using a thermistor was that keeping it powered constantly would cause itself to generate heat throwing off the readings over time (which is kind of obvious in retrospect) but was just using what I had handy at the time!

Yeah, have found getting things into a small package the biggest challenge. Many headaches!

Tend to solder most stuff on but then have to use header pins to do final connections between the two sections using a pair of tweezers to hook em up!

On the D1 this is where the stackable proto boards can come in handy BTW
Title: Re: Door open timer switch thingymajig
Post by: Clock'd 0Ne on October 05, 2021, 09:26:59 AM
I can't add anything of value here except to say that this is really cool stuff, nicely done  8)
Title: Re: Door open timer switch thingymajig
Post by: zpyder on October 05, 2021, 09:33:40 AM
Heh, I think temp changes are what are throwing my air sensors off. Get everything stable and take it outside and it instantly reads a different value. Not because there's H2S in the air, but because its gone from 20 degrees to 10.

Will probably need to build in temperature compensation but not all the sensors data sheets provide temperature offset info.

Also, have you noticed how hostile the Arduino forums are? I've never seen anything like it. Literally all questions have to be written in such a detailed way that takes way too long to do or they descend en masse to have a go at the poster.

And on the rare occasion they're polite, inevitably they start bickering amongst themselves.

Sent from my SM-G998B using Tapatalk

Title: Re: Door open timer switch thingymajig
Post by: zpyder on October 05, 2021, 09:36:41 AM
a fan should make a a massive difference...

you'll defiantly have a dryer area around the silica and a wetter area around the stuff being dried
Turned out the air in the silica tray was about 3-4%. And at the top of the cabinet would be about 30%

The fan helps even things out. Also interesting to see the silica colour is noticeably changing by the end of the day so it's obviously doing more drying than it did pre-fan.

Sent from my SM-G998B using Tapatalk

Title: Re: Door open timer switch thingymajig
Post by: XEntity on October 05, 2021, 09:53:23 AM
Heh, I think temp changes are what are throwing my air sensors off. Get everything stable and take it outside and it instantly reads a different value. Not because there's H2S in the air, but because its gone from 20 degrees to 10.

Will probably need to build in temperature compensation but not all the sensors data sheets provide temperature offset info.

Also, have you noticed how hostile the Arduino forums are? I've never seen anything like it. Literally all questions have to be written in such a detailed way that takes way too long to do or they descend en masse to have a go at the poster.

And on the rare occasion they're polite, inevitably they start bickering amongst themselves.


I've not been on there in a long time, mostly I manage to get more immediate answers by either googling or my question is about a specific repository where I'll generally raise a question to the dev via github or their discord etc.. Reddit can sometimes be useful too, the esp8266 group is pretty good..
Title: Re: Door open timer switch thingymajig
Post by: knighty on October 05, 2021, 11:10:09 AM
like Nige I don't have anything useful to add, but it looks good / glad it's working :-)