Connections solar cell + LCD display without the USB power supply of the Arduino UNO

Hello, I am currently carrying out an internship assignment where I have to automate a door for a solar-powered chicken coop.

Currently, I have carried out a test setup with the help of an Arduino UNO board, a solar cell, an LCD display (stacked on a prototype shield board made by my internship supervisor), a 3.7v lipo battery of 1200 milliamperes per hour, 2 resistors of 330k Ohms, and a rectifier diode.

I made an assembly where the Arduino UNO measures the voltage at the terminals of the solar cell, which emits a different voltage depending on the level of luminosity detected, and the voltage in question is displayed on the LCD screen thanks to the lcd function .print.

I used this diagram that my internship supervisor advised me to measure the voltage of the solar cell:

Note that the rectifier diode allows the lipo battery to avoid discharging.

Here is the assembly I made:

I’m measuring the voltage with analog pin A1, and all the Arduino UNO pins needed to run the LCD display (D4, D5, D6, D7, D8, D9, D10, 5V, and GND) are connected via the green jumpers on the shield where the LCD Display module is stacked.
We can also notice that another GND pin of the Arduino connected to the ground of the solar cell.

I then program the Arduino with this program which consists in displaying the measured voltage on the LCD screen:

// LCD Keypad Shield
 
#include <LiquidCrystal.h>
 
// Création de l'objet lcd (avec les différents ports numériques qu'il utilise)
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
 
// Variables
int lcd_key     = 0;
int adc_key_in  = 0;
 
// Constantes
#define btnRIGHT  0
#define btnUP     1
#define btnDOWN   2
#define btnLEFT   3
#define btnSELECT 4
#define btnNONE   5
 
void setup()
{
 lcd.begin(16, 2);              // Démarrage de l'écran
 lcd.setCursor(0,0);            // Positionnement du curseur au début
 lcd.print("Mesure tension"); // Message

}

void loop() {
  
 lcd.setCursor(0,1);            // Positionnement du curseur début de ligne 1
 lcd_key = read_LCD_buttons();  // Lecture des touches
 
 // Mesure la tension sur la broche A1
  int valeur = analogRead(A1);
  
  // Transforme la mesure (nombre entier) en tension via un produit en croix
  float tension = valeur * (5.0 / 1023.0);
  
  // Affiche la mesure de la tension sur l'écran LCD et attends 500ms
  lcd.print(tension);
  lcd.print("V ");
  delay(500);

}

// Fonction de lecture des touches
int read_LCD_buttons()
{
 adc_key_in = analogRead(0);   // Lecture du port analogique
 
 // Les valeurs qui suivent doivent être adaptées au shield
 if (adc_key_in > 1000) return btnNONE;   // En principe 1023 quand aucune touche n'est pressée
 if (adc_key_in < 50)   return btnRIGHT;     // 0
 if (adc_key_in < 195)  return btnUP;        // 99
 if (adc_key_in < 380)  return btnDOWN;      // 255
 if (adc_key_in < 555)  return btnLEFT;      // 409
 if (adc_key_in < 790)  return btnSELECT;    // 640
 
 return btnNONE;
}

The program runs smoothly, with the text displaying the voltage appearing on the screen without issue.

However, you can observe in the diagram that the assembly is powered via the USB port of the Arduino board which is connected with my laptop.

Instead, I want to power my Arduino board with another source so that I can test my hardware outdoors without carrying my computer around all the time.

So, I tried to modify the assembly by unplugging the USB port and placing another lipo battery across the solar cell, and also connected with the 5V and GND of the Arduino.

However, by powering my assembly, the LCD screen lights up, but the text does not appear.

After several tests carried out, it seems to me that the text only appears if the LCD display is powered by a voltage of 5V. No ?

Could someone tell me how to fix the problem? What kind of editing would you suggest to me?

Thanks in advance if anyone answers me.

Oh dear. Considering that you have now applied something in the order of 8v (lipo’s charge up to 4.2v)
You may have broken something Or did you put them in parallel ? Does the setup still work when you plug it back into USB ?
What you can do is put 2 lipo’s in series and connect that to vin on the Uno. Then tap 5v from the UNO’s 5v pin to the LCD. The regulator on the UNO is not very big, but i think it should suffice for the LCD. Or you could add a 7805 regulator in TO-220 package and let that provide the 5v.
Working with LiPo batteries is tricky in general. They need to be charged in a particular way (constant current) and generally extra hardware is required for this, either breakout boards that can be modified to suit the proper battery or just by individual components. Charging a LiPo battery at a current to high is very dangerous, the battery may explode !
The other complication is that when fully charged they provide about 4.2v , and they are considered fully discharged at at 3.7v (and fully F^&%ed at 3.6v) Again there are special chips and sometimes breakout boards that can monitor the charging level and cut off supply before this happens.
The are also units available that provide 5v from a LiPo battery ( a voltage doubler + regulator)
Anyway you can get an all in one unit for this. Charger / monitor / doubler + regulator. All that those require is a 5v input for the charger.
Unless you do this right, you should use a different type of battery.

Hi.

Thank you for your answer.

It is true that it is too dangerous to connect a lipo battery at too high an intensity, but I would like to supply my assembly with these batteries since my internship supervisor uses them to make his doors.

Of course, I can always change the battery model, but for now I would like to know the possibility if it is not possible to edit with it.

This is what I achieved:

I modified my assembly by trying to follow the indications that you recommended to me, either to connect the 2 lipo batteries in series and to connect them to the VIN of the Arduino.

But this time, the display does not light up. Did I make a mistake somewhere?

Could you please draw me some hints on the photo I sent you (with PAINT) to tell me what to plug in and where?

Thank you in advance.

Well on the picture the batteries are in parallel.
My suggestion was to put these in series, for that you should unplug them from the side rail of you breadboard, and connect them to some holes in the center so that a black wire from one battery connects to a red one from the other. Now if you measure the voltage across the black and red wires on the batteries that are not connected, you should get something in the order 8v (But check !!)
Now first connect the VCC of the LCD to the 5v pin of the UNO (now it is connected to the v+ of the battery rail, but since those are somewhere else now it should not be connected atm) Check to see if you connect the USB cable that all works as before.
Now disconnect the USB cable and connect the 8v+ of the batteries to VIN on the UNO and GND to GND. The LCD should work.
If it doesn’t (and by that i mean if the UNO isn’t working either) disconnect the LCD and if it starts working thereafter then the LCD is taking more current than the voltage regulator on the UNO can provide (it should suffice, but not all UNO’s have the same regulator & PCB heatsink), and you will need a separate regulator to reduce the 8v to 5v for the LCD (and you may as well use that for the UNO as well)
It is really hard to see properly how you have connected things accurately from pictures. You can use paint to draw a diagram, that would be much better
Using_UNO_VINto5v

thank you again for your answer.

I would like to make the diagram, but first I tried to measure the voltage of the 2 batteries in series:

By measuring the voltage with a multimeter, I see that it is 0V. How come ?

Have I made any connection errors?

You must have done. what do you measure as a voltage on the individual batteries ?

To measure the voltage I use this multimeter calibrated at 20 V direct current:

Is this the right caliber? Or do I have to do it differently?

I can’t tell from the picture. Is the dial actually pointing at the 20v or is it pointing 180deg at 2mA ?
Are the cables in the correct input ? (i can’t read what it says on their input)
Are the cables pushed in far enough, check by setting it to ‘Ohms’ and connecting the end of the multimeter.
I recon the batteries should be ok, they look new, but it would be good to see if maybe they need charging. (still 0v is probably not what you should get even if they are flat)
Wat happens when you connect a LED with a 1K resistor to the battery ?

Hi,
Can you measure the voltages indicated below.

Va at the top of the plug where the battery leads are connected.
Vb at the top of the plug where the battery leads are connected.
Vc at the point where the blue wires go into the protoboard actually touching the metal wire.

Thanks… Tom… :grinning: :+1: :coffee: :australia:

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.