Open Lid Detect Idea


 

DavidNP

TVWBB Member
Don't know if it's been discussed before...but I was 'thinking' and thought it would be pretty easy to use a cheap tilt sensor on the hinge of my kamado to detect/trigger a "lid open" event.

Here's a sample of simple device....

I guess we could even connect it to a probe input (2.5 mm male jack) and change the software a bit to use a probe input as a "lid detect"....

maybe it's overkill and the current lid open offset is works good enough.....but its an idea I may try for the fun of it.....
 
I've also been toying with the idea of a switch to detect the lid being open. Something as simple as a momentary contact that closes when you open the lid could be wired into the circuit. That's basically all the circuit is currently. Press the 4way to the left and it closes the circuit for lid detect. (I'm pretty sure).

Something I'll mess with in the coming weeks/months when I'm cooking more.
 
The current method requires a momentary contact, so if you could find something like a momentary contact magnetic reed switch, you could attach one to the lid.

You could also wire up a foot switch, like a guitar stomp box.

Contact points:

QFf4ns4.png
 
Is there harm is closing, and maintaining the circuit closed? Not sure I ever tried holding the button to the left.

If not it's as easy as having the lid open the circuit when you close it. If so, you need something that opening the lid would close the circuit momentarily and then let it open back up.
 
I don't think you can maintain a closed signal. It all goes to a single input on the Atmega, which means you wouldn't be able to use the button for the other 3 directions.
 
I would assume you would want some sort of debounce circuit as well, maybe a schmitt trigger. I have noticed that when I manually engage lid open, it sometimes "bounces" back to lid closed. I'm not sure if there is any software debouncing written into the heatermeter, but it wouldn't hurt to have hardware debouncing to be safe.
 
Last edited:
I think I'm going to not emulate the left button press.....the tilt switch connected to probe 4 would be more accurate(and don't have to mess with the standard board)....I also wanted to stay away from the heat, so didn't want anything near the lid (hinge for my smoker is a few inches away) so a tilt sensor should work. I'll test it out.....
 
hardware question....could I use pin 8 (IRQ pin 4 from atmega) from the ICSP header as the 'switch' input? would obviously still need to change the HM code to have IRQ as input and trigger the lid open event.....
 
You wouldn't necessarily need to use a hardware interrupt pin, but both 7 and 8 on the ICSP header are usable if you disable the RF code in HeaterMeter. You don't so much need to use attachInterrupt() as much as you just poll the status of your selected pin and suspend the normal operation while it is asserted. You can just call pid.resetLidOpenResumeCountdown() every loop that the pin is low then... I'm sure there is an opposite function to turn it off, I just can't think of it off hand.
 

 

Back
Top