How to make a Dark activated light system with Arduino Pro Mini board
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/323.jpg?resize=1024%2C576&ssl=1)
Hello and welcome back. In this project, we will learn how to make a dark activated light system with an Arduino Pro Mini board. For that, I have mainly used the LDR (Light Dependent Resistor) sensor. The LDR sensor detects changes in ambient light levels, allowing our system to activate the lights when it gets dark. Also, I have added the IRF9540 MOSFET transistor to this circuit. Therefore we can control High ampere 12v LED bulbs with this system. Additionally, you need an Arduino Nano board, Arduino UNO board, or TTL converter for programming this Pro-mini board. For that, I used the Arduino UNO board. Also, I have designed a PCB (Printed Circuit Board) for this project with JLCPCB. Therefore, we can assemble this system easily. This system is perfect for outdoor lights, gate lights, and more. If you are a beginner of this, Please visit the tutorials below.
- How to use IRF9540 MOSFET transistor – Click on me
- How to use the LDR sensor – Click on me
OK, let’s do this project step by step. The required components are given below.
- Arduino Pro Mini board x 1 — Our Store / Amazon
- Arduino UNO board x 1 — Amazon / Our Store
- LDR sensor x 1 — Our Store / Amazon
- 3mm LED bulb x 1 — Amazon / Our Store
- IRF9540 FET Transistor x 1 — Amazon / Our store
- C1815/C828 Transistor x 1 — Amazon / Our store
- 12v LED strip x 1 — Amazon / Our store
- 330 ohm resistor x 1 — Amazon / Our Store
- 1k resistor x 1 — Amazon / Our Store
- 10k resistor x 2 — Amazon / Our Store
- 2-pin Terminal x 2 — Amazon / Our Store
- Female header x 1 — Our store / Amazon
Disclosure: These Amazon links are Affiliate links. As an Amazon Associate, I earn from qualifying purchases.
Step 1
Firstly, identify these components.
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/1-17.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/2-7.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/3-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/4-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/5-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/6-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/7-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/8-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/9-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/10-1.jpg?resize=900%2C505&ssl=1)
Step 2
Secondly, order PCBs for this project. Follow the instructions below for that.
- First, go to the JLCPCB official website and log in to your account. If you are a new member of this, please use this link. Then, you can get a 60$ coupon for orders to PCBs.
- JLCPCB: 48-Hour Turnaround for 6 Layer PCBs! — Click on me
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/03/15-3.jpg?resize=900%2C505&ssl=1)
![How to make a modified Bluetooth control car with Arduino Nano](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/03/16-3.jpg?resize=900%2C505&ssl=1)
- Now, click the instant quote button and upload the Gerber file. You can download it using the link below.
- Gerber file — Download
- I have ordered 5 PCBs with Green color. You can also remove the order number on PCBs.
- Then, select the build time and shipping. Finally, click the save to cart button.
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/11-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/12-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/13-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/14-1.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/15-1.jpg?resize=900%2C505&ssl=1)
- Now, open your cart and click the secure checkout button. Then, enter your shipping details and shipping method.
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/16-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/17-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/04/16-4.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/04/17-4.jpg?resize=900%2C505&ssl=1)
- Next, submit your order and pay for this using Paypal, Debit Card, Credit Card, or Coupon. Now waiting for your PCB package.
![How to make a DIY motion protection system with Nodemcu ESP8266 board | WhatsApp alerts](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/04/18-3.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/Capture2.png?resize=897%2C504&ssl=1)
Step 3
Next, unbox the PCB box and check your PCBs.
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/18-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/19-1.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/20-1.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/21-1.jpg?resize=900%2C505&ssl=1)
Step 4
Then, prepare the female headers to mount the Arduino Pro Mini board.
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/22-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/23-1.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/24-1.jpg?resize=900%2C505&ssl=1)
Step 5
Next, solder all components to the PCB.
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/25-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/26-1.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/27-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/28-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/29-1.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/30-1.jpg?resize=900%2C505&ssl=1)
Step 6
Now, connect the Pro Mini board to the PCB.
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/31-1.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/32-1.jpg?resize=900%2C505&ssl=1)
Step 7
OK, let’s program this system using the Arduino UNO board. For that, follow the instructions below.
- First, connect the Arduino UNO board to the Pro Mini board. For that, use the GND, 5V, Rx, and Tx pins.
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/Circuit.jpg?resize=1024%2C1024&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/33-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/34-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/35-1.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/36.jpg?resize=900%2C505&ssl=1)
- Then, connect the Arduino UNO board to the computer.
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/37-1.jpg?resize=900%2C505&ssl=1)
- Now, upload an Empty sketch to the Arduino UNO board. For that, select the Arduino UNO board and port. After, click the upload button.
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/38-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/39-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/40-1.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/41-1.jpg?resize=900%2C505&ssl=1)
- Next, copy and paste the following program to the Arduino IDE.
- Program and Gerber file — Download
#define output 3 //output pin
#define LDR A1 //Sensor pin
void setup() {
pinMode(output, OUTPUT);//set as output
Serial.begin(9600);//enable serial monitor
}
void loop() {
int value = analogRead(LDR);//get the sersor values
Serial.println(value);//print these values on serial monitor
// value = map(value, 0, 1024, 0, 255);
// analogWrite(output, value);
if (value > 900) {//check the value
digitalWrite(output, HIGH);
} else {
digitalWrite(output, LOW);
}
}
- Now, select the Arduino Pro Mini board and port. After that, click the upload button. In this case, when the “uploading” is displayed on the IDE, press and release the reset button for 2 seconds.
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/42-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/43-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/44-1.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/45-1.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/46-1.jpg?resize=900%2C505&ssl=1)
Step 8
OK, now you can remove the Arduino UNO board. Then, connect the 12V LED bulb to this system. I have used a 12V LED strip for that. Finally, provide a 9v – 12v power supply to this system. You can also use a 9v battery.
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/48-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/49-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/50-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/51-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/52-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/53-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/54-1.jpg?resize=900%2C505&ssl=1)
![](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/55-1.jpg?resize=900%2C505&ssl=1)
Now, you can test this project by covering the LDR sensor with your hand. The full video guide is below. So, we hope to see you in the next project. have a good day.
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/56-1.jpg?resize=900%2C505&ssl=1)
![How to make a Dark activated light system with Arduino Pro Mini board](https://i0.wp.com/srituhobby.com/wp-content/uploads/2024/05/57-1.jpg?resize=900%2C505&ssl=1)
How to make a Dark activated light system with Arduino Pro Mini board