Skip to main content

Smart Bin Project 101: Intro to Robotic with ESP32

This is one of my blog post without using GenAI to help with grammar and such. I know, I did some research using tools, but writing this post, I am doing my best use my all fingers to type the words one by one. 
So in this post, I will talk about ESP32. This is a tool that can be used for beginner who are interested in doing coding and robotic in a cheap way. In Indonesia it self, I bought the kit, available on an e-commerce, it was only Rp200.000 or about $20. 

To make a Smart Bin like in the picture above, we only need 3 tools, and some materials. They are:

Tools we need:

  • ESP32 as the main character, as the brain of the computer
  • Servo SG90, as the motor that will move the bin lead to up and down
  • HC-SRO4 as the movement sensor, look like eyes, but they are distance sensor, will make it read if <20cm, the lid opens.
    ESP32
Servo S90
 
HC-SRO4

Materials we need:
  • A coffee cup
  • Tape
  • Some cable jumper (you'll get it in the package if you buy the kit)
  • USB Cable for uploading the code and also as it's power source

Cable Jumper


Coffee Cup
 
USB Cable


How to make it?

  1. Let's assemble the ESP32 and its extension. 
  2. Plug in the USB cable and make sure both the ESP32 and its extention has red light on.
  3. Connect the Servo to ESP32 using cable jumper with this adjusment:
    • Servo has 3 connectors, all connect to D26.
    • Brown to G
    • Red to V 
    • Yellow to S
  4. Connect HC-SRO4 to ESP32 with this adjustment:
    • VCC to 5V (Oh I forgot, there is yellow jumper on ESP32, move it to 5V instead of 3V)
    • Trig to D5 (choose the S)
    • Echo to D (choose the S)
    • Gnd to Gnd


Time to code!

No worries, I know sometimes coding is boring, thus I asked some help from the most reliable helper, GenAI. So honestly I copied pasted the code to Arduino IDE. Ok, I'll tell you the step in coding part.

  1. Install Arduino IDE.
  2. Install some necessary libraries for supporting our tools (HC-SRO4, Servo, ESP32).
  3. After three of them installed, you can copy paste this code to the coding space.
  4. Click the check mark button on top of the code spase to check whether there's missing or error code. 
  5. Then if all is ok, click the sign right button to upload the code to our ESP32 hardware.
  6. If all is good, you're Smart bin is function.
My cutie pie Smart Bin



Comments

Popular posts from this blog

Artificial Intelligence 101: From Alan Turing to the Modern Classroom

Illustration Generated by Gemini AI How AI Was Founded AI was conceptualized in 1950 by British mathematician and computer scientist Alan Turing . In his landmark paper, "Computing Machinery and Intelligence," Turing posed the fundamental question, "Can machines think?" He introduced the Imitation Game (now universally known as the Turing Test ) as a benchmark to evaluate whether a machine could exhibit behavior indistinguishable from human intelligence. Historical Note: While Turing laid the theoretical foundation, the actual term "Artificial Intelligence" was later coined in 1956 by John McCarthy during the famous Dartmouth Conference, which officially established AI as an academic discipline. How AI Works in Education Modern educational AI transforms learning environments by moving away from static programs toward dynamic, data-driven systems . It primarily operates through three core layers: Intelligent Personalization: AI analyzes a student...

Who am I? Throwing back to my past for the sake of my future.

I have been craving for robotics since I was a kid. However, I couldn't afford it due to many things and needed to focus my self up for working, teaching, and earning some extra for my life and my family. Growing up from middle to low income taught me not to focus on my self, I even was confused when people asked me what was my hobby about. But, yeah, having limited access to financial is actually become my priviledge as well. I am a person who has a lot to think about. I can flash out in a mili second with anything crossing my mind. It is interesting with or without caffeine, my mind is very crowded and noisy. Thus, living with others is actually not very beneficial for me because my brain bandwidth will somehow stretched and overwhelmed. To encounter that problem, I choose to live independently from my parents, colleagues, and even neighbors.  I thought, my interpersonal skills was not developed properly, or probably I am an introverted person, yes it might be like that, however,...