author
7Instructables42,466Views256CommentsAustraliaJoined June 3rd, 2015
I am a retired professional engineer, now farmer. Taking an interest in all things technological and in building devices useful on the farm.

Achievements

100+ Comments Earned a bronze medal
10K+ Views Earned a bronze medal
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hello Warrior18, There are several possible explanation for wrong voltage readings. It is important for the correct functioning of the controller to have accurate readings. The key point in your question is the "at times". That is, how far off and does the error vary?The usual problem is having resistors in the voltage dividers that are different from the specified values. It may just be the normal variation in value that occurs from manufacturing tolerances. This variation can be compensated by a small change in the software to calibrate the voltage readings using your multimeter as a reference. The calibration settings are in the function "void read_data(void)" where you will see the nominal resistor values 20 and 120 (which is 100 plus 20). By modifying one or bo...

    see more »

    Hello Warrior18, There are several possible explanation for wrong voltage readings. It is important for the correct functioning of the controller to have accurate readings. The key point in your question is the "at times". That is, how far off and does the error vary?The usual problem is having resistors in the voltage dividers that are different from the specified values. It may just be the normal variation in value that occurs from manufacturing tolerances. This variation can be compensated by a small change in the software to calibrate the voltage readings using your multimeter as a reference. The calibration settings are in the function "void read_data(void)" where you will see the nominal resistor values 20 and 120 (which is 100 plus 20). By modifying one or both of these numbers you should be able to get your Arduino readings to line up with your multimeter readings. Keith

    Hello ShyamS102, The display connection is not shown on the circuit diagram, which is provided by a link at the end of Step 2. The display has 4 wires: Ground and 5V (for power) and two data connections SCL and SDA. SCL connects to the Arduino pin A5 and SDA connects to Arduino pin A4. If you can't work it out, please send another question. Keith

    Hello Qasiml3, There is a link to the circuit diagram at the end of Step 2. Keith

    View Instructable »
  • Solar Powered WiFi Weather Station V2.0

    Hi Spence / CodfishCatfish, Thanks for the reply. At the end of Step 1 in the Instructable for the BMP280 library (https://www.instructables.com/id/Library-for-BMP28... there is a link to a little diagnostic program that can tell you whether your device is BMP280 (without humidity) or BME280 (with humidity) and also the information to tell the difference by visual inspection of the device itself (microscope recommended). I do not think the markings on the circuit board are likely to be reliable, and often there is no marking anyway. The devices (BMP280 and BME280) are physically identical and use the same I2C addresses. However they have different device codes in their registers, which is what the diagnostic program reads and then prints to the serial monitor the result. Keith

    View Instructable »
  • Solar Powered WiFi Weather Station V2.0

    Hi CodfishCatfish, If you are using the BMP280 library that is used with the published software for this project, you should not have such trouble with using a BMP280 instead of a BME280. This library is capable of working with both devices, merely not giving humidity readings if you are using a BMP280. This is different from other libraries for this device. If you want to learn more about the library and its capabilities, I suggest you have a look at https://www.instructables.com/id/Library-for-BMP28...Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi RyuKim, Did you count the cells in your solar panel?Regarding the bad voltage measurements, it is likely to be that the resistors you have used for the voltage dividers used in the measurements are a bit off. You can check the dividers with your multimeter. On the battery side, measure the voltage of the battery, and also at pin A1 on the Arduino. The ratio should be 20/120.You can do the same thing on the panel side, panel voltage and pin A0 on the Arduino. Again the ratio should be 20/120. So for example if your battery voltage is 13V, A1 should be 2.167 V. The calibration of these can be adjusted in the software, in the read_data function. You will see the (120/20) in the code, you can alter them to the ratio that you get from your actual readings. If you are not sure what is happ...

    see more »

    Hi RyuKim, Did you count the cells in your solar panel?Regarding the bad voltage measurements, it is likely to be that the resistors you have used for the voltage dividers used in the measurements are a bit off. You can check the dividers with your multimeter. On the battery side, measure the voltage of the battery, and also at pin A1 on the Arduino. The ratio should be 20/120.You can do the same thing on the panel side, panel voltage and pin A0 on the Arduino. Again the ratio should be 20/120. So for example if your battery voltage is 13V, A1 should be 2.167 V. The calibration of these can be adjusted in the software, in the read_data function. You will see the (120/20) in the code, you can alter them to the ratio that you get from your actual readings. If you are not sure what is happening, please send me your readings and I will try to help you figure it out.Keith

    View Instructable »
  • Solar Powered WiFi Weather Station V2.0

    Hi palbeda, I think you can get all this info from the Blynk web site, but the basics are that when you first register with Blynk as a developer they provide you with a fixed allowance of "energy" for use on their server. If you install your own local server, you get a much larger allowance for use there. Then when you design your dashboard (or dashboards), you do it in design mode by pressing the "+" button near the top of the screen, which then shows you a list of possible "widgets" each of which has its price associated with it. As you add widgets to your dashboard, the energy cost of each is subtracted from your allowance. If you delete a widget, you get a refund of exactly the same amount as you "paid" when you first used it, which means you ...

    see more »

    Hi palbeda, I think you can get all this info from the Blynk web site, but the basics are that when you first register with Blynk as a developer they provide you with a fixed allowance of "energy" for use on their server. If you install your own local server, you get a much larger allowance for use there. Then when you design your dashboard (or dashboards), you do it in design mode by pressing the "+" button near the top of the screen, which then shows you a list of possible "widgets" each of which has its price associated with it. As you add widgets to your dashboard, the energy cost of each is subtracted from your allowance. If you delete a widget, you get a refund of exactly the same amount as you "paid" when you first used it, which means you can experiment with adding and deleting widgets without running up a cost. If you run out of your free allowance, then you can buy more. I have not done this for a while so the situation may have changed, but that is the way it used to be, anyway. I have found Blynk a very flexible and powerful interface, at least for my simple needs. Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi RyuKim,Regarding your panel, please count the solar cells that make up the panel, They are usually clearly visible at the front of the panel, and you can see the connections which are usually silver-coloured strips running down the front. What appears to be a short break between cells is actually the connection going to the back of the previous cell. Each cell will produce about 0.5 volts with full illumination. A panel sold as "12 Volts" usually has 36 cells and generates about 18 V at maximum power, or a bit over 20V when open circuit. If you are measuring 20V on your panel when open circuit, it is almost certainly a "12 Volt" panel. Irrespective of the above explanation, it will be no problem to use your panel with this solar charger. Regarding powering the Ard...

    see more »

    Hi RyuKim,Regarding your panel, please count the solar cells that make up the panel, They are usually clearly visible at the front of the panel, and you can see the connections which are usually silver-coloured strips running down the front. What appears to be a short break between cells is actually the connection going to the back of the previous cell. Each cell will produce about 0.5 volts with full illumination. A panel sold as "12 Volts" usually has 36 cells and generates about 18 V at maximum power, or a bit over 20V when open circuit. If you are measuring 20V on your panel when open circuit, it is almost certainly a "12 Volt" panel. Irrespective of the above explanation, it will be no problem to use your panel with this solar charger. Regarding powering the Arduino Nano, yes it is powered from the 7805 regulator with 5V (and a ground connection of course). Keith

    View Instructable »
  • Solar Powered WiFi Weather Station V2.0

    Hi ЦветанС2, The measurement interval is defined in line 14 of the main program. It is a number in milliseconds, so to get 10 minutes, which is 600 seconds, you need to set it to 600000. In the goToSleep function (found in PTHsleep.h) the awake time for that report is subtracted from the measurement interval and then multiplied by 1000 to bring it to microseconds which is what the ESP.deepSleep() function requires.

    You really need an external temperature probe, such as a DS18B20 mounted in a proper enclosure to protect it from the sun. You can use one of the additional ports on the PCB to make the connection.

    Hi MiroB1, in my version it is (sleepTime * 1000). I don't know how 5000 got into it.Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi AnupamD6, I don't think adding more MOSFETs will increase the charging current. If you need more current, you need a bigger panel, or a charger including a DC-DC converter. Keith

    Hi Jouseph, If you post a copy from your Serial Monitor showing the error code and the preceding text I may be able to make some suggestions. Keith

    Hi YashA56, Sorry about my slow reply to your question. It is very difficult to do debugging using just photographs. I also wonder if you have found the problem since you posted your question. If you have not, you should post your questions again including some voltage measurements.Keith

    Hi RyuKim, A 12V 40W panel should be fine without any component changes. I believe you should be able to use a TMP36 as a direct replacement for the LM35.Keith

    View Instructable »
  • farmerkeith commented on farmerkeith's instructable Controlling DC Converter Modules7 weeks ago
    Controlling DC Converter Modules

    Hi DannyZeee, I would certainly be interested to see any design concept that may be better than the ones I know. So please send it to me if or when you find it. Keith

    Hi DannyZeee, I agree that the through hole near pin 2 of the XL4016 IC is an equally valid connection point for the feedback pin. However I feel that it is probably a little easier to use the pins of the pot, as I did. But they are both valid and equal. Keith

    Hi DannyZeee, Sorry if my language was not clear. I was using terminology that I used in work I did a couple of years ago but never published. You can find that work, which explains these terms, here:https://www.instructables.com/id/Designing-MPPT-So...The bit you will need for these terms (like "earth phase current") are in Step 2: How a DC-DC Converter Works. I started writing that Instructable in the early stages of my journey with solar chargers, and have learned quite a lot more since then. I think there is still a role for that type of tutorial but it needs a lot of improvement - for example, diagrams showing the panel phase, earth phase and null phase; and more on the design considerations.Despite its deficiencies, I hope you find it helpful.Keith

    Hi DannyZeee, The losses in the diode used with the XL4016 are not so serious when the panel is "12 volts" (36 cells, MPP voltage around 18V) since the current multiplication is reasonably small . The diode losses become more significant, and the benefit of a synchronous converter correspondingly greater, when using a 60-cell panel (MPP voltage around 30V) which is what I think you are planning to use in your larger system with 280W panels. In this case the current multiplication is around 2.5, with the Earth phase current being about 1.5 times the panel current (instead of more like 0.5 times in the case of a 36-cell panel). With 10 panels, you may need to cater for different shading conditions for each panel, or for groups of panels, with separate control for each. This is b...

    see more »

    Hi DannyZeee, The losses in the diode used with the XL4016 are not so serious when the panel is "12 volts" (36 cells, MPP voltage around 18V) since the current multiplication is reasonably small . The diode losses become more significant, and the benefit of a synchronous converter correspondingly greater, when using a 60-cell panel (MPP voltage around 30V) which is what I think you are planning to use in your larger system with 280W panels. In this case the current multiplication is around 2.5, with the Earth phase current being about 1.5 times the panel current (instead of more like 0.5 times in the case of a 36-cell panel). With 10 panels, you may need to cater for different shading conditions for each panel, or for groups of panels, with separate control for each. This is being used in current grid-connect systems, and may be even more needed in an RV environment where the shading conditions may be unpredictable.

    View Instructable »
  • farmerkeith commented on farmerkeith's instructable Controlling DC Converter Modules7 weeks ago
    Controlling DC Converter Modules

    Hi DannyZeee, I think it would be useful for you to post pictures of your connections. I will check my hardware when I have access to it later, in the next day or two. If you are using multiple XL4016 converters, would you be better off using a smaller number of SZBK07 or equivalent modules? The XL4016 is an async converter, so it has the inherent loss of the series diode built in, where is the SZBK07 is synchronous and all the current passes through "ON" MOSFETs. Keith

    View Instructable »
  • farmerkeith commented on farmerkeith's instructable Controlling DC Converter Modules7 weeks ago
    Controlling DC Converter Modules

    Hi DannyZeee, I am glad to hear you have used the information successfully. The main issue with your proposal is that there is not much margin between the set point voltage of the feed back loop on the DC converter module, and the forward voltage drop of the diode. That limited margin, combined with any output voltage of your microcontroller when it is at the "0" state, does not give you much room for error. For example, in the case of the ATmega328P, the output low voltage (Vol) is not guaranteed to be under 0.6V at 85C, although it is typically lower than that. If you add 0.7V for the diode voltage drop, you have 1.3V which is higher than the control point voltage of the DC converter, being 1.25 V. So the control will not work in this case.It may not be a problem in practice...

    see more »

    Hi DannyZeee, I am glad to hear you have used the information successfully. The main issue with your proposal is that there is not much margin between the set point voltage of the feed back loop on the DC converter module, and the forward voltage drop of the diode. That limited margin, combined with any output voltage of your microcontroller when it is at the "0" state, does not give you much room for error. For example, in the case of the ATmega328P, the output low voltage (Vol) is not guaranteed to be under 0.6V at 85C, although it is typically lower than that. If you add 0.7V for the diode voltage drop, you have 1.3V which is higher than the control point voltage of the DC converter, being 1.25 V. So the control will not work in this case.It may not be a problem in practice, since the output stage of the microcontroller will probably not have such a high value. If necessary, this problem can easily be solved by using a MOSFET (eg 2N7000) to control the impedance you are adding between the control point and ground. If you use a MOSFET in this position, you do not need a diode and so there is no diode drop to deal with. You will appreciate that I have not tried this and there may be other issues as well. I will be interested to know how you go. If you have trouble understanding the above, feel free to ask again. If you send me a sketch of your intended circuit I will let you know what I think of it. Keith

    View Instructable »
  • Solar Powered WiFi Weather Station V1.0

    Hi ГеннадийБ2i The solution to you voltage reading is a bit of a puzzle. However I am glad it has come good for you. One of the things missing in the original code is the line:pinMode (A0, INPUT);I had thought this line would be redundant (unnecessary) because the default configuration of pin A0 is as INPUT. However maybe it is needed, perhaps only in some versions of the Arduino IDE. You could check whether your code stops working if you comment out this line. In the second version of your code, the comma between the A0 and INPUT is missing. That should cause a compile error, so I suspect you did not remove that comma. Next, a comment on the scaling. Your scale factor from the raw reading to the displayed "volt" value is 3.89/785 which is 0.004955414, while the scale factor i...

    see more »

    Hi ГеннадийБ2i The solution to you voltage reading is a bit of a puzzle. However I am glad it has come good for you. One of the things missing in the original code is the line:pinMode (A0, INPUT);I had thought this line would be redundant (unnecessary) because the default configuration of pin A0 is as INPUT. However maybe it is needed, perhaps only in some versions of the Arduino IDE. You could check whether your code stops working if you comment out this line. In the second version of your code, the comma between the A0 and INPUT is missing. That should cause a compile error, so I suspect you did not remove that comma. Next, a comment on the scaling. Your scale factor from the raw reading to the displayed "volt" value is 3.89/785 which is 0.004955414, while the scale factor in the original code is 5.1/1023 = 0.004985337. The ratio between these is 1.00604, that is there is a 0.6% difference between the scaling factors. So the original code and your new code are scaled almost identically. It seems to me most likely that the critical line that makes your new code succeed is the pinMode line. As for your question about sending data to both Blynk and Thingspeak. I think it is definitely possible. I have not tried to do this, but for a start I have the following suggestions:Where lines 17 and 18 in the main code currently give you the options of BLYNK and Thingspeak, add a new line such as:const String App = "BOTH"; // alternatives are lines belowThen change line 51 fromif (App == "BLYNK") { // choose applicationto if (App == "BLYNK" || App == "BOTH") { // choose applicationand then change line 53 from } else if (App == "Thingspeak") {to } if (App == "Thingspeak" || App == "BOTH") {Note that you have to remove the "else" from this line, and (preferably) break it into 2 lines so that the first "if" statement is terminated and the second one is an independent "if" statement. That way they are both executed if the value of App is "BOTH". And then over in the PTHsleep.h file, you do a similar thing in the code for the measurementEvent() function. I am not sure how familiar you are with writing code, but this should get you started at least. Feel free to ask more if you have trouble. Keith

    View Instructable »
  • Solar Powered WiFi Weather Station V1.0

    Hi ГеннадийБ2 I want to be sure you have connected the restart link in the hardware. D0 has to be connected to RST pin. Otherwise the software will run once and then sleep forever. It could be that having the USB connected allows it to restart (I am not at all sure about that). Anyway please check and let me know if that connection is there in your hardware. If it is not, put the link in and see if the problem goes away. You say you "corrected the sketch a little". Maybe you can tell me what you changed: or try running the original software without any changes and see what it does. When I look at my copy of this software, it is file PTH.sleep.h in line 45 that there is a line:Blynk.virtualWrite(4, volt); // virtual pin 4Is this the "51 lines&qu...

    see more »

    Hi ГеннадийБ2 I want to be sure you have connected the restart link in the hardware. D0 has to be connected to RST pin. Otherwise the software will run once and then sleep forever. It could be that having the USB connected allows it to restart (I am not at all sure about that). Anyway please check and let me know if that connection is there in your hardware. If it is not, put the link in and see if the problem goes away. You say you "corrected the sketch a little". Maybe you can tell me what you changed: or try running the original software without any changes and see what it does. When I look at my copy of this software, it is file PTH.sleep.h in line 45 that there is a line:Blynk.virtualWrite(4, volt); // virtual pin 4Is this the "51 lines" you are referring to? I guess you may have added some lines before this in that file.Keith

    View Instructable »
  • Solar Powered WiFi Weather Station V1.0

    Hi ГеннадийБ2 I think your problem is probably in the software. You do not say what software you have loaded. Have you tried using the software that is included in the Version 2.0 Instructable for this project? It includes code for measuring voltage, unlike the V1.0 software which does not have the voltage measurement in it. The V2.0 software should work with the hardware of the V1.0 design and the additional connection you have described.Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi anupamdg, Re LM35, I agree with you it would be better if the LM35 were connected remotely so it can be phycially associated with the battery. For many environments this will be a very small improvement over mounting it with the controller, since the battery and controller ware generally in the same environment. Note that the LM35 is connected to Arduino pin A3. This is not shown in the V2.0 schematic. Re "more MOSFETs on the solar side" - what problem are you trying to solve?Keith

    View Instructable »
  • 1602 LCD Keypad Shield Module With I2C Backpack

    Hello DannyG94 aka the_paradox_.Yes you can put multiple devices on the same I2C bus using the same SDA and SCL pins, provided you check that each device uses a different I2C address. The address or addresses used by any I2C device is defined by its manufacturer. You can usually find it in the data sheet of the device, although sometimes it requires a fair bit of hunting and understanding. In the specific case of the I2C backpack (I2C address 0x27) and DS3231 (I2C address 0x68) there is no conflict so they can share the same I2C bus. If you look on my github repositories you will find one for an I2C scanner that identifies at least some of the devices that correspond to each I2C address, when that address is found on the bus being tested. The link to the scanner is https://github.com/f...

    see more »

    Hello DannyG94 aka the_paradox_.Yes you can put multiple devices on the same I2C bus using the same SDA and SCL pins, provided you check that each device uses a different I2C address. The address or addresses used by any I2C device is defined by its manufacturer. You can usually find it in the data sheet of the device, although sometimes it requires a fair bit of hunting and understanding. In the specific case of the I2C backpack (I2C address 0x27) and DS3231 (I2C address 0x68) there is no conflict so they can share the same I2C bus. If you look on my github repositories you will find one for an I2C scanner that identifies at least some of the devices that correspond to each I2C address, when that address is found on the bus being tested. The link to the scanner is https://github.com/farmerkeith/I2CScannerKeith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi anupamdg, The LCD has an I2C interface and is connected to power (5V and GND) and the SDA and SCL lines are connected to A4 and A5 on the Arduino. That is, SDA should be connected to A4. SCL should be connected to A5. Once you make that connection, your LCD should come to life. Keith

    View Instructable »
  • 1602 LCD Keypad Shield Module With I2C Backpack

    Hi The_paradox_, It does sound like an ambitious project. However if you can attack it a little bit at a time, you may be surprised at what you can achieve. There are a lot of people willing to support projects like this, and you can learn a lot.I suggest you put "Arduino library menu" into your search engine and follow the links that come up. Keith

    View Instructable »
  • 1602 LCD Keypad Shield Module With I2C Backpack

    Hi The_paradox_, My first and very quick guess is that it might be backlight or contrast problems. Is the backlight coming on? You will not see anything with it off. And then, have you tried adjusting the contrast setting? This is the main cause of not seeing the characters. Please let me know if you find one of these to be the problem, or ask again if you still cannot see the characters. Good luck, Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi av1483110, Are you using diode MBR2045 as per the circuit diagram? If you are, and it is getting too hot for comfort, you can put a heat sink on it; or you can put two of these diodes in parallel, which will divide the current, and the heat, between them and reduce the temperature rise. Another option is to use a MOSFET diode instead of the MBR2045, although I doubt if the extra complexity is justified. For info about MOSFET diodes, please see https://github.com/farmerkeith/circuits/tree/maste...

    View Instructable »
  • Solar Powered WiFi Weather Station

    Hi tj_314, You are correct about the VCC, GND, SCL and SDA pins, they are the same on the 6-pin and 4-pin devices. For the other 2 pins, connect CSB to VCC, and SD0 (which is actually SDD) to GND. The software is not affected. For more complete details on this and other matters about the BME280, please see my Instructable on the subject at https://www.instructables.com/id/Library-for-BMP28...This Instructable includes a connection diagram for the module and a link to a scanner that can tell you whether you have a BMP280 or a BME280 device.

    View Instructable »
  • 1602 LCD Keypad Shield Module With I2C Backpack

    Hi TarasS2, I am not sure about your question. Please check Step 3, and ask for help if it is not clear. Keith

    View Instructable »
  • farmerkeith commented on farmerkeith's instructable Controlling DC Converter Modules5 months ago
    Controlling DC Converter Modules

    Hi mr-apoptosis, Interesting question.When you control the output of the converter with PWM generated by a microcontroller, you can use any arbitrary algorithm to determine the PWM duty cycle. So, for example, if the microcontroller has measurements of both output voltage and current, the algorithm can simultaneously put a limit on both voltage and current. This would achieve the equivalent of the built-in voltage and current pot settings. Since these converters have a built-in current sense resistor between the IN- and OUT- terminals, and the output current and only the output current flows through that resistor, the simplest implementation of current measurement is to put an op-amp such as AD822 or LM358 with suitable gain setting across those terminals and connect its output to an ...

    see more »

    Hi mr-apoptosis, Interesting question.When you control the output of the converter with PWM generated by a microcontroller, you can use any arbitrary algorithm to determine the PWM duty cycle. So, for example, if the microcontroller has measurements of both output voltage and current, the algorithm can simultaneously put a limit on both voltage and current. This would achieve the equivalent of the built-in voltage and current pot settings. Since these converters have a built-in current sense resistor between the IN- and OUT- terminals, and the output current and only the output current flows through that resistor, the simplest implementation of current measurement is to put an op-amp such as AD822 or LM358 with suitable gain setting across those terminals and connect its output to an ADC input of the microcontroller. The op-amp needs to be capable of outputs down to ground, and inputs a little bit below ground. For an example of this current sense op-amp circuit, have a look at https://github.com/farmerkeith/SolarChargerSZBK07M...Please note that this circuit is not exactly what I describe above, since the current sense is set up to measure INPUT current rather than output current. However the op-amp configuration is the sort of thing you would need. Keith

    View Instructable »
  • Solar Powered WiFi Weather Station

    Hi diy_bloke, The CH340 chip has a sleep mode. Are you sure it is not used? It would make a big difference. As I understand it, the current consumption budget looks something like this:Component Operation mode Sleep modeESP8266 170 mA 10 uACH340 12 mA 50 uALED built in 3 mA 0 uAVoltage monitor 0.006 mA 6 uATotal 185 mA 66 uADo you think these numbers are about right?Clearly if the CH340 sleep mode is not used, its current would dominate during ESP8266 sleep mode. If the ...

    see more »

    Hi diy_bloke, The CH340 chip has a sleep mode. Are you sure it is not used? It would make a big difference. As I understand it, the current consumption budget looks something like this:Component Operation mode Sleep modeESP8266 170 mA 10 uACH340 12 mA 50 uALED built in 3 mA 0 uAVoltage monitor 0.006 mA 6 uATotal 185 mA 66 uADo you think these numbers are about right?Clearly if the CH340 sleep mode is not used, its current would dominate during ESP8266 sleep mode. If the sleep-wake cycle is 10 minutes, with a 30 second wake time, the energy consumption budget looks like this:Wake time 185 mA for 0.5 minues = 92.5 mA-minutesSleep time 0.066 mA for 9.5 minutes = 0.627 mA-minutesTotal in 10 minutes = 93.13 mA-minutesThat is, an average of 9.3 mA.If the CH340 sleep mode is not used, this rises by about 12 mA to about 21 mA. It seems that removing the battery voltage monitor and/or the LED does not make much difference. Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi VaibhavV26, This project is designed for a 12Volt lead acid battery, and a nominal 12 Volt solar panel of up to 10 amps. If you want to run it at the ffull 10 amps you will need to be very diligent about the heat sinking of the main current carrying components (diode, mosftet). An alternative is a 6 volt battery and a nominal 6 Volt solar panel, also up to 10 Amps. Solar panels are usually descrived by their power rating at the maximum power point (MPP). So for a 12 Volt panel, with MPP voltage of 18V and MPP current of 10A, the power rating would be 180W. This is the maximum you could use with this controller. Keith

    View Instructable »
  • Solar Powered WiFi Weather Station

    Ni MarioV98, My guess is that increasing the reporting interval should solve the problem. I am currently using 10 minutes.According to my interpretation of this web site http://globalsolaratlas.info/?c=38.410558,408.3398... you should need about twice as much solar panel as me for the same reporting interval (I am in Eastern Australia). This web site may not be the best design guide, since it does not show day-to-day variability, but at least it gives a starting point.Keith

    View Instructable »
  • Solar Powered WiFi Weather Station

    Hi MarioV98, I think your problem is that the solar panel is not big enough to keep up with the energy usage of the WeMos. It will not be solved by using a bigger battery, all that will do is make it take longer to go flat. I think you have two options: a) increase the solar panel (eg add a second panel in parallel to the first one); or b) use sleep mode so that the Wemos goes to sleep in between readings, which saves a lot of energy. There are quite a lot of other discussions about using sleep mode in this project. I suggest you have a look at those, and if you can't figure out what to do please come back for more guidance. Keith

    View Instructable »
  • Solar Powered WiFi Weather Station

    Hi BartM27, There are lots of warnings "out there" about ESP8266 needing to be protected from voltages higher than its ratings. It may be you can get away with direct connection, but to be sure of not having troubles the divider is a good bit of insurance. Usually a 1K resistor to the Echo pin, a 2.2K to ground, with the junction to the ESP8266 pin is what is used. But really, just running the JSN-SR04T at 3.3V will be much simpler. Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi fonetainer, I think the lcd library you are using has a problem. Maybe an error in the file download, or maybe a bad version. I suggest you delete the current one and reinstall it. You can probably remove the "POSITIVE" from the function call without affecting how it works, but I think this is not your real problem, which is something to do with the library.Keith

    View Instructable »
  • Solar Powered WiFi Weather Station

    Hi BartM27, According to the data sheet, JSN-SR04T will work with supply voltages from 3.0 to 5.5V, so you don't need to boost the supply voltage to it. You can simply connect it to the same power rail as the WeMos. It is possible to provide 5V to the JSN-SR04T but it will make the circuit a lot more complicated and will use more power, so if it is not necessary it is best to avoid it. The solution is to use a boost converter (readily available from vendors on eBay, Aliexpress, etc.) to create 5V from the battery rail, and then insert a resistive divider between the Echo pin of the JSN-SR04T to protect the ESP8266 in the WeMos from the higher pulse voltage coming back from the JSN-SR-04. The trigger pin can be connected directly. If you are using one of the sensors with a combined Echo ...

    see more »

    Hi BartM27, According to the data sheet, JSN-SR04T will work with supply voltages from 3.0 to 5.5V, so you don't need to boost the supply voltage to it. You can simply connect it to the same power rail as the WeMos. It is possible to provide 5V to the JSN-SR04T but it will make the circuit a lot more complicated and will use more power, so if it is not necessary it is best to avoid it. The solution is to use a boost converter (readily available from vendors on eBay, Aliexpress, etc.) to create 5V from the battery rail, and then insert a resistive divider between the Echo pin of the JSN-SR04T to protect the ESP8266 in the WeMos from the higher pulse voltage coming back from the JSN-SR-04. The trigger pin can be connected directly. If you are using one of the sensors with a combined Echo and Trigger pin, you would need to use a bidirectional level converter for it. I provide this information to illustrate that it is possible. However I am pretty sure it is not necessary, and direct connection should work without these complications.Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi fonetainer, You seem to have a lot of problems with this software upload. Are you able to upload a simple sketch to your Arduino? eg the Blink example in the standard distribution. Once that is OK, you need to check what library (if any) you have for the LCD. It should be LiquidCrystal_I2C.h although there are several different versions of this library and some work better than others. You may need to change versions if it will not work with the one you have. However first just getting the loading correct and post your new error messages would be a good step. Keith

    Hi fonetainer, Sorry about slow reply, I am away from home (I am in Central Australia) and my internet access and available time are only occasional. Yes those I+, I- points are for the corresponding pins of the ACS712 module. The logic side pins of the ACS 712 must be connected: 5V pin to 5V supply, GND pin to Ground and data pin to Arduino pin A2. The P6KE36CA is a transient suppressor diode. You can use another transient suppressor diode for a higher voltage; or if you can't get this type of diode you can use a zener diode of a similar voltage (eg 36 volts or higher). Keith

    Hi StergiosZ, The real answer to this question is pretty complicated. There are many pieces of information not provided in your question which are needed to provide a good answer. Is your 300W load continuously On? At 12V, to provide 300W we need 300/12=25 Amps. What battery capacity do you plan? What solar panel capacity do you plan? If you have grid power, why do you want to use a solar panel? Is the reason economic (solar is cheaper)? and if so do you want to hit the optimum cost point for your climate and battery size and panel size?This PWM controller is not very suitable for loads of this size. You would probably be better off with an MPPT controller, which will give you more energy from your panels. If you can give more information, I may be able to advise you more constructively...

    see more »

    Hi StergiosZ, The real answer to this question is pretty complicated. There are many pieces of information not provided in your question which are needed to provide a good answer. Is your 300W load continuously On? At 12V, to provide 300W we need 300/12=25 Amps. What battery capacity do you plan? What solar panel capacity do you plan? If you have grid power, why do you want to use a solar panel? Is the reason economic (solar is cheaper)? and if so do you want to hit the optimum cost point for your climate and battery size and panel size?This PWM controller is not very suitable for loads of this size. You would probably be better off with an MPPT controller, which will give you more energy from your panels. If you can give more information, I may be able to advise you more constructively.Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi AdhiN4, You obviously have a different version of the software from me. Google Translate tells me that the comment that is in your code is Indonesian and they translate it as "loop to read the rough value of adc". The version in this Instructable, written by deba168 and which I am looking at, has comments in English and more of them. The corresponding comment in that code says { // loop through reading raw adc values AVG_NUM number of times which I think is a bit more informative than the English translation of the Indonesian comment.The purpose of this code is to smooth out any noise that my be getting into the voltage readings. If you look in the preamble section, you will see that AVG_NUM is defined as 10. So this bit of code makes 10 measurements of whichever pin it is...

    see more »

    Hi AdhiN4, You obviously have a different version of the software from me. Google Translate tells me that the comment that is in your code is Indonesian and they translate it as "loop to read the rough value of adc". The version in this Instructable, written by deba168 and which I am looking at, has comments in English and more of them. The corresponding comment in that code says { // loop through reading raw adc values AVG_NUM number of times which I think is a bit more informative than the English translation of the Indonesian comment.The purpose of this code is to smooth out any noise that my be getting into the voltage readings. If you look in the preamble section, you will see that AVG_NUM is defined as 10. So this bit of code makes 10 measurements of whichever pin it is told to look at, adds all the measurements together, and divides the total by 10, thus getting the average of the readings rounded down to the nearest integer, which it returns as its result. If you need more clarification, or explanation, don't hesitate to ask again. Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi AdhiN4, It is a bit of a puzzle. It is not clear why the battery voltage seems to be jumping around. I would like you to try the following:a) in the function called void print_data(void) add 2 new statements just ahead of the first Serial.print statement, as follows:Serial.print("Time is "); Serial.println((float)millis()/1000,3);b) in the function called void charge_cycle(void) add 2 new statements right at the top (before the first test, but after the opening brace:Serial.print("bat_volt=");Serial.println(bat_volt);c) Instead of capturing a screen shot, press the button at the bottom left of the screen to stop it scrolling, and select a couple of screens full of the output, copy to your clipboard (edit copy) and paste it into a posting. That will give a sequenc...

    see more »

    Hi AdhiN4, It is a bit of a puzzle. It is not clear why the battery voltage seems to be jumping around. I would like you to try the following:a) in the function called void print_data(void) add 2 new statements just ahead of the first Serial.print statement, as follows:Serial.print("Time is "); Serial.println((float)millis()/1000,3);b) in the function called void charge_cycle(void) add 2 new statements right at the top (before the first test, but after the opening brace:Serial.print("bat_volt=");Serial.println(bat_volt);c) Instead of capturing a screen shot, press the button at the bottom left of the screen to stop it scrolling, and select a couple of screens full of the output, copy to your clipboard (edit copy) and paste it into a posting. That will give a sequence showing the transitions between states on multiple cycles. Keith

    I now understand you are saying, that if I label the first (left) screenshot 1, and the top half 1a and the bottom half 1b, then the sequence is 1a 1b 1a 1b 1a 1b ... and so on, when there is not much illumination; and that it changes to 2a 2b 2a 2b 2a 2b ... when there is full sun. Is that correct?

    Hi AdhiN4, Based on that understanding,

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi fonetainer, If you want to handle more power, it makes sense to go to a MPPT type of charger rather than a PWM charger. It is not that a PWM charger cannot handle more current, just that the amount of energy you will be losing will become sufficient to repay the extra cost of the more complext MPPT charger. Although I do not recommend it, to allow this PWM controller to handle more current, you would need to a) yes use a 20Amp ACs712and b) replace the MOSFETs with a different type with a lower RdsON, such as IRF4905 (instead of IRF9540). Keith

    Hi AdhiN4, I think you need to take a systematic step-by-step approach to working out the problem. You at least need a multimeter to measure voltages, and have your computer connected so you can put in some Serial.print() commands to check what the software is doing. If the battery is connected, but no solar panel, do you get what you expect? Are the voltages from the multimeter consistent with what the software sees. If not you should adjust the calibration factors in the software until they are close. When this part is right, connect your solar panel and use a shade over the solar panel to control its output. Get its voltage on the multimeter and in the software to be consistent. The charger behaviour mainly depends on solar_volt and bat_volt and its relationship to bulk_charge_sp an...

    see more »

    Hi AdhiN4, I think you need to take a systematic step-by-step approach to working out the problem. You at least need a multimeter to measure voltages, and have your computer connected so you can put in some Serial.print() commands to check what the software is doing. If the battery is connected, but no solar panel, do you get what you expect? Are the voltages from the multimeter consistent with what the software sees. If not you should adjust the calibration factors in the software until they are close. When this part is right, connect your solar panel and use a shade over the solar panel to control its output. Get its voltage on the multimeter and in the software to be consistent. The charger behaviour mainly depends on solar_volt and bat_volt and its relationship to bulk_charge_sp and float_charge_sp. If the battery voltage is less than the float charge set point (ie float_charge_sp) the PWM duty cycle should be high and the solar panel voltage should be only a little bit higher than the battery voltage. and the panel should be producing its full current capability. If the battery voltage is higher than the bulk charge set point, the PWM duty cycle should be low and the solar panel voltage should be at close to its open circuit value and several volts higher than the battery voltage with almost no current.I hope this helps. good luck,Keith

    Hi fonetainer, if you look at the schematic diagram which is attached at the end of Step 2, you will see several little connector flags with labels like A0, A1, ... D1, D2, .... These flags with An and Dn are all connections to the Arduino pins which have the same names on the Arduino nano module. The Arduino Nano also has +5V and GND connections (to its 5v and GND pins). Not all of the Arduino Nano pins have connections. If you have any confusion about which connections to make, feel free to ask about them. Keith

    Hi AdhhiN4, Can you please post a sample of your serial monitor output at a time when this blinking is happening? Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi AdhiN4, It seems to me that you have made progress towards what you want, but the logic needs a bit of fixing. Two suggestions:a) Have a look at some of the examples provided with the Arduino IDE. I think the most relevant one is called Debounce; look for it in Files/Examples/Digital. b) Add some (temporary) debugging printouts to your code so you can see what is happening. For example, add a line like: Serial.print ("Line 340 bat_volt="); Serial.println(bat_volt);A few lines like this will let you see what your software is doing. The line number is there so you can easily identify at what point in the code it is checking, and also makes it easy to find the code when you have it working and want to delete all the temporary print commands. If you continue to have trouble, p...

    see more »

    Hi AdhiN4, It seems to me that you have made progress towards what you want, but the logic needs a bit of fixing. Two suggestions:a) Have a look at some of the examples provided with the Arduino IDE. I think the most relevant one is called Debounce; look for it in Files/Examples/Digital. b) Add some (temporary) debugging printouts to your code so you can see what is happening. For example, add a line like: Serial.print ("Line 340 bat_volt="); Serial.println(bat_volt);A few lines like this will let you see what your software is doing. The line number is there so you can easily identify at what point in the code it is checking, and also makes it easy to find the code when you have it working and want to delete all the temporary print commands. If you continue to have trouble, post your code so I can work out what the problem is. Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi AdhiN4, The additional code for the push button is going to be in the function void load_control () which in my version 2.0 of the software is at line 334+. But you need to be a bit clearer about how the button will operate. For example, do you want one push of the button to turn the load on, and a second push to turn the load off? One alternative is to wait for the next daytime (ie with solar_volt >5) and turn the load off then. I think you first need to clearly define how you want the button and the existing load control to interact. You will also need to decide which Arduino pin will sense whether the button is pushed or not. Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi AdhiN4, I think the current fuse (in series with the solar panel) is in the wrong place. If a solar panel is short circuited it will generate current not much higher than its maximum power point current and there will be no damage to any component. In this design, it would be better to put the fuse in series with the battery, which can generate very high and potentially damaging currents if it is short circuited. As for whether your windmill needs a fuse, that depends on its design. It is probably a good safety practice to put in a fuse if you are not sure.Keith

    Hi AdhiN4, It is a calibration problem. There are several factors that affect the results displayed on the LCD: resistor tolerances in the resistive dividers and the power voltage supplied to the Arduio being the main ones.. I think the best solution is to adjust the multiplier used in the voltage calculation in the software. In the function "void read_data (void)" (about line 150 in my copy) is where you will find the calibration constants for the 4 different measurements used. For example one of them is:solar_volt = read_adc(SOL_ADC)*0.00488*(120/20);You should change the value of 0.00488 to another value based on the ratio of the measured and displayed voltages. For example, if your multimeter reads Vm and the LCD shows Va, calculate Cnew = 0.00488 * Vm / Va and use that...

    see more »

    Hi AdhiN4, It is a calibration problem. There are several factors that affect the results displayed on the LCD: resistor tolerances in the resistive dividers and the power voltage supplied to the Arduio being the main ones.. I think the best solution is to adjust the multiplier used in the voltage calculation in the software. In the function "void read_data (void)" (about line 150 in my copy) is where you will find the calibration constants for the 4 different measurements used. For example one of them is:solar_volt = read_adc(SOL_ADC)*0.00488*(120/20);You should change the value of 0.00488 to another value based on the ratio of the measured and displayed voltages. For example, if your multimeter reads Vm and the LCD shows Va, calculate Cnew = 0.00488 * Vm / Va and use that.Keith

    View Instructable »
  • Solar Powered WiFi Weather Station

    Hi Deba168, Certainly the schematic is right. I can't see all of the connections in the pictures of the PCB layout (which seem to be the same, I expected them to be for the 2 different sides of the board). Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi fonetainer, You are missing two files. The first one is in the same repository as the software you are trying to compile. That is, https://github.com/farmerkeith/SolarChargerSZBK07M...The second one, RepeatEvery.h can be found at https://github.com/farmerkeith/executionControl/tr...Both of these files can be put into the same directory as the MPPT_SZBK07.ino file. Keith

    I omitted to answer about the LCD. You can choose any type that you want. The 2-line, 16 character displays are very inexpensive but quite restricted because they only have 2 lines. The other main option is a 4 line, 20 character display, which is more expensive but still quite affordable. Whichever one you choose, I suggest you get it with a serial backpack to conserve pins on your Arduino. Some of these modules can be puchased with the serial backpack pre-installed. If you buy the backpack separately, you can wire them yourself. If you need to do this, have a look at https://www.instructables.com/id/1602-LCD-Keypad-S...Keith

    Hi fonetainer, If you have the V2.0 PWM controller by deba168 as per this Instructable, you should be able to add a LCD to display voltages and currents. I suggest you use an LCD with serial backpack, so you can connect it to the Arduino Nano used in this controller. Your "also" project sounds like a lot more of a challenge. I think you need to start with the load energy you want to supply over night, and use that to size your battery, and from that you can work out the amount of solar panels you require. Have a look at this design which may be closer to what you have in mind.https://github.com/farmerkeith/SolarChargerSZBK07ModuleKeith

    Hi fonetainer, There is no content in the file SZBK07.kicad_pcb, so it won't help you much to open it. I put all the files that KiCad produced in the repository, but I have not done a PCB for this design so the pcb file is just a stub generated by KiCad with no contents.I don't know if you can run KiCad on your Mac. If you can, you should be able to open these files with it. I am using Linux so I am not familiar with using a Mac.

    View Instructable »
  • Solar Powered WiFi Weather Station

    Hi Deba168, Your schematic is correct. You do not have any choice for where the voltage divider ground goes, it is on the WeMos board and goes to the common ground on the board, which is OUT- on the TP4056 module. When the battery is charged and its voltage is above the drop-out value (about 2.8 V) the DW01 protection circuit on the TP4056 module connects the OUT- to B- and the voltage difference between the two will be very small. Also, on the TP4056 module, B+ and OUT+ are connected together, so it does not matter whether the top end of your divider goes to B+ or OUT+ (or even "5V" of the WeMos module). They are all the same voltage.Keith

    Hi Deba168, I did not think of this until you asked about PCB design. a) you could make the board compatible with sleep mode by connecting D0 to RST, either directly with a track (easiest) or via a solder link so that the user can choose to put in the connection or not. More fancy again: Since I expect the default mode will be to have the connection, you could make it a track and on the silk screen write an arrow and "drill here to break D0-RST". This is probably a bit extreme. As you will have observed there has been a lot of correspondence about using sleep mode so it is of interest to many people. b) I think it would be very valuable to make the board compatible with BOTH the 4-pin and the 6-pin versions of the BMP280 / BME280. Even though you wrote BMP280 on the silk scre...

    see more »

    Hi Deba168, I did not think of this until you asked about PCB design. a) you could make the board compatible with sleep mode by connecting D0 to RST, either directly with a track (easiest) or via a solder link so that the user can choose to put in the connection or not. More fancy again: Since I expect the default mode will be to have the connection, you could make it a track and on the silk screen write an arrow and "drill here to break D0-RST". This is probably a bit extreme. As you will have observed there has been a lot of correspondence about using sleep mode so it is of interest to many people. b) I think it would be very valuable to make the board compatible with BOTH the 4-pin and the 6-pin versions of the BMP280 / BME280. Even though you wrote BMP280 on the silk screen, your version actually uses a BME280 as I understand it. The first 4 pins of the 6-pin version of the BMP280 module are identical to the 4 pins of the 4-oin version. The extra pins on the 6-pin module are CSB and SD0. I provided instructions about them in the hardware section of my instructable on the BMP280 library https://www.instructables.com/id/Library-for-BMP28...Anyway, to use the I2C interface, CSB has to be connected to Vdd.The SD0 pin provides address control for the I2C interface, and can be connected to ground or to Vdd. Usually it will be connected to Ground so I think that would be fine for your PCB. If you wanted to give the user the full possibilities, you could include a solder link to enable either connection. These are just ideas. You did ask. Regards,Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi HakimA14, There are many circuit simulators "out there", mostly based on the "spice" simulation method. Your choice partly depends on what operating system you are running. In my own work I have been successful in using ngspice with KiCad. KiCad is used to draw the schematic circuit and produce a "netlist" suitable for spice. Ngspice is used to do the simulation. All this is running on my T420 laptop computer using Manjaro Linux. These software packages are free and open source. I found there were some incompatabilities between the KiCad netlist output and the ngspice input requirements, which I have solved using a shell script called "ng" which uses sed to do the translation. You can find all of this work, including many sample circuits and s...

    see more »

    Hi HakimA14, There are many circuit simulators "out there", mostly based on the "spice" simulation method. Your choice partly depends on what operating system you are running. In my own work I have been successful in using ngspice with KiCad. KiCad is used to draw the schematic circuit and produce a "netlist" suitable for spice. Ngspice is used to do the simulation. All this is running on my T420 laptop computer using Manjaro Linux. These software packages are free and open source. I found there were some incompatabilities between the KiCad netlist output and the ngspice input requirements, which I have solved using a shell script called "ng" which uses sed to do the translation. You can find all of this work, including many sample circuits and simulation results, on my github circuits repository: https://github.com/farmerkeith/circuitsKeith

    Hi AdhiN4, You cannot (or should not) just connect the windmill and PV panel in parallel. Nor do you need to duplicate the entire charger. Currently the input from the solar panel is connected to a transient surge suppressor, a voltage divider for voltage measurement, then through a power diode MBR2045. Your windmill input should have a duplicate set of those components. The cathodes of the two MBR2045 diodes will be connected together. This is to prevent the PV panel from taking current from the windmill when it is dark, and the to prevent the windmill from taking current from the PV panel when the wind is not blowing. You will also need to make corresponding changes to the software to take the higher of the two input voltages (PV and wind). Keith

    Hi fonetainer, Yes you can use this controller with a 100W solar panel. You panel is at the top end of the capabilities of this controller. You may want to consider using an MPPT controller such as https://github.com/farmerkeith/SolarChargerSZBK07... (although this is not in a "plug and play" status as yet.Keith

    View Instructable »
  • Solar Powered WiFi Weather Station

    Hi Glasgowbrian,Your serial monitor output and your mobile phone showing disconnection seem perfectly normal to me. The serial monitor output shows the initiation of a connectionn to the Blynk cloud server and its success. then your measurements. Then I presume your Wemos goes to sleep, which breaks the connection to the Blynk cloud and it shows on your mobile phone as a discconnection. My question is, after the delay you have set, does the Wemos wake up and go through the whole process again? If not, did you connect the D0 and RST pins?Keith

    No worries Glasgowbrian. Keith

    View Instructable »
  • ARDUINO MPPT SOLAR CHARGE CONTROLLER (Version-3.0)

    Hi NorthC2, Yes this circuit, using the XL4016, can be used for that.Keith

    View Instructable »
  • 1602 LCD Keypad Shield Module With I2C Backpack

    Hi clemenlg, Your wiring in the photo looks correct to me, so it is not obvious what might be wrong. Do you have the exact same modules that are specified in the Instructable? There are several different ones on the market. If the backlight does not come on, you will not be able to see the characters in the display. So that is the first thing you need to get working. I have the following suggestion. In the setup() section, after lcd.setBacklight(LOW);I suggest you add:delay(1000);lcd.setBacklight(HIGH);delay(1000);lcd.setBacklight(LOW);And see if the backligh comes on briefly. That will indicate that the polarity is back to front. Good luck. Please let us know if that is the problem. Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi JosephC298, Yes it can be used for a 12V 60AH battery. The limitations of the charger are for the charging current and load current.

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi AhhiN4, There are no guarantees with this, but if you want to handle higher currents then you should change the MOSFETs IRF9540 for MOSFETs with a lower ON resistance, such as IRF4905. You should probably also duplicate the power diode MBR2045. It may also be necessary to upgrade the driver circuit for the gate of MOSFET Q1, to reduce its switching time.

    View Instructable »
  • ARDUINO MPPT SOLAR CHARGE CONTROLLER (Version-3.0)

    Hi NorthC2, The A4 and A5 pins on the Arduino are used for the I2C bus. An I2C bus can interface to many devices, because it uses a device address as part of its protocol. In this design it is used for the RTC and the LCD display. If you do not need the real time clock (RTC), then you can remove it. I put the RTC in the circuit so that the data logging function (on the micro SD card) can include time and date stamps on the data records. You should be aware that if you remove the RTC, it is currently providing the pull-up resistor for the D2 line used for the temperature sensor, and you will need to add a resistor from D2 to +5V. The resistor value can be 3.3K or 4.7K or thereabouts. You may need a lower value if you have very long wires to your DS18B20.

    View Instructable »
  • farmerkeith commented on deba168's instructable Solar Powered WiFi Weather Station 9 months ago
    Solar Powered WiFi Weather Station

    Hi AlekseyFedorovich, I think that diode is not required.

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi David_0519, Here is a sample sketch with a filter function which I think will do what you have asked for. Copy the filter() function out of this sketch into your code before the setup() section. Then in void lcd_display() replace the following llinelcd.print(temperature);with lcd.print(filter(temperature));If that is not clear, or if you have trouble with it, please post your amended code so I can help you get it working.Keith

    View Instructable »
  • ARDUINO MPPT SOLAR CHARGE CONTROLLER (Version-3.0)

    Hi NorthC2, I drew the ACS712 module myself. Its definition is in the xxx-cache.lib file in the folder of the schematics that use it. If you have trouble accessing it I can send you the file separately. These cach.lib files are just simple text files, you can edit them with your favourite text editor (I usually use Mousepad). So if you have a file with your personalised KiCad components in it, you can just copy and paste the definition from the cache.lib file into your own personalised file, and it will be available for your own drawings. Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Yes you should be able to use a 5 watt 6 volt solar panel, so long of course as you are using a 6 volt battery.

    Hi David_0519, Your battery voltage readings are consistent with a fully charged or nearly fully charged lead acid battery, and applying a load that will discharge it in about 5 hours. So it is probably normal. What sort of variation in the temperature display do you experience? If it is just the last digit, it may be just instability in the last bit of the ADC reading causing the reading to fluctuate between (say) 29 and 28. The least significant bit of the ADC is worth almost 0.5C, so a small instability can make it appear to jump 1C. If that is all it is, you can if you like put in a bit of code to filter out the noise.

    View Instructable »
  • ARDUINO MPPT SOLAR CHARGE CONTROLLER (Version-3.0)

    Hi NorthC2, Yes of course you can leave out the mains supply control sub-circuit. If your panel(s), charger and battery as well as the load are on buoys I guess you need to be careful they don't get wet. That would be my main worry I think. Good luck with it! Keith

    Hi VongsatonC, The reason that I have the Mains supply as well as the solar panel is that I was asked to add it by someone I have been helping. I think that for the majority of situations there will be no mains supply available and that part of the circuit should be simply left out. Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi Michele, That 4th TO220 device is the 7805 voltage regulator, that takes in battery voltage (12V) and puts out the regulated 5V supply for the Arduino, ACS712, LEDs etc.Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi sunita patil, I think you need to think carefully about the logic you use to connect and disconnect the mains supply. You can find an example of the sort of hardware connections required in this schematic:https://github.com/farmerkeith/SolarCharger20AmpAs...The bit you need to look at is in the middle part of the diagram. The key components are Q8 and Q9 and the control from Arduino Pin D3 (which can of course be any pin you choose). You can replace the 230V transformer and rectifier with an AC adapter of suitable output voltage and current capacity for your needs. If this is not clear feel free to ask more.

    Hi Ben_21,I think the panel voltage of 0.67 volts is there because of a little bit of reverse leakage current through the NMR2045 diode, and is not a concern. As for the -0.55 Amps of load current showing, and assuming you do not have any load connected, it must be the calibration point of the ACD712 needs adjusting. The ACS712 puts out Vcc/2 on its data pin when the current is zero. This should be 2.5 volts when the Vcc is 5 Volts. The calibration point is set in the software in line 158 (in my copy) which reads "load_current = (read_adc(CURRENT_ADC)*.0488 -25);"The literal value 25 represents the offset current. If you are getting -0.55Amps, and you adjust that literal value to 24.45, you should get a reading of 0 when there is no current. So now the line will read: "l...

    see more »

    Hi Ben_21,I think the panel voltage of 0.67 volts is there because of a little bit of reverse leakage current through the NMR2045 diode, and is not a concern. As for the -0.55 Amps of load current showing, and assuming you do not have any load connected, it must be the calibration point of the ACD712 needs adjusting. The ACS712 puts out Vcc/2 on its data pin when the current is zero. This should be 2.5 volts when the Vcc is 5 Volts. The calibration point is set in the software in line 158 (in my copy) which reads "load_current = (read_adc(CURRENT_ADC)*.0488 -25);"The literal value 25 represents the offset current. If you are getting -0.55Amps, and you adjust that literal value to 24.45, you should get a reading of 0 when there is no current. So now the line will read: "load_current = (read_adc(CURRENT_ADC)*.0488 -24.45);"There are "better" ways to do this, from a software usability perspective, However this is the minimal change that should get you a good result. Please report back if this solves your issues.

    Hi sunita patil, you can find the schematic diagram at the end of Step 2. There is a link there where you can download the pdf. If you have trouble with the link, please ask again.

    View Instructable »
  • farmerkeith commented on deba168's instructable Solar Powered WiFi Weather Station 10 months ago
    Solar Powered WiFi Weather Station

    Hi johweb, I have not had problems with using deep sleep on various instances of Wemos D1 mini pro. Your problem may be in the particular instance of the Wemos you are using - ie a hardware problem. However I am a bit puzzled by your latest message. You say you have added "Serial.println("pass here!") in the setup() section. My question is do you get this message printed on the serial monitor when the WeMos first starts, but not when it wakes up after deep sleep, when you just get junk characters? One possibility is that the junk characters are disguising the message from your software. I suggest you modify your added statement to include a new line, so it reads:"Serial.println("\npass here!")Good luck,Keith

    View Instructable »
  • farmerkeith commented on deba168's instructable Solar Powered WiFi Weather Station 10 months ago
    Solar Powered WiFi Weather Station

    Hi th.deppe. I have not been using the Thingspeak version, but I am sure it is possible to add the Deep Sleep feature to it. Some other users may know it Thingspeak requires a new login at every wake up. Please see my answer to comments below to PitrP with a bit of discussion about the deep sleep options. Also you need to connect the D0 pin to RST on the Wemos board, which is how the sleep timer is able to wake up the processor. If you need more guidance on the details, please reply with your question(s). Keith

    Hi johweb, You are right it is necessary to connect D0 to RST (which I forgot about in my answer to the question under Comments below (from PitrP). Are you using Blynk? If so, it may be that it is taking a long time to re-start the Blynk process. Two suggestions to get started:a) in the setup() section, just after Serial.begin(9600) line, add a new line such as:Serial.println("\n Solar Powered Weather Station");This will tell you whether the software is getting to that point, or getting stuck before that.b) In the early part of the software, there is a line that looks like this:// #define BLYNK_PRINT Serial // debug printing from library enabledJust delete the first two characters (the //) which will make the line active and give you some print outs of how the Blynk connection...

    see more »

    Hi johweb, You are right it is necessary to connect D0 to RST (which I forgot about in my answer to the question under Comments below (from PitrP). Are you using Blynk? If so, it may be that it is taking a long time to re-start the Blynk process. Two suggestions to get started:a) in the setup() section, just after Serial.begin(9600) line, add a new line such as:Serial.println("\n Solar Powered Weather Station");This will tell you whether the software is getting to that point, or getting stuck before that.b) In the early part of the software, there is a line that looks like this:// #define BLYNK_PRINT Serial // debug printing from library enabledJust delete the first two characters (the //) which will make the line active and give you some print outs of how the Blynk connection is proceeding. It seems likely to me that this is where your problem is.Please report back with the results.Keith

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi bipul027, In Step 1, the author specifies battery voltage of 6 or 12 Volts and current of up to 10 Amps. I am a bit doubtful about using it for 10 amps, because the MBR2045 power diode will be dissipating about 10 Watts at that current. I think a more prudent limit for a project that will keep working for a long time would be more like 5 amps. The rated maximum power point voltage of your solar panel has to be about 40% higher than the battery voltage - 17 V for a 12V battery, or 8.5V for a 6 V battery.So, using a limit of 5 Amps and a battery of 12 Volts, your solar panel should be up to 5*17=85 Watts. If you are using a 6V battery, your solar panel can be up to 42.5 Watts. You can probably get away with somewhat higher panel ratings if you live in a climate where perfectly clear da...

    see more »

    Hi bipul027, In Step 1, the author specifies battery voltage of 6 or 12 Volts and current of up to 10 Amps. I am a bit doubtful about using it for 10 amps, because the MBR2045 power diode will be dissipating about 10 Watts at that current. I think a more prudent limit for a project that will keep working for a long time would be more like 5 amps. The rated maximum power point voltage of your solar panel has to be about 40% higher than the battery voltage - 17 V for a 12V battery, or 8.5V for a 6 V battery.So, using a limit of 5 Amps and a battery of 12 Volts, your solar panel should be up to 5*17=85 Watts. If you are using a 6V battery, your solar panel can be up to 42.5 Watts. You can probably get away with somewhat higher panel ratings if you live in a climate where perfectly clear days with bright sunlight are unusual. The storage capacity of your battery can be as high (or as low) as you like. That just determines how long it can supply the load current when the sun is not shining.

    View Instructable »
  • farmerkeith commented on deba168's instructable Solar Powered WiFi Weather Station 10 months ago
    Solar Powered WiFi Weather Station

    Hi ПреславВ, Yes I am happy to share all that I have on this topic.There are (at least) three levels. "Basic" sleep: To put your WeMos D1 mini Pro to sleep, you use the instructionESP.deepSleep(sleepTime); In this instruction, sleepTime is a long integer in microseconds. You can define the value in a const declaration at the beginning of your code, or just type a number into the instruction. You just put the instruction in your code at the point where you want the microcontroller to go to sleep.For example to sleep for 1 second you type:ESP.deepSleep(1000000); // sleep for 1 secondYou should be aware that when the microcontroller wakes up at the end of sleepTime, it starts from the beginning. It has no memory of what happened before it went to sleep. If you want to carry info...

    see more »

    Hi ПреславВ, Yes I am happy to share all that I have on this topic.There are (at least) three levels. "Basic" sleep: To put your WeMos D1 mini Pro to sleep, you use the instructionESP.deepSleep(sleepTime); In this instruction, sleepTime is a long integer in microseconds. You can define the value in a const declaration at the beginning of your code, or just type a number into the instruction. You just put the instruction in your code at the point where you want the microcontroller to go to sleep.For example to sleep for 1 second you type:ESP.deepSleep(1000000); // sleep for 1 secondYou should be aware that when the microcontroller wakes up at the end of sleepTime, it starts from the beginning. It has no memory of what happened before it went to sleep. If you want to carry information from one cycle to the next, you need "Advanced" sleep (the last one I mention below)."Improved" sleep: the instruction is the same, but what I do is a bit of arithmetic to make the wake times line up with a given period. Like this:// declaration before setup() section:const long reportingTime=60000 ; // 60 seconds in milliseconds// code at the point of going to sleep:long sleepTime = reportingTime - millis(); // in milliseconds if (sleepTime <1000) sleepTime = 1000; // set minimum sleep of 1 secondESP.deepSleep(sleepTime * 1000); // convert to microseconds With this code, the period of the sleep (sleepTime) is reduced by the awake time, so that the total of sleep and awake stays the same, provided awake time is not longer than the reportingTime value. Using Blynk, the microcontroller has to log in to Blynk every time it wakes up. This time is variable, which is why adjusting the sleep time becomes relevant if you want a fixed reporting interval."Advanced" sleep You can use "Improved" sleep as above, together with some way of storing data while the ESP8266 is asleep. Various possibilities are explained in my Instructable on the BMP280, which you can find at https://www.instructables.com/id/Library-for-BMP280As an example, I put the code for 2 functions into my sketches as follows:void saveCounter(byte counter){ // write value of counter into bmp1 bmp1.updateF4ControlSleep(counter&0x3F); // store counter bmp1.updateF5ConfigSleep((counter/64)&0x3F); // store counter} Calling this function just before going to sleep saves the value of counter in the BMP280 memory.byte recoverCounter(){ // read value of counter back from bmp1 byte bmp1F4value= bmp1.readF4Sleep(); // 0 to 63 byte bmp1F5value= bmp1.readF5Sleep(); // 0 to 63 return bmp1F5value*64+bmp1F4value; // 0 to 4095} Calling this function in setup() recovers the value of counter from the BMP280 memory.To make these work, you need the BMP280 library that I have written. There is a link in the Instructable (as well as a lot more explanation) and also here:https://github.com/farmerkeith/BMP280-libraryBack to your original question: How to do a 10 minute sleep?// declaration before setup() section:const long reportingTime=60000 * 10 ; // 10 minutes in milliseconds// code at the point of going to sleep:long sleepTime = reportingTime - millis(); // in millisecondsif (sleepTime <1000) sleepTime = 1000; // set minimum sleep of 1 secondESP.deepSleep(sleepTime * 1000); // convert to microseconds

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi Michele,The 3 TO220 packages you can see in your photo are 2 MOSFETs and 1 diode (the MBR2045, D1 in the schematic). Physically the diode looks the same as a MOSFET - it even has 3 leads, because this part is actually MBR2045CT which means it is 2 diodes in the same package. See Step 15.This circuit is designed for either a 6 volt or 12 volt lead acid battery. It can be adapted to other voltages, but not as low as 3.7 Volts. If you want to charge a 3.7V Lithium battery, I suggest the best way is to build the circuit for either 6 or 12 volts, and add an additional battery charging circuit for your Lithium battery. I think the best way is to use a small buck converter which you can adjust for an output of around 4.5 volts or so, and a TP4096 Lithium battery charging board. Or you can c...

    see more »

    Hi Michele,The 3 TO220 packages you can see in your photo are 2 MOSFETs and 1 diode (the MBR2045, D1 in the schematic). Physically the diode looks the same as a MOSFET - it even has 3 leads, because this part is actually MBR2045CT which means it is 2 diodes in the same package. See Step 15.This circuit is designed for either a 6 volt or 12 volt lead acid battery. It can be adapted to other voltages, but not as low as 3.7 Volts. If you want to charge a 3.7V Lithium battery, I suggest the best way is to build the circuit for either 6 or 12 volts, and add an additional battery charging circuit for your Lithium battery. I think the best way is to use a small buck converter which you can adjust for an output of around 4.5 volts or so, and a TP4096 Lithium battery charging board. Or you can connect a small solar panel directly to the TP4096 charging board. See this Instructable for how to go about this. https://www.instructables.com/id/Solar-Powered-WiF...Of course these suggestions are only appropriate for small size Lithium batteries - like AA or 18650 size. If you have a very large 3.7 Volt battery, you will need a different solution, but you still cannot use this PWM charging circuit directly because 3.7 volts is not enough to turn on the charging MOSFET.Keith

    View Instructable »
  • farmerkeith commented on farmerkeith's instructable Controlling DC Converter Modules10 months ago
    Controlling DC Converter Modules

    I know the control works with PWM applied to the feedback pin. The exact mechanism is a bit unclear to me. I think the sawtooth from the oscillator must have a larger aplitude than the swing of the first op amp. Maybe the response time of the first op amp is rather long, so that it effectively averages out the input PWM signal. Because these op amps are internal to the XL4016 device, it is not possible to do any observations on these signals. The pot must not be disconnected from the feedback pin, otherwise there is no control over the output voltage. If you are able to do some testing that throws light on how this works in detail, I will be happy to include the information in an update of this instructable.

    View Instructable »
  • ARDUINO MPPT SOLAR CHARGE CONTROLLER (Version-3.0)

    Hi mgbena0007, I suggest you have a look at the zopinter comment above re his XL4016 based solution. Also have a look at the SZBK07 module and this design that uses it: https://github.com/farmerkeith/SolarChargerSZBK07...If you can use a 24V battery and if you can figure out a way to combine 4 SZBK07 modules, you can get to 2 kW.

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi tytower, the purpose of measuring the battery voltage is to decide the charging rate, so as to avoid overcharging. The battery voltage rises when under charge, but that does not invalidate the decision making process.

    View Instructable »
  • ARDUINO MPPT SOLAR CHARGE CONTROLLER (Version-3.0)

    Hi dhv007, your method of parallelling the capacitors and MOSFETs is correct. However you should be aware there are some problems with the circuit. a) the reverse current flow prevention does not work because some part of the battery voltage gets through the the gate of Q1 (Q1 and Q1*2 in your circuit). I think the easiest way to solve this is to replace that part of the circuit with a MOSFET diode. You can find information on that at my Github repository https://github.com/farmerkeith/circuits/blob/maste... You won't need to double this component for panel currents under 8 amps.There are other solutions of course if you don't want to change MOSFET type. You can find one at https://github.com/farmerkeith/SolarChargerTwoAmp...b) when you double the switching MOSFETs, gate capacitance al...

    see more »

    Hi dhv007, your method of parallelling the capacitors and MOSFETs is correct. However you should be aware there are some problems with the circuit. a) the reverse current flow prevention does not work because some part of the battery voltage gets through the the gate of Q1 (Q1 and Q1*2 in your circuit). I think the easiest way to solve this is to replace that part of the circuit with a MOSFET diode. You can find information on that at my Github repository https://github.com/farmerkeith/circuits/blob/maste... You won't need to double this component for panel currents under 8 amps.There are other solutions of course if you don't want to change MOSFET type. You can find one at https://github.com/farmerkeith/SolarChargerTwoAmp...b) when you double the switching MOSFETs, gate capacitance also doubles which means that the switching time doubles unless you do something about it. In this circuit using the IR2104 driver the switching speed is already a problem. My suggestion is that you use a different driver, IR2184 which has a much higher drive current capacity; and also that you use two of them, one for Q2 and Q3, and the other one for Q2*2 and Q3*2.You should be aware that although the functionality of IR2184 is the same as IR2104, the pinout is different so you need to change your wiring plan or PCB.You can drive the two IN pins and two SD\ pins together, each through its own resistor, from the same output pin on the Arduino. c) I also recommend you move the SD pin from D8 to D10 on the Arduino. That is because with D10 it is possible to do PWM co-ordinated with D9. It is a long story and beyond what can explain here; but it is relatively easy to change early in the process, much harder later.d) I notice that you are connecting Vcc of your driver IC (IR2104 or IR2184) to the panel voltage. You can expect that to exceed the voltage rating of the driver, which has a maximum Vcc of 20 Volts. You should connect it to the battery voltage, which will not go over 15 Volts - or if it will you need to create a 12 volt or so supply for the driver IC. e) one of the main limitations in this circuit is the inductor. According to my modelling it has a temperature rise of 54 C at a current of 5 Amps.If you are interested in higher capacity solar chargers, I suggest you have a look at some other designs that use commercial DC-DC converters. https://github.com/farmerkeith/SolarChargerSZBK07M...https://github.com/farmerkeith/Solar-charger-XL401...Good luck and happy Making. .Keith

    View Instructable »
  • ARDUINO MPPT SOLAR CHARGE CONTROLLER (Version-3.0)

    Hello NorthC2, There is not really any V3.1 project to follow. If you want something that actually works right now, please look at the comments from zopinter and all the replies to it.The original schematics were created using Eagle. I am now using KiCad for my schematics.

    Hi pawel2357, the charging process for a LiFePO4 battery is a bit different than a lead acid battery. The usual process is first constant current until the battery hits 4.1 volts/cell, and then constant voltage at 4.1 volts. There may also be a need for cell balancing, to make sure the voltage in each cell never goes over 4.1 volts.

    View Instructable »
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi TeddyGG, I am sorry to hear you have some problems. I don't know for sure but I think it is likely that the little buck converter (just to the right of the Nano) is responsible for your measurement of 68 K instead of 100 K. Another possibility is that, with the Nano removed from its socket, that the D2 and D3 pins are floating and may get a little bit of current from thermal noise and allow a few electrons to flow through R6 and/or R8. I don't think this is your main problem. It is not really possible to check your connections from the photos, even though they are quite clear. I think you need to do the following:a) check your wiring with a multimeter to make sure that nothing is shorted to ground that should not be. b) with the Arduino Nano out of its socket and the ACS712 disconnec...

    see more »

    Hi TeddyGG, I am sorry to hear you have some problems. I don't know for sure but I think it is likely that the little buck converter (just to the right of the Nano) is responsible for your measurement of 68 K instead of 100 K. Another possibility is that, with the Nano removed from its socket, that the D2 and D3 pins are floating and may get a little bit of current from thermal noise and allow a few electrons to flow through R6 and/or R8. I don't think this is your main problem. It is not really possible to check your connections from the photos, even though they are quite clear. I think you need to do the following:a) check your wiring with a multimeter to make sure that nothing is shorted to ground that should not be. b) with the Arduino Nano out of its socket and the ACS712 disconnected, connect the batery to the battery terminals and check that its 12V appears in the right places. Also check that the buck converter is putting out 5V, and adjust it if not. It may be worth while also pulling out the fuses, checking the voltages on the fuse terminals, then replacing the fuses. c) you can also check the functioning of transistor T2 by connecting the driver terminal D2 to ground (to turn the transistor off) and +5V (to turn the transistor on). If you have a 12V light bulb you can connect to the load terminals that may help your testing. d) if all the above tests are OK, it should be safe to put in a working ACS712. e) if that is all OK, you should measure the voltages on all the Arduino pins, to make sure they make sense. Then you should be OK to put in your (working) Arduino. I hope you can find the problem.

    View Instructable »
  • farmerkeith's instructable Controlling DC Converter Modules's weekly stats: 11 months ago
    • Controlling DC Converter Modules
      201 views
      10 favorites
      0 comments
  • ARDUINO SOLAR CHARGE CONTROLLER ( Version 2.0)

    Hi victory282,I understand you want to calculate and display on the LCD the estimated time to the battery being fully charged (when it is being charged) and the estimated time to the battery being fully discharged (when it is being discharged). These things are possible, at least as an approximation, but are not just a matter of software.Hardware: In the schematic v2.0 the current meter module (ACS712) is in the path between the load control MOSFET and the output fuse. In this position it can measure the load (discharge) current but not the charging current. This means that you can get an estimate of discharge time to empty, but not charge time to full. Either you have to add a second current meter module to measure the charging current, or move the existing one into the path to and fro...

    see more »

    Hi victory282,I understand you want to calculate and display on the LCD the estimated time to the battery being fully charged (when it is being charged) and the estimated time to the battery being fully discharged (when it is being discharged). These things are possible, at least as an approximation, but are not just a matter of software.Hardware: In the schematic v2.0 the current meter module (ACS712) is in the path between the load control MOSFET and the output fuse. In this position it can measure the load (discharge) current but not the charging current. This means that you can get an estimate of discharge time to empty, but not charge time to full. Either you have to add a second current meter module to measure the charging current, or move the existing one into the path to and from the battery. If you move it to this position, it can give you positive current for charging, or negative current for discharging. That seems to me to be the best approach. Software: Quite a few things need to be added. You need a function that calculates battery state of charge (SOC) based on the battery voltage and the current into or out of the battery. Then you need a constant for the capacity of the battery in amp-hours (AH), and (probably) a SOC value that you will consider to be "fully discharged". This is because if you discharge thte battery below about 30% SOC it is likely to affect its life, so you could consider something like the 30% discharge point as being fully discharged. This is a matter of how you want to use the displayed value. Given these things, the time to full charge when charging is (100%-SOC%)*AH/100/Current (result in hours)Similarly, the time to full discharge when discharging is(SOC%-30%)*AH/100/(-Current) (result in hours)Finally, you need to figure out what the LCD display should look like. The existing software uses all the spaces on the display, so you will need to give up something, or alternate between different display modes. If you want to alternate, you could do it using a timer, or you could add a button to switch between the alternatives (another hardware change). I hope this gives you an idea of what is involved. If you want to do it, I can give you support with any problems you may encounter. Please let me know what you decide to do.

    View Instructable »
  • More Activities