Solar windowsill info

2»

Comments

  • I think that I am going to put off getting another solar panel, instead I need to do some more research on a battery charger for this setup.

    I have a battery charger that I do use, but it is one of those non "smart" chargers, I am not even sure if my charger can sense when the battery is at full charge to shut itself off, or at least quit charging. I have to find something that does not compete with the solar panel, a nice scenario would be, having the charger hooked up and on, but the charger only kicks in when the battery gets to, lets say 12V. Not sure how it would be able too tell if the solar panel was providing a substantial charge, and would not turn on though.

    On the other hand, if I have both devices connected, they would keep the battery always toped off. While the "smart" battery charger would turn itself off, or not charge, at a certain point, that means that the solar panel would be wasting a lot of power, the sun keeps shinning. Also I have to consider that the only load on my setup now is the solar controller, not sure how much power it uses during the night. Also have to consider how much of a load I can put on a two battery system.

    I am trying to figure out a more automated system, now what I have to do is check the battery state, and if it is low, then turn on the battery charger, then figure out when the battery is charged, turn off the charger. There has to be a simpler way of automating this procedure. Just a few things to think about today.

    Ray
  • You definitely need to take a careful look at the specs of the available MPPT controllers available these days. The better ones should do everything you need to convert the incoming power from the solar cell to the optimum voltage and current needed to charge your battery, including turning off when the battery is fully charged.

    Another option is to build your own. There are several projects online, and the propeller is a great choice for such a project.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • Yes, I have been looking at the MPPT solar controllers, they cost a whole lot more than the PWM units, and I am still not sure about the mppt technology, and how much more it could improve the situation, for the additional cost.

    First off I want to put direct blame on erco, for me, being involved, in this solar windowsill experiment. He is the one that started that, get some RadioShack solar panels cheap, thread. :-)

    I would also like to just point out that Parallax sells a solar panel kit, in fact I was considering purchasing that kit, but in the end I decided that the assembly part was just not for me, and there are more, ready to use, products available for the 12V systems. The Parallax solar kit is rated at 34W and 9V, not sure if the cells are mono or poly. I would recommend the kit for those that want to do some soldering and general assembly. And if you are an EE, or have some good electronics background, you could probably have some fun in designing and creating your own solar panel controller board. Since this kit is a 9V system, after you are done, you could use it to power the Parallax boards, and maybe even come up with a scheme to charge up your 18650 batteries. Since Parallax is getting into the Education end of things, in a big way, I am surprised they have not come up with some thing like "What is a photo voltaic cell?" instruction type educational manual.

    Ray
  • More about MPPT.
    MPPT solar battery charging backgrounds

    MPPT performs better in conditions when it’s needed the most;

    - When the battery is discharged
    - During cloudy, dusty or smoggy days
    - During partial shading of the panels

    Conditions where solar panels perform worse:

    - When panel temperature is high
    - When solar panel is partial shaded
    - When solar panel angulation towards the sun is off
    Not sure who to believe, the snippet above was taken from an article that states, up to a 30% improvement with mppt. Another article I read, Wikipedia, states up to a 20%% improvement with mppt. It seems like this is something relatively new, and there just might be a lot of anecdotal coverage, using charts and interpretations.

    Getting away from theory and making a real application, how would somebody determine a 20%-30% improvement? This mornings conditions, heavy overcast with drizzle, the reading at the solar panel - 8.66V, battery reading - 12.54V, only load is from the PWM unit, and possibly the three DC-DC regulators that I have attached . So, I change out my PWM unit for an MPPT unit, what is my improved solar panel usage rate?

    I guess the next test I will be doing is, using the battery charger today, charge up the battery. My theory is, since the solar panel is putting out 8.66V, the battery charger should be putting out the difference to get it up to a 13.7V condition to charge the battery. And hopefully when the battery gets up to a fully charged condition, the battery charger quits charging and the PWM unit starts to get warm.

    Tomorrow is supposed to be better conditions, cloudy in the morning and then partly sunny in the afternoon. I think maybe tomorrow morning I will turn off turn off the battery charger and attach my Raspberry Pi 3, for some load on the system. Then do some periodic battery checks to see what the battery state is. I am also wondering how I could check to see what to actual power usage is of the battery charger, when the unit is turned on. I guess that would give me a good indication as to what the battery charger is doing when it is attached. So many experiments, maybe this thread could be my notebook, for later usage.

    Ray
  • Sounds like you need two INA219'S (https://www.parallax.com/product/29130), one TSL237 (https://www.parallax.com/product/604-00085), and a propeller board with an sd card so you can monitor and log current and voltage from the solar panel to the battery, from the battery to the load, and the light falling on the solar panel.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • jmgjmg Posts: 13,108
    edited 2016-05-02 - 20:38:17
    Rsadeika wrote: »
    Not sure who to believe, the snippet above was taken from an article that states, up to a 30% improvement with mppt. Another article I read, Wikipedia, states up to a 20%% improvement with mppt. It seems like this is something relatively new, and there just might be a lot of anecdotal coverage, using charts and interpretations.

    Getting away from theory and making a real application, how would somebody determine a 20%-30% improvement? This mornings conditions, heavy overcast with drizzle, the reading at the solar panel - 8.66V, battery reading - 12.54V, only load is from the PWM unit, and possibly the three DC-DC regulators that I have attached . So, I change out my PWM unit for an MPPT unit, what is my improved solar panel usage rate?

    To make real measurements, you need two units, running side by side, or a MPPT unit smart enough to flip modes to calibrate - but of course, while it flips modes, it wastes energy, so such units are not likely to be outside labs.
    That makes % gains at best a guess - the simplest gain calc is from direct voltage loss,
    - measure the battery Voltage at some charge current, then measure the panel not directly clamped by the battery, but with some non zero (ideally MPPT tuned) load.

    If the MPPT unit is smart enough to be buck-boost, then it could extract power from solar output voltages lower than the battery reading, (as you report above) but I think not many do that.

    The key element to energy savings is the inductor, and you should be able to find some modules that you can modify to set/control ?

    Maybe this from ebay ? (includes a 3 digit Voltmeter)
    401111550357?hash=item5d641c8995:g:6d4AAOSwpdpVcZfo

    eBay Search for
    DC-DC Adjustable Step-down Power Supply Module Voltage Current Dual LCD Display
    gives nice units with volts and current on LCD, but says 2A, 3A max

    or this search finds some already done units, with dual displays included.

    MPPT Solar Panel Controller 5A DC-DC Step-down CC/CV Charging Module LED Display

  • Rsadeika,
    I have built several MPPT controllers for pumps coupled directly to solar panels using the Prop.
    Although the pump load is very direct and responsive, I guess a battery charger is not too different. In the case of a pump you use PWM directly through a Mosfet module to control the pump motor.
    For current and voltage measurement I have used the INA219 measurement board.
    To find and maintain the MPPT you need the following program outline;

    1_Low_voltage. Start up - to initialize the program at dawn and after brown-out. Measure the panel voltage every minute or so. Hold until panel voltage is high enough to enter the main program loop. Before entering the main program loop, set an initial 50% PWM and measure panel voltage, current and calculate power.

    2_Main program loop - loop endlessly until low voltage shut down.

    2.1_Get_MPPT. Loop until power is maximum (MPPT). This is done through purturbing and observing the power change due to changing load. a) Increase the PWM and measure panel power change. Case 1- If power increases with PWM continue increasing PWM in steps until power starts to decrease. Case 2 - if power decreases due to increasing PWM, decrease the PWM in continuing steps so that power increases to maximum. (Note; the panel power curve is quite sharp and it is quite easy to pick the maximum power point).

    2.2_Hold_MPPT. Measure the voltage, current and measure power every minute or so. Hold the PWM at the MPPT value until the power changes by a preset amount. This could be due increase of cloud cover or removal of cloud cover.

    2.3_If power or voltage is low do 1_Low voltage start up until voltage is enough to re-enter the MPPT endless loop. At dusk the system will just loop in the low voltage module until low voltage shut down. When the voltage comes back at dawn it will restart as 1 above.

    Before you jump into programming, get a feel for the response of panel to the changing battery charger load and practice finding the MPPT manually. Once you have an understanding of these aspects the programming becomes easier.

    Good luck! It is fun squeezing maximum power out of solar panels!

  • WOW, between kwinn, jmg, and macrobeak, with the information that they have provided, I am not sure which direction to go in. Thanks guys.

    Yesterday was a very interesting solar power day. Between the drizzle in the morning, and being overcast with haze, all day, and no direct sun coming out, after about 10:00AM, the solar panel was putting out between 13.30V and 13.60V. I also had a chance to attach my voltmeter to the battery charger to see what it was doing. My voltmeter has an amp gauge setting, for the time that it worked it was showing 0.3amps, so I guess the solar panel was doing most of the work to get the battery charged up to 12.81V at the end of the solar charge day.

    The battery charger was turned off at the end of the day, this mornings battery reading was 12.70V, so I guess the solar controller is putting a very slight? load on the battery during the night. As soon as I figure out some better test equipment, I really want to see what exactly the battery charger is doing when it is on, working along with the solar panel, and what it would be doing at night, without an active solar panel.

    Today I will probably leave the battery charger off, apply some kind of load, maybe the Raspberry Pi 3, and see how the battery system holds up. Today there should be some indirect sun on the solar panel, the solar panel readings should be interesting. One thing to keep in mind, this is early spring and most of the trees in the back yard around the house to not have any leaves just yet.

    The reason I chose the windowsill experiment is, a low cost way of figuring out how well the solar panel can perform when you are not living around the equator in a desert environment. So far I have have kept the cost, of this experiment, way under $500, but I still have to figure out if that cost gets reimbursed via charging of appropriate equipment and maybe running some low power equipment.

    Ray

  • RE: WOW, between kwinn, jmg, and macrobeak, with the information that they have provided, I am not sure which direction to go in.

    With the parts I was suggesting you needed to monitor the panel I was pointing you one step in the same direction macrobeak suggested going.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • Tracy AllenTracy Allen Posts: 6,311
    edited 2016-05-03 - 18:39:49
    I'll add another instance to the possible confusion. There is also MPPC, Maximum Power Point Control. That is the control strategy of solar battery charger chips like the LTC3652. (I use that in my own systems.)

    In contrast to MPPT (T=tracking), it does not attempt to track the maximum power point. It is pre-set at a typical maximum power point for the solar panel specs, and it subsequently prevents the output from collapsing below that point. This works pretty well even compared with MPPT, because the MPP for a solar panel does not vary all that much from low to high sunlight conditions. For useful amounts of solar power the MPP may vary from 16 to 18 volts, and picking a MPPC point of 17 volts will usually be pretty efficient. 100mA solar input at 17 volts becomes around 200mA at 8V into an 2-cell Lithium Ion. The charger doesn't produce anything at all until the sunlight reaches a level that pushes the panel up to the MPP, and then it regulates the input loop to draw only enough current to keep it there.

    @Rsadeika, if your solar panel is reading 300mA at 13.6V in sunlight, that is 4.1W. If it were MPPC or MPPT instead of simple PWM, the solar panel would deliver say 290mA at 17V, or 4.9W, then convert that optimally 100% efficiency to 360mA into the load at 13.6V. However, it won't be 100% efficient. Let's say it is 85% efficient, which would be considered good. Then it delivers 306mA to the battery, which is hardly better than your plain PWM charger. My point is that the expense of MPPT/C may not gain you much in charging a 12V SLA battery from a 12V nominal panel. The strategy is more effective when the difference between solar panel input and voltage output is greater.

    As to the discharge you observe during the night, check to be sure that your charger has reverse protection that prevents current from the battery from leaking back into the solar panel. Most do. The charger itself should not draw much current at night. For example, I have a Morningstar SG-4 that draws a quiescent current of 6mA, which needs to be supplied by the battery even when the sun is not shining. I don't consider that very good. Why does it need so much? My LTC3652 circuits drop back to below 50µA even with out commanding them into shutdown mode.


  • jmgjmg Posts: 13,108
    I'll add another instance to the possible confusion. There is also MPPC, Maximum Power Point Control. That is the control strategy of solar battery charger chips like the LTC3652. (I use that in my own systems.)

    In contrast to MPPT (T=tracking), it does not attempt to track the maximum power point. It is pre-set at a typical maximum power point for the solar panel specs, and it subsequently prevents the output from collapsing below that point. This works pretty well even compared with MPPT, because the MPP for a solar panel does not vary all that much from low to high sunlight conditions.

    The LT3652 has an interesting graph, that claims mostly sweet spot, but looking more closely, shows they have cut one axis at 10% of peak current and ignored temperature.
    That may be ok for Solar cells inside, but it's what I'd call 'optimistic' for outdoor cells.

    A good Peak point plot is on this page
    http://batteryuniversity.com/learn/article/charging_with_solar_and_turbine

    and a good thermal plot is
    FIGURE 5: Solar cell I-V characteristics temperature dependency
    http://www.pvresources.com/en/solarcells/solarcells.php

    That shows that MPPC (non tracking, fixed point) may be ok, but really you should know the Panel Temperature and Panel irradiation values so that you at least get the zone right.

    I would agree that for a correct Temperature and irradiation, there is not much between a (correctly) set=point, and a tracking one.
  • Not sure how many people are following this thread, that do not have a solar system setup, and are just reading this just to kill time. My interpretation of some things that I have observed.

    On occasion I post some numbers like solar panel V and battery V, these numbers taken in a general context probably do not give to much insight. For instance, my solar panel, rated at 50W, when I first received it, I did some measurements, as a stand alone unit. This was quite interesting, my impression was, that when it was getting some light it would be outputting a steady output rate. Well, that is not a correct assumption, the voltage rate, as measured with a volt meter, is all over the place. Even when the sun looks like it is directly shinning on it, you may have fluctuations between 16V and maybe 18V. When it is dealing with a partly cloudy day, it gets even more interesting, fluctuations, in a fraction of a second, could drop as low as 12V, or less. In other words your solar panel is putting out a very fluctuating pattern.

    When I had my mini RadioShack solar panel setup, I had the solar panel system output connected directly to some rechargeable batteries. First I did a measurement of what the panel system was putting out, in this case, I think the panel rating was 9V, it was showing maybe 11V. Now, the key point, when I attached the batteries to the system, if the panel output was 11V, with the batteries attached the panel measurement was now down to maybe 9V, depending on the battery charge state. Now how do you make any sense out of that, or even try to do some meaningful data capture?

    I am sort of glad I am not doing a scientific study paper on this, I would be at a complete loss as to how to even get some meaningful readings let alone a good meaningful explanation of the data. Maybe I should put on my scientist hat, and start reporting unbiased findings.

    Ray
  • @jmg, App notes for the LT3652 show how to add solar panel temperature tracking by means of an LM334 current source temperature sensor. http://www.linear.com/product/LT3652
    By the way, Linear Tech has fiddled with their terminology:
    http://www.linear.com/solutions/4545 (2016)
    "Note that the LT3652 and LT3652HV data sheet refer to MPPT rather than MPPC, but this is largely because Linear Technology had not come up with the MPPC terminology when the LT3652 product was released."

    My own '3652 charger design allows for digital control to a couple of fixed settings for the control point. In the morning it can start at a lower control point to catch lower levels of sunlight. On a typical day with good orientation of the panel, it does not make a lot of difference, but it does help on overcast days. The watchword is "good enough", to keep the battery charged, a statistical dance with the weather.


  • Tracy AllenTracy Allen Posts: 6,311
    edited 2016-05-04 - 16:47:53
    Rsadeika,
    Does your solar panel have a rating plate attached to it or do you have any data from where you obtained it? A nominal 12V panel will typically have an open circuit voltage of around 21 or 22 volts, even with very little sunlight shining on it. And its short circuit current in full sun would be around 3 amps. Shadows across a panel can have a profound effect, especially on the current, depending on how the shadows fall across the cells. Think of the weak link in a chain that determines its strength. Also indirect sunlight is generally far less power than full direct beam.

    I'm puzzled about your reading of 16 or 18 volts in full sun. For a fair test of fluctuations you need to lean the panel facing the sun in the open on a clear day, and stand back to make your measurements. In those conditions both the voltage and the current should be quite stable over a time scales of seconds up to 10s of minutes.
  • Rsadeika wrote: »
    Not sure how many people are following this thread, that do not have a solar system setup, and are just reading this just to kill time. My interpretation of some things that I have observed.

    On occasion I post some numbers like solar panel V and battery V, these numbers taken in a general context probably do not give to much insight. For instance, my solar panel, rated at 50W, when I first received it, I did some measurements, as a stand alone unit. This was quite interesting, my impression was, that when it was getting some light it would be outputting a steady output rate. Well, that is not a correct assumption, the voltage rate, as measured with a volt meter, is all over the place. Even when the sun looks like it is directly shinning on it, you may have fluctuations between 16V and maybe 18V. When it is dealing with a partly cloudy day, it gets even more interesting, fluctuations, in a fraction of a second, could drop as low as 12V, or less. In other words your solar panel is putting out a very fluctuating pattern.

    When I had my mini RadioShack solar panel setup, I had the solar panel system output connected directly to some rechargeable batteries. First I did a measurement of what the panel system was putting out, in this case, I think the panel rating was 9V, it was showing maybe 11V. Now, the key point, when I attached the batteries to the system, if the panel output was 11V, with the batteries attached the panel measurement was now down to maybe 9V, depending on the battery charge state. Now how do you make any sense out of that, or even try to do some meaningful data capture?

    I am sort of glad I am not doing a scientific study paper on this, I would be at a complete loss as to how to even get some meaningful readings let alone a good meaningful explanation of the data. Maybe I should put on my scientist hat, and start reporting unbiased findings.

    Ray

    Since so many variables (insolation, temperature, power draw, etc) affect the voltage and current output of a solar cell documenting it's characteristics is not as simple as producing a single curve. At a minimum it would take a family of curves, and even that would require holding some of the variables at fixed settings. The most useful curve I have seen is the max power output vs the level of sunlight falling on the panel.
    In science there is no authority. There is only experiment.
    Life is unpredictable. Eat dessert first.
  • Renogy 50W 12V Monocrystalline Solar Panel

    Output Cables: 4.0 mm2 (0.006 in2), 600mm (23.6 in) Connectors: MC4 Connectors

    Maximum Power: 50W Maximum System Voltage: 600V DC (UL)

    Optimum Operating Voltage (Vmp): 18.5V Open-Circuit Voltage (Voc): 22.7V

    Optimum Operating Current (Imp): 2.7A Short-Circuit Current (Isc): 2.84A

    Dimensions: 24.8 X 21.3 X 1.2 In Weight: 9.9lbs
    My experiment is a windowsill placement, that means it is inside the house, and I have it tilted back, maybe about 35%(from vertical) . This was about the best placement that I could come up with. I am quite pleased with the panel, it is working better than I thought.

    Ray
  • dMajodMajo Posts: 733
    edited 2016-05-08 - 23:08:58
    Rsadeika wrote: »
    Not sure how many people are following this thread, that do not have a solar system setup, and are just reading this just to kill time. My interpretation of some things that I have observed........

    I am following the thread because I am doing the same right now.
    First some links I have followed:
    Some theory http://www.pvresources.com/en/solarcells/solarcells.php
    Basic measures http://www.mtmscientific.com/solarpanel.html
    About shadowing http://www.wholesalesolar.com/solar-information/solar-panel-efficiency
    Tilting http://www.solarpaneltilt.com/
    Tilting http://solarelectricityhandbook.com/solar-angle-calculator.html

    Until a couple of years ago I had a solar panel setup for 25 years. It was made from film (bendable) mono panels (2x 50W + 35W) charging a battery through a diode, simple. This is for off grid living in my hollyday place/garden. When living there the two 50W panels was turned on manually with a switch. The 35W was always on for battery maintenance.
    Now after a couple of years of black-out I am redoing the system again, but improved.
    Reading around I have chosen poly panels this time. The poly are slightly less (peek power) efficient because do not have all the crystals oriented in the same direction. But if you are not tracking the sun during the day it seems the poly are better because what makes them less efficient for the peek power (if always oriented to the sun), crystals in all directions, helps obtaining a greater average during the day when used in fixed position.


    MPPT:
    - the panel have an I-V curve where the MPP is on the knee
    - the MPP voltage is quietly greater than the battery voltage
    - the increasing temperature and shadowing moves MPP diagonally toward graph's origin
    - if the panel is attached directly to the battery the voltage settles down to battery one
    - in shadowing conditions the panel voltage can be lower than the battery voltage
    - we need at least 3 charging control modes.

    Now with the above assumptions a good MPPT should have a boost and buck dc-dc converter and a good algorithm to measure and track what the MPP is and adjust its pwm on various mosfets.
    If you consider boost/buck modes most probably in high power execution you have 4 mosfets: 2 before the inductance and 2 after. Mosfets are used in place of rectifying schotky diodes because can be paralleled easily because of their PTC (diodes are NTC) and have also lower conducting loses.
    Now you can understand why a MPPT, if good, is so more expensive than a traditional PWM charger/regulator.

    That said, for my setup I have chosen what I consider easier to do by myself. So:
    - 2x 260W poly panels 24V (Voc 37/38) this way even with some shadowing or not best exposition the Vout will be greater than Vbat
    - 2x 210Ah 12V AGM deep-cycle batteries (parallel)
    - bought sinewave inverter to temporary power 220Vac devices if needed. All the utilities (lights tv, water pump ...) are 12Vdc.
    - and finally, the core: self built triple input (one for each panel plus one planned for future 400/500W wind generator) dual stage (phase angle 180°) buck dc-dc converter with MPPT. And while doing it myself, some more output/load control channels to control differently the loads depending on battery capacity.
    Propeller Object Exchange (last Publications / Updates) --- Oldbitcollector's guest map
    JustForMe
  • dMajo/Rsadeika,
    You may want to have a look at this Instructable for a MPPT battery charger.
    It is one of the best MPPT summaries I have seen, and it explains the basic concepts very well;
    http://www.instructables.com/id/ARDUINO-SOLAR-CHARGE-CONTROLLER-Version-30/step2/Basics-on-MPPT-charge-controller/
  • It's coming up on two years since I have been running my solar windowsill setup. Some updates and thoughts.

    I now have four connectors, three 5V USB sockets, and one 9V barrel plug. The USB sockets are used for charging up devices like my cell phone, NOOK, power pack, ..., etc. The barrel plug is for some devices that I want too run for some different kinds of boards or what not. But overall this is being used as a charging station, which works very well.

    I also have a battery charger hooked up and I make a visual decision as to when it should be turned on. If it has been cloudy for a few days, then it definitely needs to be turned on. I think I can probably leave the charger on all the time, because I noticed that the solar controller shuts down charging the battery, and so does the battery charger, when the battery is fully charged.

    The greatest deficiency in the system is the battery storage. Besides being very expensive, it still lacks in the charging area. It takes quite a long time to recharge the battery, which means you are not using the full potential of the available sun hours. Also the solar controllers could be more efficient, in my system it only starts working when there is 12V coming in, that means you cannot have 1.5V, or 3.7V or 9V batteries attached to be charged. And when it hits the 12V mark the you need voltage regulators to reduce the voltage to charge some of the low voltage batteries. Hopefully their will be a breakthrough in the battery science.

    For the past couple of months I have had a Raspberry Pi with a Sense HAT attached as a constant power draw for the solar windowsill setup, now I am thinking about attaching some other devices. I think I will have to attach my C3, but what I really need is board that has a WiFi so I could program it remotely.

    I guess I am not done with this project yet.

    Ray
  • Last week I had my solar panel controller unit go on the blink, now I am taking the opportunity to re-work/re-design the solar project system.

    I got a new Renogy PWM duo controller, still have just the one 50W solar panel, and the two 12V 35AH battery parallel array. I have added a couple of plug-and-play voltage dividers plus an AB WX+WX WiFi, to the system. I will be adding a new battery charger, a 4 channel relay unit, and a couple of female USB break out boards.

    I have to say, working with the AB WX+WX WiFi makes life a lot simpler. Now I can sit by my desktop computer and program the AB WX+WX Wifi, which is at the other end of the house, where the solar stuff is located.

    The AB WX+WX WiFi will be the brains for the system, so far I just have a program that is capturing the voltage data from the solar panel and batteries. It will also be the control for the relay unit, to determine when too turn on/off the battery charger.

    Also starting to do the html program which will hopefully display the pertinent information in a browser format. Lots to do, I hope it all comes together like I am hoping.

    Ray
  • Below I have source code for a working application for my solar station. This is just a starting point from which I will expand the source code.

    I now have the AB WX+WX WiFi gathering real time data for the solar panel and the battery array (2x12V@35AH in parallel). I also have a battery charger/tender connected to the battery, so I can manually turn it on when the array needs to toped off. I also looking into how I can automate this process, using the battery charger. The system is on 24/7, during the daylight hours I use the solar charger, and at night I use the battery charger. I also added my Raspberry Pi, to see what kind of power demands are necessary for that too run.

    The browser/httml.
    It is a very simple application it has two button like objects that you press/touch to show the solar panel and battery array voltage levels.

    I started out using a couple of radio buttons in the html, but when I displayed the browser program on my NOOK HD+ tablet, the radio buttons were way to small to work with if you are using a finger or a blunt tip stylus, on the touch screen.

    The next step is to see how I can implement the 4 channel relay device, so I can have the PropGCC program figure out when to turn on/off the battery charger unit.

    Ray

    /*
      wifi_solar.c
      
      Feb 25, 2017
      WiFi Solar Station
      
    */
    #include "simpletools.h"
    #include "wifi.h"
    #include "adcDCpropab.h"
    
    #define reboot() __builtin_propeller_clkset(0x80)
    
    volatile float vx,vy;
    
    int event, id, handle;
    int solarId,batteryId;
    
    void pwrmon();
    
    
    int main()
    {
      // Add startup code here.
      cog_run(pwrmon,128);
      pause(50);
      wifi_start(31, 30, 115200, WX_ALL_COM);
      solarId = wifi_listen(HTTP, "/solar");
      batteryId = wifi_listen(HTTP, "/battery");
       
      while(1)
      {
        // Add main loop code here.
        wifi_poll(&event, &id, &handle);
        if(event == 'P')
        {
        }
        else if(event == 'G')
        {
          if(id == solarId)
          {
            wifi_print(GET, handle, "%.2f\r", vx);
          }
          if(id == batteryId)
          {
            wifi_print(GET, handle, "%.2f\r", vy);  // Send to html
          }                
        }
        print("%cSolar panel: %.2f",HOME,vx);     // Show on local terminal          
        pause(50);
        print("  Batteries: %.2f%c\n",vy,CLREOL); // Show on local terminal
      }  
    }
    
    void pwrmon()
    {
      adc_init(21, 20, 19, 18);
      float v0,v1;
      while(1)
      {
        v0 = adc_volts(0);   // Solar panel
        pause(100);
        vx = (v0*4.9295);
        //vx = v0;
        //print("%cSolar panel: %.2f",HOME,vx);
        pause(50);
        v1 = adc_volts(1);   // Battery array
        pause(100);
        vy = (v1*4.7869);
        //vy = v1;
        //print("  Batteries: %.2f%c\n",vy,CLREOL);
        //pause(1000);
      }      
    }  
    
    <!-- wifisolar.html -->
    <!DOCTYPE HTML>
    <html>
    	<head>
    		<style>
    			a{
    				background-color:#637aad;
    				color:white;
    				font-size:23px;
    				margin:5px;
    				width:100px;
    				height:55px;
    				cursor:pointer;
    				padding-top:4px;
    				padding-bottom:4px
    			}
    			a:hover{backgrond-color:white;color:navy;}
    		</style>
    	</head>
    	<body bgcolor=3b5898>
    		<div align="center">
    			<font face="Arial" size=6 color="red">
    			Solar Station Report
    			</font>
    		</div>
    	<br>
    	<font face="Arial" size= 2 color="cyan">
    	Voltage for Solar Panel
    	<br>
    	 or Battery Array
    	</font>
    	<br>
    	<br>
    	<!--<input type="radio" name="choices" onclick="getFromMcuS();"> Solar -->
    	<!--<input type="radio" name="choices" onclick="getFromMcuB();"> Battery -->
    	<div>
    	<a onclick="getFromMcuS();">Solar</a>
    	<a onclick="getFromMcuB();">Battery</a>
    	</div>
    	<p id="value">Value</p>
    	</body>
    	
    	<script>
    	function useMcuReply(response)
    	{
    		var val = document.getElementById("value");
    		val.innerHTML = "Value: " + response + " V";
    	}
    	function getFromMcuS()
    	{
    		httpGet("/solar", useMcuReply);
    	}
    	function getFromMcuB()
    	{
    		httpGet("/battery", useMcuReply);
    	}
    	function httpGet(path, callback)
        {
    		var req = new XMLHttpRequest();
            req.open("GET", path, true); 
            req.onreadystatechange = function() 
            { 
              if (req.readyState == 4)
                if(req.status == 200)
                  callback(req.responseText);
                else
                  callback("Waiting...");
            }
            req.send(null);
          }
    
    	</script>
    </html>
    
  • I thought I would update this thread somewhat, since the panels are no longer on the window sill.

    I upgraded the experiment quite a bit, I now have two solar panel arrays outside. Each array is made up of two 100 watt and one 50 watt panels. I have one mppt controller for each array, and I have two batteries, one car battery, and one 100Ah deep cycle battery. I also added a Deltran Battery Tender for each battery, which is working almost as well as I thought it would work.

    The Activity Board and Parallax WiFi module have been working fairly well, I only use fairly because I have been having some problems lately. I did add a cm2302 module to the mix, which is out side getting the temp/humidity data. I also added a Dell T130 box to work as a Linux gui server, although it has xubuntu installed. Now, the Activity Board is streaming the data to the Linux box which is supplying the SQLite database that I have setup. Working the database is a whole new activity for me, that sql query stuff is not as easy as I thought it would be to use.

    Since I have the Activity Board running off the battery source, I am now considering adding an inverter so I could plug the Dell server in, and a couple of other units that I have in the vicinity. I have been adding the data logs to the database, so I am getting a decent view of what is occurring when the sun is available and when it is not. I also had a Kill A Watt module laying around, so I plugged one of the Deltran Battery Tender in that just to see how much energy was being used by Tender to keep the battery in line. I wish the Deltran Battery Tender had some way of being accessed so I could data log the usage and add that info to the database.

    Wow, now that I have written this out, it looks very complex to me.

    Ray
Sign In or Register to comment.