Chef Light - Helps You Cook New Recipes

by mondal3011 in Circuits > Arduino

1643 Views, 15 Favorites, 0 Comments

Chef Light - Helps You Cook New Recipes

Instructables.png
Untitled design.png
IMG20240430115726-01.jpeg

Recently I visited my elder brother who just moved into an apartment. He is living alone and has lately started cooking on his own. As a beginner, he does seem to have trouble remembering to add all the necessary ingredients (He forgot to add turmeric into a curry he made for me). That got me thinking if I could do something for him. Since I am a computer engineering student, I decided to build him something with microcontrollers. My brother has created many Instructables with microcontrollers. After going through some of his projects, I got this idea.

Chef Light is a mini lamp that helps you add the right ingredient at the right time while cooking. It has a glowing Chef's hat that can change colors. It has been programmed with a few recipes. When you begin cooking, turn on the Chef Light and select the recipe from a mobile app called Blynk. Every time the light changes color, all you have to do is pick up the container that has a matching color and add the ingredient into your dish.

Supplies

Esp8266 microcontroller: Buy

Common cathode RGB LEDs: Buy

5v power adapter with micro USB cable: Buy

PVC foam board: Buy

Female - Female jumper wires: Buy

Colored containers: Buy


Tools and others:

Exacto knife: Buy

Adhesive

Pencil

Insulation tape

Make the Chef's Hat Cutout

20240426_124027-01.jpeg
20240426_124103-01.jpeg
20240426_124245-01.jpeg
20240426_130312-01.jpeg
20240426_130342-01.jpeg

Take a sheet of 3mm or 5mm thick PVC board and cut out a circle of approximately 8cm (~ 3 inch) diameter. Then draw the shape of a Chef's hat, as shown in the images above. Carefully cut it out using an exacto knife. After cutting the hat, make sure to cut the borders out again to make it smaller. This way, when you place it back in the circular PVC board, you will have a nice empty border as shown in the last image.

Wiring the Microcontroller

IMG20240430112516-01.jpeg
IMG20240430112628-01.jpeg
IMG20240430113017-01-01.jpeg
IMG20240430113329-01.jpeg

The RGB LED has 4 pins. Place the LED on a surface such that the smallest pin is to the left. This way the pins from left to right are Blue, Green, Ground (negative), and Red. I have connected the Red pin to D1, Green to D2, and Blue to D3 of the esp8266. The GND pin was connected to GND.

Simulating on Tinkercad

Screenshot from 2024-04-30 12-38-47.png
Screenshot from 2024-04-30 12-42-17.png
Screenshot from 2024-04-30 12-42-45.png
Screenshot from 2024-04-30 12-42-56.png
Screenshot from 2024-04-30 12-43-08.png

Here's a neat little trick. If you don't know what values to program in the microcontroller to get the exact color you need from the LED, you can use Tinkercad. While Tinkercad doesn't have an esp8266, you can use an Arduino instead.

In my case, I have connected the R, B and G pins to 9, 10 and 11 of Arduino. This is because you'll need a PWM pin (marked with ~) to control each terminal of the LED.

Once done, head to the code blocks on the left and add a block that says "set RGB LED in pins" to the "forever" block. Select 9, 11, 10 as they correspond to R, G, B. Here's the fun part. Select any color in the block you added and select "Blocks + Text" from the top dropdown. Now you'll get the entire code to light up the LED with that specific color. Cool, isn't it?

I have embedded the Tinkercad file in this step. Feel free to check it out.

Rest of the Build

IMG20240430113549-01.jpeg
IMG20240430113914-01.jpeg
IMG20240430112251-01.jpeg
IMG20240430114806-01.jpeg

Place the LED to the underside of the esp8266 board and use some tape to hold the wires in place. Then, place the whole thing into another circular PVC board, which will be the bottom section. Tidy up the wires with some more tape.

Finally, I used a 2-1/2 inch PVC pipe section for the side body and painted it white.

Make sure to make a small notch on one end of the PVC pipe section for the wire to pass through.

Setup Blynk

Screenshot from 2024-05-01 19-10-59.png
Screenshot from 2024-05-01 19-11-29.png
Screenshot from 2024-05-01 19-11-38.png
Screenshot from 2024-05-01 19-11-53.png

Visit blynk.io and create an account. Once setup, you will be in the dashboard screen. Click on "Quickstart" from the top right.

A window will pop up guiding you through the steps. Good news is, everything including the initial code setup will be guided by Blynk. All you need to do is follow the steps.

  1. Select esp8266 for the hardware and WiFi as connection type
  2. Select Arduino as the IDE
  3. Click next on the Blink Library section
  4. You can skip the code section since I have attached the complete code in a later step.

Add the Buttons for Different Dishes

Screenshot from 2024-05-01 19-29-33.png
Screenshot from 2024-05-01 19-32-11.png
Screenshot from 2024-05-01 19-32-37.png

Add three switches from the widget box for three different recipes. In the datastream section, select a different virtual pin (V0, V1, V2) for each switch. We will set up the virtual pins in the code in the next step.

Program the Esp8266

Screenshot from 2024-05-01 19-07-06.png
Screenshot from 2024-05-01 19-48-03.png
Screenshot from 2024-05-01 19-46-39.png

Open the Arduino IDE and install the Blynk library from the library manager. Use the code attached in this step.

Replace "WIFI_SSID" and "WIFI_PASSWORD" with the SSID and password of your wifi network.

The delays for different colors are set up in the BLYNK_WRITE() function.

The first switch was set up on the virtual pin V0. So, we use the BLYNK_WRITE(V0) function.

While it would be easy to code a certain color for the LED and just use delays for the wait time, unfortunately, we cannot do that here. The esp8266 needs to call the Blynk.run() function quite often to stay connected to the Blynk server. So delays work against us. That is why I have used a wait_time variable that increments every time the loop() function is executed. By counting the value of this variable, we determine how long it has been since the switch was turned on. You need to customize your light colors and intervals based on this variable.

Downloads

Putting It All Together

IMG20240430115714-01.jpeg
IMG20240430115849-01.jpeg
IMG20240523111451-01.jpeg
IMG20240430115915-01.jpeg
IMG20240430120007_01-01.jpeg

Finally, install the Blynk app on your phone and login with the same account. You should see the switches for the recipes you have set up. Make sure to keep the right ingredients in the colored containers corresponding to the colors you have defined in the code.

Turn on any switch to start making that dish. Every time the light changes color, you will know which container to look for the next ingredient. You can add more dishes by editing the code.