Do It Yourself ! Automated Solar Emergency Lamp !!
by AXR AMAR in Circuits > Electronics
4683 Views, 78 Favorites, 0 Comments
Do It Yourself ! Automated Solar Emergency Lamp !!

This project is to design and develop bluetooth and android automated portable solar lamp for outside camp ,trekking and for those small villages which are not getting continues power supply !
You can do this project if you have basic knowledge of electronics and microcontroller ,
if you don't know anything about programming microcontroller then just follow my steps carefully ! you can do it undoubtedly ...!
ok Letz start now
You can do this project if you have basic knowledge of electronics and microcontroller ,
if you don't know anything about programming microcontroller then just follow my steps carefully ! you can do it undoubtedly ...!
ok Letz start now
List of Components










1) Battery
2) pic microcontroller board
www.nskelectronics.in
3)12v led strip
4) relay module
5)jumpers
6)voltage booster
7)soldering iron
8)solar panel
9) multimeter
10) screw driver
2) pic microcontroller board
www.nskelectronics.in
3)12v led strip
4) relay module
5)jumpers
6)voltage booster
7)soldering iron
8)solar panel
9) multimeter
10) screw driver
Output of Solar Panel

when I directly connect the output of the solar panel to multimeter I am getting around 9-10v !
the voltage needed to charge battery is 12v-13v !
to do this we have to boost the output of the solar panel voltage by using voltage booster module !
the voltage needed to charge battery is 12v-13v !
to do this we have to boost the output of the solar panel voltage by using voltage booster module !
Boosting Solar Panel Output !!


connect of input pins
IN+ to solar panel +
IN- to solar panel -
connect of output pins
Out- to Multimeter -
Out+ to Multimeter +
IN+ to solar panel +
IN- to solar panel -
connect of output pins
Out- to Multimeter -
Out+ to Multimeter +
NOTE :


if you are getting voltage less than or greater the voltage you needed ,then you can adjust by tuning the potentiometer on the Booster module,until you get the desired voltage.
Take a screwdriver tune the pot !
Take a screwdriver tune the pot !
Time to Connect the Battery !!
now connect the output of the booster to battery !
OUT+ to +ve terminal of the battery
OUT- to -ve terminal of the battery !!
OUT+ to +ve terminal of the battery
OUT- to -ve terminal of the battery !!
Next Step Is !
### Charging Unit is Completed #### ### Now we program pic microcontroller to control relay board and to take input from Bluetooth module ###
Softwares Needed


1) Micro C
link to download ::
http://www.mikroe.com/mikroc/pic/
mikroC for PIC is a full-featured ANSI C compiler for PIC devices from Microchip®. It is the best solution for developing code for PIC devices.
2) Pickit2
link to download ::
http://www.microchip.com/pickit2
Using the PICKIT2 Software
Once the Pickit2 software is started, you get the message that Pickit2 usb is not connected to your USB.
First connect your Pickit2 USB to your pc before opening the Pickit2 software. Also immediately connect your ic you want to program before opening your Pickit2 software. If everything is well connected, you'll get " Pickit2 found and detected" and "PIC device found".
Once everything is working fine, the Pickit2 and the PIC processor are detected, you can load the HEX file in the programmer. Go to File - Import HEX and select the location where you've saved , Please make sure you load the correct HEX file on the correct module,
The only thing you have to do now is press on the write button to program the HEX file in the module.
link to download ::
http://www.mikroe.com/mikroc/pic/
mikroC for PIC is a full-featured ANSI C compiler for PIC devices from Microchip®. It is the best solution for developing code for PIC devices.
2) Pickit2
link to download ::
http://www.microchip.com/pickit2
Using the PICKIT2 Software
Once the Pickit2 software is started, you get the message that Pickit2 usb is not connected to your USB.
First connect your Pickit2 USB to your pc before opening the Pickit2 software. Also immediately connect your ic you want to program before opening your Pickit2 software. If everything is well connected, you'll get " Pickit2 found and detected" and "PIC device found".
Once everything is working fine, the Pickit2 and the PIC processor are detected, you can load the HEX file in the programmer. Go to File - Import HEX and select the location where you've saved , Please make sure you load the correct HEX file on the correct module,
The only thing you have to do now is press on the write button to program the HEX file in the module.
Hardware Needed -pickit2 Programmer



you can buy any type of pickit2 programmer
if you are buying the one with zif socket then it is good !
it will reduce the time of connecting jumpers to the icsp pins !!
#connect the jumpers properly if you are using icsp to program the pic ic .
if you are buying the one with zif socket then it is good !
it will reduce the time of connecting jumpers to the icsp pins !!
#connect the jumpers properly if you are using icsp to program the pic ic .
NOTE ::


Libraries to add in MicroC PRO software !! to add library Goto #view > #library manager then check LCD,Lcd_Constants, and UART options on library manager .
Code !

unsigned char uart_rd,i;
void main() {
TRISB.F0 = 0;
UART1_Init(9600); //UART module at 9600 bps
Delay_ms(100); // Wait for UART module to stabilize
while (1)
{ // Endless loop
if (UART1_Data_Ready())
{ // If data is received,
uart_rd = UART1_Read();
UART1_Write(uart_rd);
}
if ( uart_rd == 'x')
{
PORTB.F0 = 1; //LED Off
}
if (uart_rd == 'a')
{
PORTB.F0 = 0; //LED on
}
}
}
void main() {
TRISB.F0 = 0;
UART1_Init(9600); //UART module at 9600 bps
Delay_ms(100); // Wait for UART module to stabilize
while (1)
{ // Endless loop
if (UART1_Data_Ready())
{ // If data is received,
uart_rd = UART1_Read();
UART1_Write(uart_rd);
}
if ( uart_rd == 'x')
{
PORTB.F0 = 1; //LED Off
}
if (uart_rd == 'a')
{
PORTB.F0 = 0; //LED on
}
}
}
Circuit !


Connection of PIC board , RELAY module , Bluetooth , LED bulb !
NOTE ::
Once your program is finished ,then build it , save HEX file in the known location and open Pickit2 software then click button ! now your pic ic ready to accept commands from Bluetooth and to control relay board !
Android App !


Download Amarino.apk at google play store !
Commands to Control Led Lamp !!! Watch Video

send "a" to turn on the lamp
send "x" to turn off the lamp !
send "x" to turn off the lamp !
Thank You
Please comment ! if you have any doubt I will try to clear it ! and don't forget to vote :) my mail I'd :: amaraxr@gmail.com my website :: www.Xolcano.com Thank you !