Pressure cooker is a very common utensil in almost all Indian households, keeping track of how many whistles have been blown to know when to switch off the gas stove is boring work, many of the time we miss a whistling sound. This article describes a smart electronic counter which counts the number of whistles and also time duration of cooking. It generates buzzer alarm when set counts or time duration is reached.
The Circuit diagram of smart whistle counter is shown in figure-1, It is based on Arduino Mega 2560 board. LM393 based sound sensor module is used for detection of sound of whistle. It operates at 5V and gives analog voltage proportional to sound level, which is fed to analog input pin (A0) of micro-controller. 4X4 keypad is used as an input device to set total number of whistles, or total time duration for cooking. 4X4 keypad is consists of 4 rows and 4 columns, which are connected to 8 digital input pins of micro-controller. In this project 0.91” inch I2C Serial 4-pin OLED display module is interfaced with Arduino, It displays number of detected whistles and time duration. The resolution of the display is 128 X 32 and its driving voltage is 5V. It is connected on the SCL and SDA pins of the Arduino bord. Active alarm buzzer module is used in this project works on 5V. Connected on the digital output pin number 53 of Arduino board. It provides 1KHz sound signal. Buzzer is triggered when set whistle count is reached or cooking duration is reached.
Table 1: Parts list
|Micro-controller board||Arduino Mega 2560||1|
|Display||0.91” OLED 128×32||1|
Sound sensor output is connected to analog input of micro-controller, it is digitized with 10 bits resolution. A moving window low pass filter is implemented in software, with window size of 25000 samples. The sum value of window is compared with “high threshold”, a whistle is declared detected if the sum value is higher. The whistle sound stays high for few seconds, so whistle low detection is also important. If the detected flag is true and window sum value is less than “low threshold”, whistle low is declared. The section of C code is shown in figure-2. This method of whistle detection is very robust, it works well in presence of other household surrounding noise.
if ((sum > (sound_high_thresold*no_of_samples)) && wst_ongoing==false)
if ((sum < (sound_low_thresold*no_of_samples)) && wst_ongoing==true)
The other functionalities of software are running clock timer (minutes & seconds), get inputs from 4×4 key pad, display data on OLED, play buzzer, etc. The display shows the number of detected whistles and time since start of cooking. When number of whistles reaches to the previous set value the module buzzes the alarm to indicate that the task of the pressure cooker is over and now its time to turn off the gas stove. Similarly if pressure cooker doesn’t make any whistle for long period of time then also it buzzes an alarm to indicate that there must be some issue with pressure cooker and we can immediately turn off the gas stove. Photographs of Smart whistle counter is shown in figure.
Miniaturized product concept
A concept of miniaturized product which can be directly attached to any stainless steel whistle of pressure cooker is shown in figure 3. It will be based on a custom ASIC (Applications Specific Integrated Circuit), which will have a micro-controller core, analog front-end for mic (sound sensor), display driver, buzzer driver and interface to multifunctional keys. It will be powered through button cells or small rechargeable batteries. A COTS smart watch chip can also be reconfigured by changing software to achieve similar functionality.
Palak Patel is an Electronics engineer having experience in embedded system development for terminal automation industry. Currently she is doing freelancing for embedded systems projects.