Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help with solar data logger system using PIC16F877A.

Status
Not open for further replies.

Sunny55

Full Member level 3
Joined
Sep 15, 2012
Messages
159
Helped
12
Reputation
24
Reaction score
12
Trophy points
1,298
Activity points
2,404
Hi, i am planning to make a solar data logger system to record and store the solar panel's temperature and the battery's voltage.
The system will use a temperature sensor and voltage sensor connected to the PIC16f877A.

The data to be displayed on a LCD display and also saved in the IC for transfer to pc. The variables are date, time, temperature in Celcius and battery voltage(Vbattery). The recording interval is every 15 minutes.

Can anyone help/guide me with this project please ? I really have no idea on how to write the codes. I hope to write the codes using mikroC or mplab.

Thanks alot.

- - - Updated - - -

The data to be displayed on the LCD display is the temperature and battery voltage (The LCD size is 16X2 LCD).
 

I understand temperature sensor, but what is a voltage sensor? which temperature sensor are you using? Can you post the schematic? Are you going to use serial or usb communication with PC?
 

Hi, the temperature sensor i plan to use is LM35. For measuring voltage, i am still not sure about it.

For the communication, i think the IC only supports serial communication using RS232 right? I hope to use USB communication as its much simpler.

Thanks.
 

I can do the temperature sensing part and do the code for voltage monitoring and temperature monitoring? You have to do the voltage interface circuit whose output will be in the range of 0 to 5V dc. When PIC16F877A does not support USB how do say you hope to use USB communication? Can you use PIC18F2550/4550 which has USB support? You have to write the C# or VB.Net program to receive data from PIC and log it to a file.
 

Caan you mention how LM3914 can be used for voltage sensing?
 

For voltage sensing, you can use a voltage divider and sense the voltage using the PIC ADC module.
For date and time, you can use a RTC chip and interface it to PIC16F877A. You can use DS1307 and interface it to PIC16F877A using I2C protocol.
You may save the data on the PIC EEPROM or you may use an external memory for larger storage space, eg an SD/MMC card.

Here are some library files with examples for mikroC. You may find them helpful.
https://www.mikroe.com/download/eng/documents/compilers/mikroc/pro/pic/help/lcd_library.htm
https://www.mikroe.com/download/eng/documents/compilers/mikroc/pro/pic/help/i2c_library.htm
https://www.mikroe.com/download/eng/documents/compilers/mikroc/pro/pic/help/adc_library.htm

Modalities of Using the PIC16F877A ADC (part by part):
https://www.edaboard.com/blog/1569/
https://www.edaboard.com/blog/1570/
https://www.edaboard.com/blog/1571/
https://www.edaboard.com/blog/1572/
https://www.edaboard.com/blog/1573/
https://www.edaboard.com/blog/1574/

Modalities of Using the PIC16F877A ADC (Entire document):
https://tahmidmc.blogspot.com/2012/03/modalities-of-using-adc-module-of.html

DS1307 + PIC16F877A:
https://picnote.blogspot.com/2009/01/simple-clock-using-ds1307-pic16f877a.html
https://picnote.blogspot.com/2008/06/ds1307-pic16f877a.html

Hope this helps.
Tahmid.
 
Last edited:

use the adc module of pic for logginga data, from the solar panel battery etc.. they are pretty much straight forward.. and for data loggin, use simple program using ado .net.. using microsoft visual studio and the common mdb file :p if you wan i can do it for you.
 

Hi, i would like to thank everyone who gave their suggestions and opinions on this project. I have made a small change here.
The data moving process to the pc is replaced by storing it in sd card. The data also needs to be displayed on the LCD.

What is the lowest time interval that i can set for the system to auto collect data? 5 minutes?

Thanks.
 

Since you want to make a solar data logger its better to collect data every 30 mins or 60mins as your memory that you will be interfacing to the device would be restricted in terms of size so its better to reduce redundancy the data will not change significantly unless the time is like 30 mins or 60mins, if you want you can increase the samples do it at hours like in the evening and during early morning.

You can add USB interface to the microcontroller simply using FT232 chip, it is a USB to RS232(UART) bridge and you don't need to write any drivers for that, they are available at the manufacturers website.
 

I can do the temperature sensing part and do the code for voltage monitoring and temperature monitoring? You have to do the voltage interface circuit whose output will be in the range of 0 to 5V dc. When PIC16F877A does not support USB how do say you hope to use USB communication? Can you use PIC18F2550/4550 which has USB support? You have to write the C# or VB.Net program to receive data from PIC and log it to a file.

Ok. Regarding the PIC, i have made a change that is to record and store the collected data in a SD card and at the same time the voltage and temperature needs to be displayed on the LCD.

- - - Updated - - -

Since you want to make a solar data logger its better to collect data every 30 mins or 60mins as your memory that you will be interfacing to the device would be restricted in terms of size so its better to reduce redundancy the data will not change significantly unless the time is like 30 mins or 60mins, if you want you can increase the samples do it at hours like in the evening and during early morning.

You can add USB interface to the microcontroller simply using FT232 chip, it is a USB to RS232(UART) bridge and you don't need to write any drivers for that, they are available at the manufacturers website.

Hi, Thanks for the information.
 

I am doing a project based on sd card and pic. If I succeed I will post the code.
 

If USB communication is required, PIC16F877A can not be used. Unless you use UART and use a USB-to-RS232 converter.
 

Here is my datalogger complete. It used USB HID and SD datalogger.

See the video in sim2.rar. It is clear. https://www.edaboard.com/threads/271037/#post1161079

Jayanth D

Hi, how can i add on the voltage measurement feature into the circuit?

- - - Updated - - -

Hi, how can i modify the codes for use with PIC16f877A ic? For data communication, i can use UART and use a USB-to-RS232 converter as suggested by Tahmid.

Thanks.
 

Are you using mikroC Pro? If you use ADC and UART and other things for a datalogger, the code you write will not fit on PIC16F877A. The ROM and RAM is less in PIC16F877A.

And I think mikroC SD card functions only work with PIC18. I am not sure, please ask about it at mikroe forum.

Can't you use PIC18F4550?
 
Last edited:

Are you using mikroC Pro? If you use ADC and UART and other things for a datalogger, the code you write will not fit on PIC16F877A. The ROM and RAM is less in PIC16F877A.

And I think mikroC SD card functions only work with PIC18. I am not sure, please ask about it at mikroe forum.

Can't you use PIC18F4550?

Hi, Thanks for the information.
 

i need a usb solar data logger to take it the voltage and current values every 15mins. but im using PIC18 starter kit. im never use VB before. So any link for me to refer?

Thanks.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top