author

farmerkeith

65
Inbox View Profile
7Instructables90,346Views309CommentsAustralia
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
  • Library for BMP280 and BME280

    Hi krtpowa,Whether you can get humidity, or not, depends on whether your sensor is BMP280 or BME 280. Please see the last section of Step 1 for guidance on working out which type you have. I am not sure what you mean by "..the battery was impossible".If this is not helpful please let me know. Keith

    View Instructable »
  • Library for BMP280 and BME280

    Hello alphons1, I think I answered this question, but I cannot see the answer in my correspondence. Do you need any more information?Keith

    View Instructable »
  • Library for BMP280 and BME280

    Hi bananof,I would expect this library to work well on your Atmega328P. Although I have not tested on a Uno, it works on a Nano and in essence the software environments are the same. Do you get the trucated introductory print line on restart (when you press your reset button) or when you disconnect and reconnect the power? Could there be a possibility that you have different settings for the bit rate in your computer's serial monitor, and the example sketch?If you come back with more details I will try to help. Keith

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

    Hi ArtO2, It should be very simple. If you start with a temperature in Celsius in a variable called temperature, it will be converted to Fahrenheight by the line:temperature = 32 + temperature * 9 / 5; // convert Celsius to FahrenheightDid you already do something like that? Keith

    View Instructable »
  • Library for BMP280 and BME280

    Hi AndrasS7, Thanks for letting me know. I see from your photos you are using an ESP32 (is that correct). That might be the reason you have had trouble with other libraries, some compatability issue. ESP32 is a much faster processor. I did not test my library with ESP32, but I would expect it to work.Keith

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

    Hi fedecatt, "Blynk" not "blink"?Problem with humidity may be that you have a BMP280 not a BME280. Have a look in my Instructable about the BMP/BME280 (https://www.instructables.com/id/Library-for-BMP280/) which covers both of these devices and gives you guidance about how to find out which one you have. They look very similar.About voltage, I think you need to set the reading rate to "PUSH". Can you get correct readings on the Serial Monitor? Come back if you can't get it working.Keith

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

    Hi Mad-King-Builder,osrs_t is a constant declared in the tab file "PTHsleep.h" which is included at line 64 of the main program. Do you have that file in the same folder as the main program, and is the include statement there?Please ask again if this does not lead to a solution. Keith

    View Instructable »
  • Library for BMP280 and BME280

    Hi Lionel, There are two problems here. The first is you have to replace "objectName" with the name of the software object you are using. The second is that you cannot read humidity with a bmp280 device and using the bmp280 class. You need a bme280 device and to use the bme280 class to read humidity, Do you know if you have a bmp280 or a bme280 device? Some guidance on working that out is at the end of Step 1 of this Instructable. If you do have a bme 280 device, you can change the code in the line just before "void setup(){" to read "bme280 bme0;". In this statement, the "bme280" calls up the bme280 class definition. The "bme0" defines the object name. You can use any object name you like. You just need to use the same object name where...

    see more »

    Hi Lionel, There are two problems here. The first is you have to replace "objectName" with the name of the software object you are using. The second is that you cannot read humidity with a bmp280 device and using the bmp280 class. You need a bme280 device and to use the bme280 class to read humidity, Do you know if you have a bmp280 or a bme280 device? Some guidance on working that out is at the end of Step 1 of this Instructable. If you do have a bme 280 device, you can change the code in the line just before "void setup(){" to read "bme280 bme0;". In this statement, the "bme280" calls up the bme280 class definition. The "bme0" defines the object name. You can use any object name you like. You just need to use the same object name wherever you want to refer to that object. Then in the line "double humidity=objectName.readHumidity (temperature, pressure); // measure humidity, pressure and temperature" you need to replace "objectName" with the name of the bme280 software object you are using, as described above. If your device is a bmp280, you cannot get humidity readings from it, and you should leave the software class as bmp280, and your code should follow the example for reading pressure and temperature only, not humidity. I hope this works out for you. Don't hesitate to come back with more questions if you have them.Keith

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

    Hi roger, Sorry about my slow reply. I have been overloaded. I think the next steps are a) download the software again to make sure there is no transmission error and you are using the original software from the project. If it will still not compile, then b) comment out the entire loop() procedure (but not the loop() itself). That is, out a new line with just /* following the loop() line (line 34) and another one with just */ before the closing brace of the loop() block (line 96). If that compiles, then you can progressively restore function calls or blocks of code until you find the one that is the problem. If that will not compile, then you need to remove more pieces of code until you find the one that is the problem. I hope this helps. Please let me know how you get on. Keith

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

    Good morning moserroger,The reason for the problem is not immediately obvious, but we can find it with a methodical approach.The first thing is to make sure you can compile some of the standard Arduino sketches, such as the "blink" sketch. Can you do that?Regards,Keith

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

    Hi michalbajda,I think you have probably bought a BMP280 instead of a BME280. If you look at my Instructable https://www.instructables.com/id/Library-for-BMP2... you can gets some information about how to check which one you actually have. To find out what is happening with the WiFi connection/disconnection, I suggest you add some Serial.print() statements in suitable parts of the code to see what is going on.

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

    Hello benoit80000, It is easy to modify the code for bmp280, however you won't get humidity values because the BMP280 only measures temperature and pressure. Please have a look at the Instructable I wrote which explains most of what I think you might need to know. It is at https://www.instructables.com/id/Library-for-BMP28...If you need more help, please post your complete code as an attachment and I will try to help you further. Keith

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

    Hi DannyM62, good to hear that you found the problem. Enjoy! Keith

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

    Hi DannyM62,I don't know However I think you must be on a Windows machine, because of all the backslashes in the file path names. On my Linux the path names use forward slashes as a separator. Also even with a (successful) compilation there is no reference to a file esp8266.aIt seems to me this is probably part of your setup. Can you successfully compile a basic sketch on your machine for the esp8266 - such as Blink.ino? Keith

    View Instructable »
  • Library for BMP280 and BME280

    Hi СергейД17 Yes it is possible to cut down the size of both program and data usage by removing things that you don't use. I don't have a setup to give me the atmega8 values, and the values below may not be strictly comparable, but what I get when compiling for an Arduino Nano isLibrary Program Datafarmerkeith 8142 1245Adafruit 10154 467Your numbers (atmega8) 6856 927I see your sketch only has the temperature and not pressure. If you don't want pressure,, there are many things you could remove. Howeve...

    see more »

    Hi СергейД17 Yes it is possible to cut down the size of both program and data usage by removing things that you don't use. I don't have a setup to give me the atmega8 values, and the values below may not be strictly comparable, but what I get when compiling for an Arduino Nano isLibrary Program Datafarmerkeith 8142 1245Adafruit 10154 467Your numbers (atmega8) 6856 927I see your sketch only has the temperature and not pressure. If you don't want pressure,, there are many things you could remove. However the main areas for reduction are:the farmerkeith library has a lot of debug print statements in it. These can be removed without any impact on the working. Any that you want to keep should be enclosed in a F() macro which results in the text being in program memory only and not also in data memory. This can be a big saving if memory is in short supply. I think this is probably the reason for the farmerkeith library using so much more data memory than the adafruit one. The altitude and standardized pressure calculation functions could be removed.With some loss in accuracy, the data type used for temperature and pressure could be changed from "double" to "float". Depending on your application and the accuracy required, this could save a little bit of both memory and real time.Separately, the Adafruit library also supports the SPI mode of the BMP280. If you are using I2C, you could remove the SPI support (not a big saving I think but with a very limited memory space it may help to get you over the line to do what you want). Are you able to make changes like this yourself? If you need guidance on how to go about this I can give you some, or I could even publish a cut-down version aimed at your application. I hope this helps, Keith

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

    Hi clemenig, Well done for finding the reason for this problem. I have updated the Instructable with information about the various addresses and an I2C scanner. Please let me know if you think it should be made clearer. Thank you for the feedback. Keith

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

    Hi clemenig, Thank you for posting your code. The answer may be there. The first 3 lines of your code (under the heading My code) say:#include #include #includeThey should be:#include <Wire.h>#include <LCD.h>#include <LiquidCrystal_I2C.h>Without these 3 lines as shown, the I2C will not work. Please try putting them in.Regards,Keith

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

    Well, HB113, it is your choice and I guess it depends on what direction you want to take your learning in. From my point of view, it is always necessary to build on other people's work, and the community is very supportive. Enjoy the project, anyway. Keith

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

    Well done Alan, I am glad you solved the problem. Keith

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

    Hello HB113, It sounds like you have solved your main question at least. However there is one point I would like to clarify. Blynk is open source (although if you want to change something there is a huge amount of code to wade through to find the bit you want to change). The main point is that if you implement the Blynk local server, you can run it completely disconnected from the internet and just using your local network (WiFi, Router and any local links you may have). You can set it up to either allow a mobile phone outside your local network to access the Blynk data, or not, as you wish. Keith

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

    Hi jay-thomas, "D7" is a pin definition which is buried somewhere in the Arduino IDE. In the environment of the Wemos D1 mini pro it points to GPIO pin 13. To get the error message you show, I think you must have a different microcontroller specified in the Boards area of the Tools menu. I can only suggest you check and make sure you have the right board selected. As for "sensors.begin()", the function of this line is to initialise the Dallas Temperature object, prior to using it. It can be placed anywhere in the setup function. If you want to know "exactly" what it does, you should look at the "begin" code in the library itself. Keith

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

    Hello JohnSmith-Workshop, I have had a look at my own hardware again. Looking at the LCD itself, from the left hand end the pins are labelled Vss, Vdd, VO, RS, ....Vss should have 0 volts on itVdd should have about 5 volts on it (your USB voltage if powered from the USB). The next pin, VO, is that control pin for the contrast. It is controlled by the multi-turn pot just above and to the left of these 3 pins. In my hardware, the characters on the LCD are visible when the voltage on this pin is between 0.3 Volts and 1.3 Volts. The best visibility is at around 0.8V. The LCD characters can be seen with a bright external light, even if the backlight is off, provided the contrast setting is right - ie giving about 0.8V on the VO pin. If you still get no characters, the possibilities that I ca...

    see more »

    Hello JohnSmith-Workshop, I have had a look at my own hardware again. Looking at the LCD itself, from the left hand end the pins are labelled Vss, Vdd, VO, RS, ....Vss should have 0 volts on itVdd should have about 5 volts on it (your USB voltage if powered from the USB). The next pin, VO, is that control pin for the contrast. It is controlled by the multi-turn pot just above and to the left of these 3 pins. In my hardware, the characters on the LCD are visible when the voltage on this pin is between 0.3 Volts and 1.3 Volts. The best visibility is at around 0.8V. The LCD characters can be seen with a bright external light, even if the backlight is off, provided the contrast setting is right - ie giving about 0.8V on the VO pin. If you still get no characters, the possibilities that I can think of are:a) faulty hardware - either the serial backpack or the LCD module need to be replacedb) wrong connections - but I presume you have followed the instructions in the body of this instructable. Please check carefully. I hope this helps. Keith

    Hello clemenlg, I think you will need a multimeter to make much progress. Please have a look at the reply I just sent to JohnSmith-Workshop in the adjacent message. I hope it will help you as well. Good luck, Keith

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

    Hello JohnSmith-Workshop, I have your message. I think I need to play with my own hardware before giving you any more suggestions. It will take a couple of days. Keith

    Hello JohnSmith-Workshop,Tell me please, does the backlight come on and then off during this startup sequence? The steps are, to get the backlight on continuously, and then adjust the pot that controls the contrast. You may have to adjust it over its full range, The characters should go from completely washed out (too pale to see) to completely hidden by the dark background (too dark to see). In the middle somewhere you should get good contrast and visibility. Keith

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

    Hello JohnSmith-Workshop, I think you may not have the correct liquid crystal library. The one I used can be obtained from here: https://github.com/fmalpartida/New-LiquidCrystalI am unable to read much of your screenshots because they are too blurry. This problem can be avoided by copying the contents of the screen to your clipboard, and pasting it directly into your message. Alternatively, you may be able to increase the resolution of the screenshot, depending on the tool you are using. Good luck, Keith

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

    Kai, this is getting more puzzling. Do you have a question?Keith

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

    good morning KaiS21. I cannot see any difference between these images and the ones you sent yesterday. Did you attach the correct files?Also your last line, when translated by the robot, generates a sentence I can't understand. It says "Please enter the number only as a PN or email". Can you re-phrase it so maybe it makes sense?Thanks,Keith

    View Instructable »
  • Controlling DC Converter Modules

    Hi hicham01, Your circuit and the code look to me as if they will work in the real world. I am not familiar with isis proteus, but I suppose the problem must be in there somewhere. If you were working with real hardware, I would put a Serial.print() statement into the loop (as well as Serial.begin(9600) in setup()) so as to observe the values. I don't know if you can do that with the simulator.Sorry I can't help more. Keith

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

    Hi clemenig, I take it that when you say "the same result", you mean that the backlight does not flash briefly at startup, when you have put the extra lines into setup?It is not possible at the moment for me to check on my own hardware at the moment, because I am away from it, but I will look when I can in a few days. In order to see characters on the LCD screen, it is necessary to have the backlight working. The wire is the yellow one in your photo. You could try putting your multimeter on it to see if there is a 1-second pulse when the Nano starts up. If there is, the problem must be in the LCD end. If there is not, the problem is in the serial backpack or the software. Good luck, I will get back to you when I can look at my own hardware. Keith

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

    Hi Frederiq, I have been having a look at the Victron paper you provided a link for, and extending it to your situation. I think it is a really useful document and I thank you for providing the link. Based on my analysis, I think you may have a real problem using your 60-cell panels with a 24V lead acid battery, due to the influence of temperature on panel output voltage. The essential problem is that 60-cell panels work well with charging a 24V battery in the region of 28 to 29 V, provided the panel temperature is no more than 50 Celsius. I looked up the average maximum temperatures in Martinique and it is about 30 Celsius. Assuming that (which may not be correct for you), the temperature rise in the panel would have to be less than 20 C, which according to the relevant chart in the Vi...

    see more »

    Hi Frederiq, I have been having a look at the Victron paper you provided a link for, and extending it to your situation. I think it is a really useful document and I thank you for providing the link. Based on my analysis, I think you may have a real problem using your 60-cell panels with a 24V lead acid battery, due to the influence of temperature on panel output voltage. The essential problem is that 60-cell panels work well with charging a 24V battery in the region of 28 to 29 V, provided the panel temperature is no more than 50 Celsius. I looked up the average maximum temperatures in Martinique and it is about 30 Celsius. Assuming that (which may not be correct for you), the temperature rise in the panel would have to be less than 20 C, which according to the relevant chart in the Victron document requires a free standing panel installation (ie not close to a roof) and wind of about 1.5 - 2 m/s (ie 5 to 8 km/h). For hotter panel temperatures, up to around 75 C, the charger will still work but with greatly reduced power yield. The system performance will be significantly impacted by having diodes in series with each panel, which will lose about 1 Volt between the panel voltage and the battery voltage. As a very minimum, I think these diodes need to be removed and the function performed with a MOSFET diode. Maybe you have real world measurements which are at variance with this analysis, in which case you may be able to use this system. I would be interested to know the installation parameters of your 9 solar panels, such as free-standing or on a roof, sloping or horizontal. Also the expected cable voltage drop between the panels and the charge controller and battery. In the Victron paper, they recommend putting panels in series and using an MPPT charger. Another option they do not canvas is using a Buck-boost MPPT charger. As far as I know there are no commercial designs of this type, but it should be entirely possible - although the power levels you require would be a challenge. If your panel installation is on a roof with minimal clearance between the panels and the roof, and if you commonly do not experience daytime breezes (or at least not commonly enough to rely on the breeze to make your charger work) then maybe you need to consider one of these possibilities. One way forward would be to build the PWM charger you originally had in mind, with good data collection functions, and use the data from that to determine whether there is a problem and if so the type of solution that is needed. Food for thought?Regards,Keith

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

    Hi Frederiq, Regarding the best forum, it is really up to you to decide but it seems to me that a good solution would be to write your own Instructable about your current setup, experiences and the existing solar charge controller design, and then add to it from time to time as the design evolves. Instructables supports adding new steps (eg as you add design improvements) and also editing of existing steps (eg correcting mistakes or adding missing information). You do have other options, like Facebook, Hackaday, Pinterest, blogspot, and probably others but from my limited knowledge Instructables would be the best. You can share your unpublished drafts with others (eg me) before going "live" if you wish by sending a link to them.I appreciate your point about PWM being OK for yo...

    see more »

    Hi Frederiq, Regarding the best forum, it is really up to you to decide but it seems to me that a good solution would be to write your own Instructable about your current setup, experiences and the existing solar charge controller design, and then add to it from time to time as the design evolves. Instructables supports adding new steps (eg as you add design improvements) and also editing of existing steps (eg correcting mistakes or adding missing information). You do have other options, like Facebook, Hackaday, Pinterest, blogspot, and probably others but from my limited knowledge Instructables would be the best. You can share your unpublished drafts with others (eg me) before going "live" if you wish by sending a link to them.I appreciate your point about PWM being OK for you. Given that you have a blocking diode installed in each panel, you don't need that function in the solar charge controller. I am thinking about whether there is any benefit in moving that diode function into the controller. More on that another time.You should be aware that I am not the designer of the V2.0 PWM controller. Deba168 is the author. He (with some help from me) recently published the update v2.01 including a PCB. I doubt if that is a great deal of benefit to you. As I understand it, the voltage measuring by the ADC of the microcontroller, and the cycle of the PWM, are not synchronised by any active mechanism. Therefore, when in PWM mode, the measured battery voltage, and the measured solar panel voltage, are some variable mix of ON and OFF states. It probably makes the battery voltage rather variable and possibly unsuitable for you. To fix this you probably need to use a software PWM under which you have precise control of which PWM phase the battery measurement is taken. However this brings me to another question, which I forgot to include in my earlier reply. Which is:What are your desires regarding control and monitoring of the charge controller?You should note that the V2.1 (and V2.01) design provides monitoring using an LCD display, and the only "control" mechanism is to update the software. There is no provision for changing any of the set points during operation. Are you OK with this? Or would you like to have a more capable arrangement?My current idea is to replace the Nano with an ESP32 which will give WiFi communication, so you can then use either your own or one of the public internet data collection, display and control services. The one I have some experience with, and which I think is pretty good, is Blynk. Blynk would allow you to track the hourly, daily, weekly, monthly charging cycles and also allow you to adjust set points such as the float voltage and absorption time. I find this more atractive than re-loading software each time you find it necessary, and is also an easy way to collect data. If you don't have, or want to use, WiFi then you can still collect data using a micro-SD card or a USB memory stick. However this requires you to collect it from time to time, and does not give you real-time status information. What do you think about that?I am aware that there are many other options for adding WiFi capability, however I have recently started using an ESP32 so that would be the most comfortable for me. I have been using the WeMos D1 mini pro, which is based on the ESP8266, for some time. It has WiFi, however it does not have enough ADC inputs, so it would definitely need the addition of an external ADC such as ADS1115. That would be another option instead of the ESP32. Regards,Keith

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

    Hi jay-thomas, I think you have what you need with the answer from @Topspliff, but I want to add a little bit. This Adafruit board design provides some extra features which are not needed in this project, and a different pin order to every other board I have managed to find on the internet. All the other designs are (more or less) compatible with the PCB layout, but not the Adafruit one. This Adafruit board provides its own voltage regulator on board, and also level shifting so you can use it directly in a 5Volt environment, even though the BME280 is a 3.3 Volt component. For this project, which is essentially 3.3V powered, these facilities are not needed. Here is a bit of extra information about connections.The labelling on the Adafruit BME280 board is for the SPI interface, which is n...

    see more »

    Hi jay-thomas, I think you have what you need with the answer from @Topspliff, but I want to add a little bit. This Adafruit board design provides some extra features which are not needed in this project, and a different pin order to every other board I have managed to find on the internet. All the other designs are (more or less) compatible with the PCB layout, but not the Adafruit one. This Adafruit board provides its own voltage regulator on board, and also level shifting so you can use it directly in a 5Volt environment, even though the BME280 is a 3.3 Volt component. For this project, which is essentially 3.3V powered, these facilities are not needed. Here is a bit of extra information about connections.The labelling on the Adafruit BME280 board is for the SPI interface, which is not used in this project which uses I2C. That is why the names are a bit different. There is no issue with it working in either SPI or I2C mode (but see below).The VCC on the PCB should go to the 3Vo pin on the Adafruit BME board, bypassing the regulator on the board which will only lose you a bit of voltage and maybe make the sensor not work at low battery charge levels. The GND, SCL (SCK) and SDA (SDI) connections need no further comment. They are correct in your message.The CS pin on the Adafruit BME280 board should be connected to Vcc (ie 3.3V), which on the PCB is done by connecting to the CSB position. This is actually important, because if the BME280 device on the board detects anything other than Vcc on this pin it goes into SPI mode, which you do not want. You may get away with leaving this pin not connected, but this may give you problems and it is much better to connect it to Vcc. The SDO pin on the Adafruit BME280 should also be connected. If you connect it to Ground (which is what is on SDO of the PCB) the I2C address of the sensor will be 0x76. It is also valid to connect SDO on the sensor to Vcc, in which case the I2C address of the sensor will be 0x77. You probably do not need this but it allows you to have a second sensor connected. So I recommend you make the connections exactly as per your message, but with the clarification that Vcc should go to the "3Vo" pin on the sensor board. I hope this helps. Keith

    Hi jay-thomas, re VIN vs 3Vo: you CAN use either. I checked the schematic, the regulator is a MIC5225-3.3. It has a dropout voltage of 0.23 volts at a current of 50 mA, so that is the voltage drop you will get from the supply voltage to the sensor when the supply voltage is lower than 3.3V. When reverse biased, it will draw 5 microamps, which you can regard as a virtual zero. The 3Vo pin connects directly to all the operational circuitry on the board, including the sensor, so it can be used to supply power to the board no problems. I attach the schematic FYI. Re SDO connection: Your diagram (very nice diagram by the way) indicates SDO on the weather station PCB with "N.C.". Since It is connected to Vcc, IF it was more convenient for your cross-connection wiring, you can make t...

    see more »

    Hi jay-thomas, re VIN vs 3Vo: you CAN use either. I checked the schematic, the regulator is a MIC5225-3.3. It has a dropout voltage of 0.23 volts at a current of 50 mA, so that is the voltage drop you will get from the supply voltage to the sensor when the supply voltage is lower than 3.3V. When reverse biased, it will draw 5 microamps, which you can regard as a virtual zero. The 3Vo pin connects directly to all the operational circuitry on the board, including the sensor, so it can be used to supply power to the board no problems. I attach the schematic FYI. Re SDO connection: Your diagram (very nice diagram by the way) indicates SDO on the weather station PCB with "N.C.". Since It is connected to Vcc, IF it was more convenient for your cross-connection wiring, you can make the connection SDO to SDO. You only need to use the Ground option for SDO if you want a second BME280 (or a BMP280 which uses the same I2C address). You can add a DS18B20 or the like on other ports without considering the I2C address space. It is only when adding more I2C devices on the same I2C port that you need to consider possible address conflicts. Regards,Keith

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

    Hi kiran26524, When in PWM mode, the average current is a direct result of the particular PWM duty cycle at the time. So the charge current, and therefore the battery voltage, depends on the algorithm used to control the PWM duty cycle. The objective of the software in this version is to charge the battery at the maximum rate possible (limited by the panel current capability and illumination) until it reaches the float charge set point, after which PWM is used to achieve constant voltage charging at the float charge set point. Keith

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

    Hi kiran26524, PWM uses a short on-off cycle to connect and disconnect the panel to the battery. In this design the total cycle is about 2 milli seconds, for a frequency of about 500 Hz. If the PWM duty cycle is at 40%, the panel will be connected to the battery for 0.8 ms, and disconnected for 1.2 ms. During the 0.8ms "ON" period, the panel charges the battery at it maximum current capability for the sunshine level at the time, and the panel voltage is equal to the battery voltage plus the losses in the wiring and (mainly) the series diode. During the 1.2ms "OFF" period, the battery and panel are disconnected, the charging current is zero and the panel voltage rises to its open circuit value.Does this make it clear for you?Please feel free to ask again if not. Keith

    Hi Frederiq,There are certainly many people who have asked about higher power solar chargers, however I am not aware of any published designs in the sort of power ratings you are looking for. Usually at the sort of power levels you are looking at, the appropriate solution is an MPPT charger, since the additional energy obtained more than justifies the additional cost and complexity of the MPPT design. There are commercial chargers available at these power levels, but no published DIY designs that I am aware of. There are significant challenges for MPPT at these power levels, and also some for PWM designs but not so serious. I think I can help you if you want to share some more information. I understand you are using a 24V lead acid battery and want to charge it will up to 100Amps. Is th...

    see more »

    Hi Frederiq,There are certainly many people who have asked about higher power solar chargers, however I am not aware of any published designs in the sort of power ratings you are looking for. Usually at the sort of power levels you are looking at, the appropriate solution is an MPPT charger, since the additional energy obtained more than justifies the additional cost and complexity of the MPPT design. There are commercial chargers available at these power levels, but no published DIY designs that I am aware of. There are significant challenges for MPPT at these power levels, and also some for PWM designs but not so serious. I think I can help you if you want to share some more information. I understand you are using a 24V lead acid battery and want to charge it will up to 100Amps. Is this correct? What is the capacity of the battery (in amp-hours)?What are the solar panels you are using? Are they the typical 60-cell panels used for solar grid connect installations, with a typical power rating of 250 Watts or so? How many panels will you be using?What sort of climate are you in? Do you have many days with intense sunshine, or is it cloudy a lot of the time?I understand your focus on the charging voltage, which means you need an accurate voltage measuring capability. The 10-bit ADC of the Arduino Nano/Uno etc. may be adequate if carefully calibrated. If you set the full scale range of the battery voltage divider to 30V, the measurement step size will be 30mV (0.03V) which seems OK, but usually there is some jitter and the real accuracy is going to be more like 0.1V or maybe a bit worse. If you are concerned about this you could go to an external ADC device like the ADS1115 which will give you considerably better accuracy. The V2.0 PWM design has a current limit of the order of around 5 amps, mainly due to the series diode (MBR2045). At high currents you lose a lot of energy in the forward voltage drop of this diode, and even putting multiple diodes in parallel does not solve that problem. The real solution is to move to a MOSFET diode design, but that has impacts on the way the software works so really the whole design has to be revised for the sort of currents you are looking at. AND you will still have the limitations of a PWM solution. For a MPPT design, you could look at a modular approach using commercial DC-DC converters. You can find some information along this direction on my github repositories using the SZBK07 converter. Of course it also depends on what you want to do. Regards,Keith

    Hello KaiS21,I see your display shows 6.05 V for the battery. If you can put your multimeter across the battery, what do you get? If the number on the multimeter differs significantly from the value on the display, you can adjust the calibration factor in the software (I can tell you where if you can't find it). Your panel voltage shows 0 volts, which is consistent with the panel being disconnected or in the dark. To calibrate the panel voltage measurement, you need a panel connected with the sun on it, or else another artificial source of voltage such as a mains powered power supply. Again, you measure the panel voltage with your multimeter, and compare it with the display. You display current is showing a negative value. This should be the load current, but the negative value could b...

    see more »

    Hello KaiS21,I see your display shows 6.05 V for the battery. If you can put your multimeter across the battery, what do you get? If the number on the multimeter differs significantly from the value on the display, you can adjust the calibration factor in the software (I can tell you where if you can't find it). Your panel voltage shows 0 volts, which is consistent with the panel being disconnected or in the dark. To calibrate the panel voltage measurement, you need a panel connected with the sun on it, or else another artificial source of voltage such as a mains powered power supply. Again, you measure the panel voltage with your multimeter, and compare it with the display. You display current is showing a negative value. This should be the load current, but the negative value could be an incorrect zero offset, or the ACS712 being connected backwards. Both of these can be fixed with software changes if required, but first you need to work out the correct zero offset. Looking at the photo you provided, the ACS712 is in the right of the photo. Its Vcc wire is red and its data (output) wire is white. With the load disconnected, you should measure both of these relative to ground. The data wire should be exactly 1/2 of the red wire. for example if the red wire measures 4.80 Volts, the white wire should measure 2.40 volts. The other end of the white wire should go to pin A2 on the Arduino, and should also show the same voltage. If your measurements do not follow what I explained above, you can do adjustments in the software to correct for the difference. If you tell me your numbers, I can advise you on how to change the software if that is appropriate. Keith

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

    Hi aurianto, Sorry, I think you will have to try in English and make your question a bit clearer. Keith

    Schematic file attached. Keith

    View Instructable »
  • Library for BMP280 and BME280

    Hi JoãoC7,If you are using the function calcAltitude (pressure); this uses a reference pressure of 1013.15 hPa. You can adjust the reference pressure using the functioncalcAltitude (pressure, seaLevelhPa);putting in your own value of seaLevelhPa. However if your project is normally at the same altitude, and that altitude is known, it may be more useful for you to use the functioncalcNormalisedPressure (pressure, altitude);which will give you the equivalent mean sea level pressure corresponding to the current measured pressure. As to the question of why you are getting negative values of -40 to -50 m, it suggests there is a pressure calibration problem with your device. To dig into this a bit more, you could compare your values with published meterology data for your local area; Also, ar...

    see more »

    Hi JoãoC7,If you are using the function calcAltitude (pressure); this uses a reference pressure of 1013.15 hPa. You can adjust the reference pressure using the functioncalcAltitude (pressure, seaLevelhPa);putting in your own value of seaLevelhPa. However if your project is normally at the same altitude, and that altitude is known, it may be more useful for you to use the functioncalcNormalisedPressure (pressure, altitude);which will give you the equivalent mean sea level pressure corresponding to the current measured pressure. As to the question of why you are getting negative values of -40 to -50 m, it suggests there is a pressure calibration problem with your device. To dig into this a bit more, you could compare your values with published meterology data for your local area; Also, are you using a BMP280 or a BME280? I have done a lot of testing with a BMP280, but relatively little with BME280. According to the data sheets, the pressure measurement and compensation algorithms are the same, however I have not thoroughly tested that they give the same results. Do you have more than one device that you could compare results from?Keith

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

    Hi staxen, The link for the sensor took me to an aliexpress page. Is that correct? It shows the sensor itself (that goes in the ground) plus an electronics module and some connecting wires. Do you have the complete package, or only the sensor itself?As I understand it, this sensor provides two outputs, one analog (labelled A0) and one digital (labelled D0). The electronics module presumably senses the analog voltage on A0 and applies a threshold to it. Below the threshold D0 will be low, above it will be high. The pot allows you to adjust the point at which the change occurs.To use the analog output, you really need an ADC input on your microcontroller. The WeMos D1 mini pro used in this project only has 1 ADC input, which is used to measure the battery voltage. You would either need to...

    see more »

    Hi staxen, The link for the sensor took me to an aliexpress page. Is that correct? It shows the sensor itself (that goes in the ground) plus an electronics module and some connecting wires. Do you have the complete package, or only the sensor itself?As I understand it, this sensor provides two outputs, one analog (labelled A0) and one digital (labelled D0). The electronics module presumably senses the analog voltage on A0 and applies a threshold to it. Below the threshold D0 will be low, above it will be high. The pot allows you to adjust the point at which the change occurs.To use the analog output, you really need an ADC input on your microcontroller. The WeMos D1 mini pro used in this project only has 1 ADC input, which is used to measure the battery voltage. You would either need to give up that function, add an external ADC such as an ADS1115, which would connect to the I2C interface. To use the digital output, that can be connected to one of the ports provided on the PCB, such as Port 2 which gives you access to digital pin D8. If you let me know what your hardware is going to look like, we can then talk about software. Keith

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

    To make a single sided PCB, you normally need to optimise the pattern, and add links using copper wires between areas that can't be joined and need to be. In order to make it possible to add the copper wires, you need to make solder pads with a drill hole so that the wire can be put through and soldered in place. So I think it is quite a big re-design you would need to undertake. Possible? Yes. Easy? No. Keith

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

    Hi Kees / kverwater, Adafruit have published a library for the GY-1145 (SI-1145) which gives you access to the basic functions. Basically you will need to follow the example and copy the relevant parts of it into your code for this project. Although written for an Arduino Uno or similar, it compiles for the WeMos and I think it will almost certainly work for you. If you want the UV values to correspond to the real world, it will need to be exposed to it.To connect the DS18B20 you can use any connector you like, or no connector, so long as the wires are connected the right way. You may be able to use the "pluggable terminal" in your picture, simply by using the pins not according to their labels. However you need to check what the two components are doing, and possibly remove t...

    see more »

    Hi Kees / kverwater, Adafruit have published a library for the GY-1145 (SI-1145) which gives you access to the basic functions. Basically you will need to follow the example and copy the relevant parts of it into your code for this project. Although written for an Arduino Uno or similar, it compiles for the WeMos and I think it will almost certainly work for you. If you want the UV values to correspond to the real world, it will need to be exposed to it.To connect the DS18B20 you can use any connector you like, or no connector, so long as the wires are connected the right way. You may be able to use the "pluggable terminal" in your picture, simply by using the pins not according to their labels. However you need to check what the two components are doing, and possibly remove them. If they are for example LED (on the right) and resistor (on the left), they will need to be removed, and assuming the connections then go straight through you can use the 3 pins (right to left) as Vcc, Data, GND as per the PCB. You may need to add a pull-up resistor about 4.7K between data and Vcc.The software library DallasTemperature.h makes working with the DS18B20 quite easy. As for gas sensing, yes the BME680 looks like a good prospect. It still has a heater but the power requirement is probably manageable in the solar powered project. It operates on 3.3V so there is no voltage problem. I have not researched the Grove device. I don't know about WeeWX. When you get Blynk working you may find it meets all your needs. Keith

    Hi kverwater, Re your questions 2, 3 and 4 relating to the GY-1145, an external temperature sensor, and a MQ-2 gas sensor. The first two are addressed in Step 4. GY-1145 is an I2C device and can easily be connected to the provided I2C port. You can connect an external digital temperature sensor DS18B20 to port P2. MQ2 is a lot more complicated/difficult. It depends on how determined you are. First, MQ2 requires a 5V supply (+- 0.2V), which is not available because this is a battery powered project using a single Lithium cell. Also the power requirement is quite significant and may need significant change in the solar panel and battery capacity. It is not clear to me from the MQ2 data sheet how well the sensor will operate with a low duty cycle.Assuming you can solve the power supply que...

    see more »

    Hi kverwater, Re your questions 2, 3 and 4 relating to the GY-1145, an external temperature sensor, and a MQ-2 gas sensor. The first two are addressed in Step 4. GY-1145 is an I2C device and can easily be connected to the provided I2C port. You can connect an external digital temperature sensor DS18B20 to port P2. MQ2 is a lot more complicated/difficult. It depends on how determined you are. First, MQ2 requires a 5V supply (+- 0.2V), which is not available because this is a battery powered project using a single Lithium cell. Also the power requirement is quite significant and may need significant change in the solar panel and battery capacity. It is not clear to me from the MQ2 data sheet how well the sensor will operate with a low duty cycle.Assuming you can solve the power supply question, you can get the 5V required using a boost converter module to generate 5V from the 3.7V battery voltage.The next problem is that the output of the MQ2 is inherently an analog voltage level. Some modules are available with a built-in amplifier and threshold detector, so you can connect them to a digital input on the WeMos. However to get the best information possible from your gas sensor, you need an analog input. Since in this project, the single analog input on the WeMos is allocated to measuring the battery voltage, you either have to re-allocate that to your gas sensor and give up on battery voltage monitoring, or else add an additional ADC device. You can (for example) add an ADS1115, connected to the I2C port, which will give you 4 analog inputs, one of which can be used for the gas sensor. All these additional components needed to support the MQ2 would need an additional circuit board.In summary, adding a GY-1145 and DS18B20 is very simple. Adding an MQ2 sensor entails significant complexity but is possible. I hope this helps. Keith

    Hi kverwater, Re your question 1 about altitude: this value is generated by the line of code:float altitude = bme0.calcAltitude (pressure);If your device is located at a fixed altitude, this is probably not very useful to you, and you would be better off calculating the "normalised pressure" which is the pressure at mean sea level, based on the current air pressure (measured) and the altitude (known). To do this you could replace the above line withfloat normalisedPressure = bme0.calcNormalisedPressure (pressure, altitude);or in your case:float normalisedPressure = bme0.calcNormalisedPressure (pressure, 15);You can get more information about this calculation at https://www.instructables.com/id/Library-for-BMP28...I will have a look at your other questions and reply if I find ...

    see more »

    Hi kverwater, Re your question 1 about altitude: this value is generated by the line of code:float altitude = bme0.calcAltitude (pressure);If your device is located at a fixed altitude, this is probably not very useful to you, and you would be better off calculating the "normalised pressure" which is the pressure at mean sea level, based on the current air pressure (measured) and the altitude (known). To do this you could replace the above line withfloat normalisedPressure = bme0.calcNormalisedPressure (pressure, altitude);or in your case:float normalisedPressure = bme0.calcNormalisedPressure (pressure, 15);You can get more information about this calculation at https://www.instructables.com/id/Library-for-BMP28...I will have a look at your other questions and reply if I find something useful. Keith

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

    Hi clintonm8, Yes you can replace the buck converter with a different type. LM2596 will be OK. Keith

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

    Hi clintonm8, the load output voltage should be very low when the load is turned off (the voltage should be very close to zero) or should be very close to the battery voltage when the load is turned on. If you are using a 12 volt battery, that means the load, and battery, should both be about 12V (usually between 11V and 14V). You need to get both measurements to find the source of any problem. Keith

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

    Hi clintonm8,The two 0.1 uF capacitors are listed in the parts list as ceramics (step 1, item 10). The original circuit diagram shows a linear regulator (IC1 7805) but the parts list gives a buck converter (step 1, item 4). Either will work. The updated schematic (v2.01, attached to an earlier comment) shows a buck converter (based on MP2307). If you need to know more, please ask. Keith

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

    Hi Alan/Topspliff, Interesting that the different WeMos board could be responsible. I think the most likely explanation would be that the USB interface IC is different and is not being put to sleep when the ESP8266 goes to sleep. Anyway replacing with the original WeMos board type should clearly identify that as the problem (or not). About your panel generating only 4.4V, it is possible that a nominal 5V cell might only generate 4.4V if the panel temperature is quite high. The panel voltage goes down as the temperature rises. Where you live I expect you will have high panel temperatures, so you may need to use a nominal 6V cell with 12 cells in series or even higher. The boost converter in series is also a valid solution although it seems a bit complicated compared to additional cells i...

    see more »

    Hi Alan/Topspliff, Interesting that the different WeMos board could be responsible. I think the most likely explanation would be that the USB interface IC is different and is not being put to sleep when the ESP8266 goes to sleep. Anyway replacing with the original WeMos board type should clearly identify that as the problem (or not). About your panel generating only 4.4V, it is possible that a nominal 5V cell might only generate 4.4V if the panel temperature is quite high. The panel voltage goes down as the temperature rises. Where you live I expect you will have high panel temperatures, so you may need to use a nominal 6V cell with 12 cells in series or even higher. The boost converter in series is also a valid solution although it seems a bit complicated compared to additional cells in the panel.When you get your new WeMos I will be interested to know how the current changes. Keith

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

    Hi Topspliff, Can you confirm that you are seeing 4mA current consumption of the WeMos board, even when it is asleep? The current consumption budget for the WeMos is in Step 7. The TP4056 charging module should be using 0.05 mA (max 0.1mA). The BME280 used in single-shot mode will be using 0.0001 mA when asleep. If your WeMos has a CH340 USB interface IC, it is put to sleep when the processor goes to sleep, and uses 0.05mA when asleep.The voltage regulator RT9013 has a quiescent current draw of about 0.025 mA. The ESP8266 processor uses 0.01 mA when asleep. So during the "sleep" period between reports, the total current consumption should be of the order of 0.135mA. If you want to dig into why you are getting different temperature numbers with the Wemos and an Arduino Uno or ...

    see more »

    Hi Topspliff, Can you confirm that you are seeing 4mA current consumption of the WeMos board, even when it is asleep? The current consumption budget for the WeMos is in Step 7. The TP4056 charging module should be using 0.05 mA (max 0.1mA). The BME280 used in single-shot mode will be using 0.0001 mA when asleep. If your WeMos has a CH340 USB interface IC, it is put to sleep when the processor goes to sleep, and uses 0.05mA when asleep.The voltage regulator RT9013 has a quiescent current draw of about 0.025 mA. The ESP8266 processor uses 0.01 mA when asleep. So during the "sleep" period between reports, the total current consumption should be of the order of 0.135mA. If you want to dig into why you are getting different temperature numbers with the Wemos and an Arduino Uno or Nano, you probably need to look at the raw temperature reading and the associated calibration parameters that are used to convert into Celsius. Keith

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

    Hi tgray1, You are right, the schematic is not complete. The author has been working on a small upgrade, which will include a PCB. There will be a new schematic which is complete. The main changes are a) only one fuse which is now in series with the battery; b) replace temperature sensor with DS18B20.Keith

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

    Hi TimcoV, Sorry but I think you have not understood. Which is quite understandable, but it has led you down the wrong path. The average consumption is 9.3 mA - that is correct, and it is calculated from the charge consumption which is 93.13 mA-minutes every 10 minutes. A milliAmp-minute is a non-standard unit of charge. It means the charge carried by a current of one milliAmp for a time of one minute. The standard unit of charge is the Coulomb, which is the charge carried by a current of one Amp for one Second. It is easy enough to convert from milliAmp-minutes to Coulombs, but it just complicates the arithmetic. Whether it clarifies the concept is perhaps debatable. Anyway the key point is that the average current is 9.3 mA. This is the average current consumption over whatever period...

    see more »

    Hi TimcoV, Sorry but I think you have not understood. Which is quite understandable, but it has led you down the wrong path. The average consumption is 9.3 mA - that is correct, and it is calculated from the charge consumption which is 93.13 mA-minutes every 10 minutes. A milliAmp-minute is a non-standard unit of charge. It means the charge carried by a current of one milliAmp for a time of one minute. The standard unit of charge is the Coulomb, which is the charge carried by a current of one Amp for one Second. It is easy enough to convert from milliAmp-minutes to Coulombs, but it just complicates the arithmetic. Whether it clarifies the concept is perhaps debatable. Anyway the key point is that the average current is 9.3 mA. This is the average current consumption over whatever period of time you want to analyse, whether it be 10 minutes, 1 hour, 24 hours or a week. Now we come to working out the time that the battery will last, and the required size of the solar panel. For this we need to calculate the daily charge requirement. When looking at the daily charge requirement, again this could be in Coulombs per day, but it is more usual to use Amp-hours per day. Also battery capacity is usually quoted in Amp-hours. If this project uses an average of 9.3 mA, then it uses 9.3 mA-hours per hour, which results in 9.3*24 mA-hours per 24 hours = 9.3*24 mA-hours per day (since one day is 24 hours). In your question you wrote "Then you wrote that for one day, it is 24 * 9.3 mA." However what is written is that for one day, the consumption is 24 * 9.3 mAh. The vital difference is the "h". That is, the consumption is a charge, measured in milliAmp-hours, abbreviated mAh.I hope this anwers your question and explains how to do this calculation. The key is keeping the clear distinction between current (charge per unit time) and charge (current multiplied by time). Keith

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

    Hello Qasiml3, There is a link to the circuit diagram at the end of Step 2. 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 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

    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

    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 ЦветанС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.

    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 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

    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 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

    View Instructable »
  • 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, 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, 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, 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 »
  • 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 »
  • 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 »
  • 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)

    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 »