Solar Powered Cellar Lighting

by thejester85 in Circuits > Arduino

545 Views, 0 Favorites, 0 Comments

Solar Powered Cellar Lighting

07B6107A-70DC-4347-8A96-FAE68DD58229.jpeg
913999D7-490B-4E5B-83A9-9041810FDFA5.jpeg
B0158805-8E63-4684-94AB-32D2B732B5FF.jpeg
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!!

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)

Glue Down Strips to Wall or Roof

4A84C130-9329-4F72-80E8-3F8F869F05B9.jpeg
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 Connections

a093cd92-177d-4560-8cf6-a1274282e67a_Zx6vNBwhzj.jpeg
fca2f6e5-4630-46a8-8f66-2dae9a6eb848_bpqzubrv2x.jpeg
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.

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);
}
}

Finished!!

Now you have a working and controllable lighting system.