Solar Powered Cellar Lighting
by thejester85 in Circuits > Arduino
545 Views, 0 Favorites, 0 Comments
Solar Powered Cellar Lighting
Have you ever wanted to have some lighting in a cellar or a room with some type of control. Whether it be simply turning on when you walk in or better yet the ability to dim and brighten. Here’s one solution get started on this project.
It’s a simple sketch and very simple setup. You can modify however you like. Here goes!!
It’s a simple sketch and very simple setup. You can modify however you like. Here goes!!
Gather Supplies
Solar Panel 12v
Game Camera (SLA battery 12v 7.5AH or larger battery)
Solar Charge Controller 12v
Arduino Nano or uno or mega
12v super bright led strip 2x16.4ft
100K ohm Potentiometer
2x1k ohm resistors
RFP30N06LE 30A 60V N-Channel Mosfet TO-220
Epoxy (to glue strips to cement)
Game Camera (SLA battery 12v 7.5AH or larger battery)
Solar Charge Controller 12v
Arduino Nano or uno or mega
12v super bright led strip 2x16.4ft
100K ohm Potentiometer
2x1k ohm resistors
RFP30N06LE 30A 60V N-Channel Mosfet TO-220
Epoxy (to glue strips to cement)
Glue Down Strips to Wall or Roof
Most indoor strips come with 3M tape on the back but it doesn’t stick well to cement so for every foot or two put a dab of epoxy where the leds are going to be placed.
Make sure the end where you will connect wires will be close to where you are connecting to Arduino circuit.
Make sure the end where you will connect wires will be close to where you are connecting to Arduino circuit.
Make Connections
Run your solar power down into cellar or wherever your design suits. Connect the (+)(-) respectively to your solar array side of the charging system. Connect your battery to its side respectively on charge controller.
Downloads
Coding
On your arduino you should look for the pwm pins so that you can adjust the lighting with pwm control. Using the potentiometer as you turn to greater resistance this reading will be sent to your lights. When the resistance falls below 20ohms it will shut the lights off.
#define lights 9 //connects to gate of mosfet
int pot = A0;
void setup() {
Serial.begin(9600);
pinMode(lights, OUTPUT);
pinMode(pot, INPUT_PULLUP);
}
void loop() {
delay(200);
int control = analogRead(pot);
control = map(control, 0, 1023, 0, 255);
Serial.println(control);
delay(200);
analogWrite(lights, control);
If(control < 20){
analogWrite(lights, 0);
}
}
#define lights 9 //connects to gate of mosfet
int pot = A0;
void setup() {
Serial.begin(9600);
pinMode(lights, OUTPUT);
pinMode(pot, INPUT_PULLUP);
}
void loop() {
delay(200);
int control = analogRead(pot);
control = map(control, 0, 1023, 0, 255);
Serial.println(control);
delay(200);
analogWrite(lights, control);
If(control < 20){
analogWrite(lights, 0);
}
}
Finished!!
Now you have a working and controllable lighting system.