Display input voltage as bargraph on LCD using Arduino and potentiometer
HTML-код
- Опубликовано: 3 июл 2024
- **** Free Arduino Course worth $200***
Arduino Step by Step Course (over 150 lectures) Starts here robojax.com/L/?id=338
Will connect potentiometer to analog input and display the voltage as bargraph with provided code and library.
The best thank you for me is to not to skip ads and Subscribe 🔔 to my channel, like 👍 the video It is greatly appreciated. 🔔 😊.
I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe and enable the bell 🔔.😊
Download code for this video: robojax.com/L/?id=83
• Built Voltage Sensor w...
Required videos (must watch and install library):
1-Measure any DC voltage with Arduino: • Built Voltage Sensor w...
2-Using LCD with Arduino: • How to use LCD LCD160...
******Purchase this LCD1602 I2C from:*****
Amazon USA: amzn.to/3rBaFTw
Amazon Europe (all countries): amzn.to/38ryLsk
Amazon Canada: amzn.to/2N3B8tM
Banggood: www.banggood.com/custlink/GKD...
AliExpress: s.click.aliexpress.com/e/_AnNea4
***** Purchase Authentic Arduino Uno from ***
Amazon USA: amzn.to/2KApAwK
Amazon Canada: amzn.to/37LZ8sW
All Europe Amazon: amzn.to/36YDSzn
* Purchase item Arduino Board**
Amazon USA
- Arduino UNO(authentic): amzn.to/3glHgYp
-Arduino Mega(authentic): amzn.to/33P5sO1
-Arduino Nano (authentic): amzn.to/3onbH3s
- Arduino UNO(compatible): amzn.to/3ghPnp9
-Arduino Mega(compatible): amzn.to/3lXizTG
-Arduino Nano (compatible): amzn.to/3n3s5FO
Amazon Canada
- Arduino UNO(authentic): amzn.to/3qtwzrw
-Arduino Mega(authentic): amzn.to/36NwOpI
-Arduino Nano (authentic): amzn.to/39NPveJ
- Arduino UNO(compatible): amzn.to/36QA5ok
-Arduino Mega(compatible): amzn.to/36QA5ok
-Arduino Nano (compatible): amzn.to/36NwOpI
Jump to different chapters of this video:
00:00 Start
00:20 Introduction
01:07 Wiring Explained
03:16 Code explained
10:05 Demonstration
Tutorial by Ahmad Shamshiri form Canada
****************************
Arduino Step by Step Course (over 150 lectures) Starts here • Lesson 00 What is Ardu...
****************************
If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link paypal.me/robojaxTV
Follow me on Facebook robojaxTV
Follow me on Twitter: / robojaxtv
Follow me on Instagram: / robojax
Tutorial by Robojax.com
Get other projects code and learn Arduino
robojax.com/learn/arduino
*** AFFILIATE PROGRAM ***
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
#robojax #robojax_bargraph #robojaxArduinoCourse Наука
I love your videos, they help me a lot. Slovakia.
Thank you very much. Good to hear that.
A very good tutorial, thank you! 🙌
Thank you sir... best tutorial.....
Thank you Robojax!!
You are welcome.
EXCELENTE!!! PARABÉNS POR COMPARTILHAR OS SEUS CONHECIMENTOS COM AS PESSOAS QUE ESTÃO INICIANDO AGORA... QUE DEUS CONTINUE TE ILUMINANDO E TE ABENÇOANDO HOJE E SEMPRE!!!!
Muito obrigado. Estou satisfeito por você ter achado útil. Que Deus Todo-Poderoso te abençoe também.
@@robojax Bom dia!!! Neste mesmo projeto é possivel selecionar modo "ponto/barra" da mesma forma que se faz com o lm 3914? Obrigado!!!
Thank you
Thank very much sir👍👍👍👍👍
You are welcome.
thanks for sharing your knowledge very helpful video !thank you !
You are welcome. Here is Arduino Step by Step course worth $200 on Udemy, for free starts here ruclips.net/video/-6qSrDUA5a8/видео.html
Thanks
Your bargraph is the best and most versatile I have seen yet. Can you show how to have multiple instances on multiple lines at the same time preferably able to be called from an array? Thx
please check the examples provided with the library. you will find it.
@@robojax Actually I was referring to being able to call drawValue directly with a row number rather than having to initialize multiple instances of the library. The way you do it makes it tricky to call drawValue from within an array. Thx
Thank you very much
You are welcome.
MERCI
nice video!
Thank you.
Thanks♥️
You are welcome.
Great video sir👍. But how to show battery percentage?
I love the videos. can you suggest me videos programming using C to display voltage
Thanks. If you look at the Arduino library, they are all written in C language. You can do it but with extra efforts. I have not experience in using pure C with the help of Arduino.
Great
Thanks for the excellent tutorial. Your library directly references the i2c library. Is it possible to change this so it's not necessary to use an i2c adapter?
You are welcome. It would but LCD1602 without the I2C is very missy so I prefered the 4 wire version. The library can be fixed but it needs a lot of work.
Very good
Thank you.
Thanks. Please make a tutor " creating LcdBargraphRobojax.h" or something.
I will make a video on writing Arduino library, God willing
@@robojax Great! Loveit.
Olá, excelente tutorial, Parabéns! gostaria de tirar uma dúvida, tem algo errado com a biblioteca para download, pq da sempre erro ao adicionar, já fiz de tudo mas sempre da erro.
Oi obrigado. há um problema com o Google Chrome. Tente usar o Microsoft Edge ou Firefox.
Thankyou!
You are welcome. Thank you for not skipping the ads and keep watching them. This will help me a lot.
I like your video! You are very easy to follow! I'm a subscriber now! Thanks!
How Would I calculate what is maximum mA left in the battery?
I like to make a simple 18650 battery tester. What I want is VOLTS= mA= Battery resistance= and even more, if you can help!
Hi, Thank you for subscribing.
Battery is the most complicated component in today's world. If anyone can accurately understand the state of charge (SOC), they will dominate the EV (Electric Vehicle).
I have studied Batteryies at graduate level but haven't got a chance to make video as I need some components. I just got 18650 batteries and few chargers. I am wondering why other than EV people will need to use 18650 battery?
@@robojax I use them as a power-bank for projects. I recover these for free from old laptops! But I also purchased 8 new batteries, so I know what to compare it to!
When I get my new charger, I can provide some data. I do have several chargers, from inexpensive and USB charging in bank of 2-8 18650.
These batteries are - or can bee - very powerful! For now I also purchased from inexpensive to more expensive battery meters, but I get different results from one to the next tester, so I must make a Excel table and compare them more scientifically and side by side. I also use Arduinos, ESP8266 and ESP32..., Raspberry-PI and couple other boards, that I test or projects - 18650 will keep my simple projects running a long time, much better than AA rechargeable batteries - and I recharge batteries for past 50 years!
I wish my flashes for my Nikon cameras use 18650! I'm thinking to make battery power-banks and put them on a belt and wire plugs into the flash! Lots of projects, so little time! ha ha ha
Wwhat's that chip connected to the back of the lcd
do i have to get it in order to display the the voltage or is there any other way of wirring
I have separate video on the LCD, the link for that is in the description. I always put extra stuff in the description so check them out.
i can use two bars for two infos?
I believe I have shown it. If not in this video but I have so many of this bargarph videos search for them
👌👌👌
Thank you. Sorry I missed your comment. RUclips now allows me to see comments I have not replied to.
Great video sir... Really helped.. Just 1 Question how to make same but for voltage more than 5v. Like for 7v or 8v using potentiometer.
@@robojax Sure Sir. Will do the same hope it helps.
Learn from this video how measure any voltage ruclips.net/video/t8xwrVj2aFs/видео.html
is there a way to have amperage instead of volts display?
yes. just search my channel for voltage and LCD. Here is how to find Specific RUclips Video in a channel bit.ly/findRUclipsVideo
Thanks a lot forr his video. I have a questiion. I would male a rpm counter for my spinning cyclette and i put your library in the sketch. I suppose that max rpm value Is 150. Right code is lbg.drawValue (PPM, 150)? Or lbg.drawValue (PPM, 1024)? Thanks in Advance
this is very slow for that purpose. RPM or anything would be very fast.
😍😍😍😍
Thanks Yogesh.
se puede aplicar para esp8266 NODEMCU , desde ya gracias buen video
No lo he probado pero debería funcionar.
how about a css progress bar . cant find those tutorials for esp 32!
Search my channel. ESP32 Tutorial 43 - IoT Internet Weather Station | SunFounder's ESP32 IoT Learnig kit
ruclips.net/video/B73KTaBaqhs/видео.html
@@robojax css meaning its part of a webpage not an lcd display
I want to display the voltage reading controlling with potentiometer with LCD AQM 1602 using Raspberry pi 4 with C programming. I'm waiting for your response . thank you .
this video is focused on Arduino. In the future I might have Raspberry Pi videos.
Why do I get an error message"No matching function for call to 'LiquidCrystal_I2C::begin() . Do I have the wrong Liquid crystal library?
because you did not watch the video fully and skipped one of the important part where it ask you to do something. this video requires two other video to watch. I can assure you that you will not have any question left unanswered.
Did you have the flow chart of this?
I have explained this fully. Just use a tool to make flow charge. here is a free website to create flow chart www.visme.co/flowchart-maker/
Hello everyone,
I can't find a link to LcdBarGraphRobojax anywhere. I found LcdBarGraph without Robojax, but when compiling it reports an error in the line where this file is as follows:
no matching function for call to 'LcdBarGraph :: LcdBarGraph (LiquidCrystal_I2C *, int, int, int)'
I don't know how to proceed. Can anyone advise me, please? Thankyou
Hello, you made me download the zip and check it. 1-Follow the link in the description so you are taken to the page where the code is. 2-Download 3- install see it here snipboard.io/uiLGso.jpg
Good day please can I get the code for speed? Or video, am working on the same thing but with speed not vote
Speed of what? Rotating motor? It would be just a value . Pay attention to the code and pass the your speed value to this code. You can learn it from other examples of bar graph. I have many videos in this.
possible to do that with an extern potentiometer and an voltage of 36v?
Hello, please watch this to measure any dc voltage ruclips.net/video/t8xwrVj2aFs/видео.html
@@robojax thanks a lot mate! very helpful video
Nice video. But i had a question, i want to display 12 volts not 5 volts plz tell if the lcd will be damaged or not by 12 volts.
I just checked it. The link is in the description titled "related videos" . Always check description of my videos. I have included very useful links there.
Your didn’t reply back? I should have replied. Always appreciate when people do something for you. World will become a better place.
hi sir, what if we wants to read voltage about range of 12V
No you can't . Maximum input voltage for Arduino is 5V. I will make video soon to measure any voltage with Arduino. make Sure to subscribe and leave the notification on. I have a video on using voltage sensor here ruclips.net/video/FaoKzi7tgME/видео.html where you can measure up to 25V DC.
I'm using a voltage divider in my vehicle (12VDC nominal). Works great. A 20K and 10K resistor has a 6.58mW dissipation for a 3:1 ratio
I am making battery charger for lead acid battery so I want to display battery charging percentage with help of Arduino nano and 16*2lcd so what will be code ?
12v battery
I have included the link to this video in the description ruclips.net/video/t8xwrVj2aFs/видео.html where you will learn how to measure any DV voltage.
@@robojax thx sir for helping
Sir this video is amazing but I want this for 12 v instead of 5v pl can you help me how can I can I do it
when you use Arduino, Arduino board has VIN input where you can connect your 12V and the LCD and Arduino will power up. Or you can connect the 12V to the power adapter connector. see this image circuitjournal.com/img/articles/6_arduino_power_pins/VinPin.jpg?v=17
@@robojax thanks for replying sir I want to make 12v battery indicator like this so how can I do that I understand previous message but I want to make it battery level indicator pl tell me thanks
Please watch this video ruclips.net/video/t8xwrVj2aFs/видео.html and learn about voltage divider. Then your potentiometer will be 1 of the resistors apply the same principle. here anotother video for voltage sensor robojax.com/learn/arduino/?vid=robojax-voltage-sensor. good luck.
@@robojax thank you so much sir
Sir how to change the display voltage of 5 volts to lcd and show 500 volts instead of 5 volts?thanks
Search my channel for reading any voltage
@@robojax Thank you sir.
where to Find LCD Bargraph Robo Jax Library?
Link in description. Or go directly to Robojax.com
When someone responded to your question, you rely and say something. It would be rude otherwise. We are Muslims. You did not say if my reply or not.
How can I make this work with 12v input
connect your 12V via power adapter jack to Arduino.
@@robojax sorry, I meant I want a bargraph to read from 0 to 12v. I have a water level sensor and I want to use an lcd for the readout but the gauge is a 12v scale
then watch this video to bale to read any voltage using Arduino ruclips.net/video/t8xwrVj2aFs/видео.html
Actually I went to post he link in the description of the video, and found it was there. I wish you had checked description of the video.
exit status 1
no matching function for call to 'LiquidCrystal_I2C::begin () ' Could you help? I'm gating this error. Thanks
You have escaped the video. Watch again and you will know. I have explained it.
@@robojax watched the video but still cant do it
@@robojax i have the same problem
Try to replace "lcd.begin()"; with "lcd.init();". And add "lcd.backlight();" if necessary.
there is a mistake in your code and people get an error with rjx
because you write lbg and under you try add rjx but it should be lbg in this line rjx.clearLine(1); instead rjx--> lbg
and same thing in line under
you must be referring to other code. I just checked it and there is rjx in this code. Follow the code from the link under the video and you will see there is no error.
Please correct Spelling of bar graph in Thumnail
LOL. Thanks for letting me know. I will when I get home.
Plz sir help.me regarding this
See my other comment
there is a error [code]
LCD begin
#include
#include
#include
byte lcdNumCols = 16; // -- number of columns in the LCD
byte lcdLine = 2; // -- number of line in the LCD
byte sensorPin = 0; // -- value for this example
LiquidCrystal_I2C lcd(0x38,lcdNumCols,lcdLine); // -- creating LCD instance
LcdBarGraphRobojax lbg(&lcd, 16, 0, 0); // -- creating 16 character long bargraph starting at char 0 of line 0 (see video)
void setup(){
// -- initializing the LCD
lcd.begin();
-//GIVES a error
lcd.clear();
lcd.print("Robojax");
lcd.setCursor (0,1); //
lcd.print("voltage Bargraph");
// -- do some delay: some time I've got broken visualization
delay(1000);
}
void loop()
{
lbg.clearLine(1);// clear line 1 to display fresh voltage value
int inpuValue = analogRead(sensorPin);
// -- draw bar graph from the analog value read
lbg.drawValue( inpuValue, 1024);
// -- do some delay: frequent draw may cause broken visualization
float voltage = inpuValue * (5.0 / 1023.0);
lcd.setCursor (0,1); //
lcd.print("Voltage:");
lcd.setCursor (8,1); //
lcd.print(voltage); // print
lcd.setCursor (12,1); //
lcd.print("V");
delay(100);
}
it says you skipped the video and did not follow the instruction. I just watched it and clearly said. please watch and do not skip. I have spent hours to make this video so it work without any issue.
In the LiquidCrystal_I2C "lcd.begin();" is expected to have two arguments in the (). This is redundant. Just replace it with "lcd.init();" and the sketch works perfectly
Red for ground and black for +5V? Not good...!
Yes. I don't like it either but the bunch of wires I got can never be organized in correct order. Also many item that have wires, it seems in China they don't care about wire color conventions.
This does not work?
one of many lines in error report.....
graph.ino:61: undefined reference to `LiquidCrystal_I2C::setCursor(unsigned char, unsigned char)'
you clearly see that I am demonstrating it and it is working. You must Watch the main LCD1602 video and use the library I provided for LCD. Then the library for bargraph. Please watch without skipping.
@@robojax My apologies..seems i had an issue with library conflicts. I have it going now, and it is perfect for my project. Thanks so much for your work
Hello Sir, im trying to upload you library for the bargraph, i have installed liquidcrystal_i2c from previous projects. I have download your file, but when trying to upload the zip i get the message "Error 13, INTERNAL library install failed, archieve is not valid, multiple files found in zip file top level." I have decompressed the zip and they are a lot of files, which i have to keep and make a new zip again please?
Hi, you don’t decompress. Just add the zip file
If you did use the bar graph once then you don’t need to add it again.
@@robojaxwhen i try to verify the code i get this error, C:\Users\George\AppData\Local\Temp\.arduinoIDE-unsaved2024230-11000-151q16u.vwka\sketch_mar30a\sketch_mar30a.ino:29:10: fatal error: LcdBarGraphRobojax.h: No such file or directory
#include
^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
exit status 1
Compilation error: LcdBarGraphRobojax.h: No such file or directory
When im trying to upload your zip file as i have download from your site, uncompressed, just download, and as your instructions, i get this message, "Error 13, INTERNAL library install failed, archieve is not valid, multiple files found in zip file top level."
very simple it says "LcdBarGraphRobojax.h: No such file or directory" it means file not found It means you skipped the video and did not install the library. Please watch and follow. I have said nothing extra except to teach you learn.
Arduino: 1.8.15 (Windows 10), Board: "Arduino Uno"
C:\Users\Sajjad\Desktop\project_code1\project_code1.ino: In function 'void loop()':
project_code1:50:7: error: 'class LcdBarGraphX' has no member named 'clear'
lbg.clear(1);
^~~~~
exit status 1
'class LcdBarGraphX' has no member named 'clear'
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
sir this potentiometer is 10k?
1k to 500k no problem
@@robojax ok thank you
😆
lcd.begin(); is error
What does it say? Have looked at the description of this video? You need to watch the video of LCD so you can print simple text on the screen first
you didn't reply? Always when someone takes time to do something for you, just reply. I can help you if you reply.
@@robojax no matching function for call to 'LiquidCrystal_I2C::begin(int)'
but I already copy the zip file. sorry for the late reply I have a slow internet connection.
Used: C:\Users\Dominic\Documents\Arduino\libraries
obojax-LCD-bargraph-Library
Not used: C:\Program Files\arduino-1.8.13\libraries
obojax-LCD-bargraph-Library
exit status 1
no matching function for call to 'LiquidCrystal_I2C::begin()'
Yes the library is missing.
Please watch this video where I have shown how to install library in an easy way ruclips.net/video/XGsT-0P0gMU/видео.html
I am working on a project to synchronize motorcycle carbs and I want to display two bar graphs only from 2 analog pin inputs. I can't seem to get the code right to make it work, any ideas on what I need to do, I did get the code for the video to work fine so one bar graph is good, just trying to get the second one to display. A0 for the first input and A1 for the second. Here is a link to my video ruclips.net/video/oOD81qLYSa0/видео.html
here is a link to the INO file: drive.google.com/file/d/14ljWNKRw2Vlk_3U35RWhAD0HxVCyU_Vw/view?usp=sharing
@Todd Morrill
Got it
PM me
sir your idea is copied by free circuit lab channel
No problem. I am here to teach people. Let's help others learn. World will become a better place if we help people learn.