Skip to main content

06. Controlling the bulb at your home using a push-button (Prototype)

The supplies are exactly the ones mentioned in the fifth project. Make sure you have read the previous project as you could get a glimpse of how this project works.
The hardware and the coding will be similar to that of the previous project except for a few changes, because I will be using a relay switch* in this project.

*Safety precaution: If you are a beginner, please do not tamper with mains electricity. As this project is for beginners, I will show you how to use an alternative.

Supplies:

  • LED 
  • Push-button
  • Relay module - single channel 5V

  • Resistors - 1kΩ and 10kΩ 
  • Arduino Uno R3
  • Solderless Breadboard - Mini
  • Power bank - 10000 mAh
  • Old USB 1.0/2.0 A type cable
  • Jumper wires
  • Jumper cable

**Note: The power bank will be an alternative to the mains power supply while the LED will be an alternative for the bulb.

Setting up your hardware

Connections

  • Relay module - D10
  • Push-button - D9

Coding

The coding will be similar to that shown in the previous project, but the variable name will be changed from 'LED' to 'RELAY', as we are going to control the relay module instead of LED.

Final Look


Comments