Solar data logger system using PIC16F877A help.

Discussion in 'Embedded Systems and Microcontrollers' started by Wind23, Oct 24, 2012.

  1. Wind23

    Thread Starter New Member

    Sep 26, 2012
    22
    1
    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.

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

    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.
     
    kodomolcub likes this.
  2. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    How fast do you need this? I'm working on something similar for a remote solar power system. I'm collecting different data (presently current from charger, current to loads, PV voltage, Battery Voltage) and storing this on an SD card. Adapting to your needs should be simple (with the devil in the details as always).

    The project is in a very early stage, even which PIC I am using is up for grabs, but something in a PIC18 40 pin DIP is my target, using the (free) C18 compiler.

    If you can wait me out this should appear one day in the completed projects area.
     
  3. Wind23

    Thread Starter New Member

    Sep 26, 2012
    22
    1
    Hi ErnieM, i am glad that you can provide me with the solution to my project. Is the project near completion? I can wait.
     
  4. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    The project is in the very early stages of development. I'm still selecting a PIC for it, and it looks like the one I want is just reaching the production stage (backordered till mid Nov everywhere).

    So if you can't wait several months you best start your own.
     
  5. nsaspook

    AAC Fanatic!

    Aug 27, 2009
    2,912
    2,176
    I have a solar monitor project also, it's maybe a little more that what you're looking for but it might help to understand the requirements for full solar energy management system.

    https://github.com/nsaspook/mbmc
     
  6. Wind23

    Thread Starter New Member

    Sep 26, 2012
    22
    1
    Hi ErnieM, may i know hows the progress of your project so far? I am using PIC16F877A for my project.
     
  7. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    Progressing... very slowly. I'm looking to package up a small PCB for the push button interface shortly. As far as the main board goes that has been stalled due to some huge time constraints over and above a hurricane and a nor'easter wrecking havoc here.

    Additionally I have come to realize anything I build will not be what the NEC calls a "listed" device, and thus is not compliant to the electrical code, and compliance is one of my firm goals. So I may end up abandoning this project altogether, as much as I would like to do it.

    I am looking at a PIC18 device to support USB, not a PIC16 device. Thus you probably want to just proceed with your own project to suit your own goals.
     
  8. geoffers

    Active Member

    Oct 25, 2010
    239
    6
    Just happened on this one,looks interesting, one thing I thought, you might want to look at exteranal memory, I'm not a expert but you soon fill up internal eeprom! When your planning your circuit make sure you leave the I2C pins spare incase you want to put a external eeprom on the I2C bus.
    Good luck Geoff
     
  9. Flare_Guy

    New Member

    Nov 18, 2012
    13
    1
    Microchip is offering a RTCC that can be used to matain date and time. Have a look at the MCP795W21. It also has 2K of eeprom and a 48 bit MAC address it you add ethernet or bluetooth
     
  10. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    I left the SPI interface free from the digital I/O area so I can drive an SD card with them. As I haven't seen a SD with less then 2GB of memory lately so that's what I'll be stuck with for logging. It should handle several years of data. The PIC will connect that to the USB, together it will look like a memory stick (SD card reader) so any passing laptop can extract the archival data.

    The I2C will be dedicated to serving an NEC PCF2129A for the real time clock. The best part of this chip is the crystal is internal and the oscillator is temperature corrected.

    One new thing for me is using an external (to the PIC) A2D: the MCP3424 is a 4 channel device with an 18 bit (!) converter. I need 4 points to be accurately monitored: PV voltage, battery voltages, battery charge current and battery load current (2 separate sensors).

    It is a lot to breadboard and test before I'd spin the PCB.
     
  11. Flare_Guy

    New Member

    Nov 18, 2012
    13
    1
    With regard to the NEC concern, what voltage will your device being working with?
     
  12. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    It is a nominal 12 volt system so the max is around 20 from the PV panels and 15 on the battery bank.

    690 applies there too.
     
  13. kodomolcub

    New Member

    Dec 9, 2015
    5
    0

    Sir, have you completed your project? I'm also doing this project and need some guides. I've done lots of researches but just able to grab small info.. Thanks Sir.
     
  14. shteii01

    AAC Fanatic!

    Feb 19, 2010
    3,395
    497
    Arduino is easier.
     
    kodomolcub likes this.
  15. BR-549

    Well-Known Member

    Sep 22, 2013
    2,004
    394
    I have seen several aspects of nsaspook's system. If you want to save a lot of time and learn some new things, you should study his system.

    He uses the solar panel as a solar detector. I'll bet he could give you I/Q signals from it.
     
    kodomolcub likes this.
  16. kodomolcub

    New Member

    Dec 9, 2015
    5
    0
    HAHA knew that already. But my supervisor asked me to do this project *cries. The analogue value from Solar Panel to be sent to PIC16F877A, which later the value will be send to PC via USB-UART (since this is the easiest way compared to RS-232). Then the PC will show the data using Hyper Terminal. I'm using MicroC or MicroB for the coding.

    The problem is, I don't see this project can be done or not *cries even more*
     
  17. kodomolcub

    New Member

    Dec 9, 2015
    5
    0
    Aite, will try that Sir :D Thank you
     
  18. ErnieM

    AAC Fanatic!

    Apr 24, 2011
    7,394
    1,606
    Actually that project died, as sometimes happens with ambitious hobby projects. I will have near zero time to gather whatever notes I made till the end of the month/year.

    I do have time to make off the top of my head suggestions. What all will your system be doing? Is it just monitoring the solar panel voltage and transmitting to a PC? That is a very simple task, just a divider to scale the panel voltage to a range the PIC can accept, a reference voltage chip, and an RS232 level translator.

    Where are you stuck?
     
  19. kodomolcub

    New Member

    Dec 9, 2015
    5
    0
    HAHA its okay, I'm going to make it through though :D

    Yup Sir, just to display the solar panel voltage and transmitting to a PC. I'm stuck at MicroC coding. I'm confused with LM35. Because it needs ADC code to do the conversion. Does this applies same to Solar Panel? I will post my code later since it's not yet very constructive :D
     
  20. kodomolcub

    New Member

    Dec 9, 2015
    5
    0
    Have you completed your project? Cause I want to ask some questions
     
Loading...