#9 Arduino Data Logger with Direct Input to Excel
HTML-код
- Опубликовано: 25 июл 2024
- I build a Datalogger with keyboard input to Excel. It can measure volt and ampere and two additional analog signals.
I use it to check-out the buck converter of my previous video.
As promised, I use here the prototyping PCB aproach to build it.
I enhance also the precision of the built in analog-to digital converters (ADC) of the Arduinos.
The coding is on Github:
github.com/SensorsIot/Data-Lo...
Here you find the source for the precision incres for Arduino ADCs:
hacking.majenko.co.uk/making-a... Наука
Thank you for your informative reply. I will purchase a Leonardo as instructed, as I must have this setup in my lab.
This has been something I was always wondering how to do it, thanks !
You are welcome!
Logging data directly into Excel, a great job Herr Spiess.
+Mohammad Nasucha Thank you for your compliment. I use this feature from time to time and it is really handy.
This is the most practical idea that can only be applied by a man who has an engineer brain. With Thanks, Respects and Congrats!
You are welcome!
Pure amazing since the beginning of this channel .. thank you so so much sir 🙏
You are welcome!
I must be getting old, because I missed the part where you explained how to get this into excel. After a lot of searching, I found the keyboard class, which requires a change to the Arduino Tools-USB menu to even get it to compile, and at least in case of the MAC, some security hoops to jump through to authorized that as a keyboard. I made a big mistake where the Teensy kept putting out characters, overrunning my computer, and I could not get my Teensy to reprogram because it was too busy talking to listen. After quite a bit of playing around, I found I could stop the program and put it into programming mode with the pushbuttons so I could bootload a fixed version of the program. Great videos - please keep them up!
I think I mentioned the "off" button because it happened to me, too...
I was looking for a way to log the sensor value realtime and boom. you're the best
+양태양 Thank you very much! I am glad it helps you.
This is amazing
Hello,
Can you add links to modules you used?
Thanks
This is like Mind Blowing AWESOME! Your abilities are out of this world! You have to be an alien! Where do you park your UFO? Sheesh, I'm just getting into data logging. And I never would have thought that this was possible! Automatically inputting data onto you pc. WOW!
Thank you for your nice words!
this is great - i am currently playing with ina219/acs712. I want to build something to log the efficiency of dc-dc converters, and check batteries.
i came across the same problem in a previous project - how to calibrate the adc. you can be even more precise, if you use the sleep mode on the arduino when measuring the bandgap voltage/analog pin. it removes a lot of the jitter. also - if you have a analog pin to spare, hook up a lm336-2.5 voltage reference. measure the voltage reference and use that to calibrate the bandgap voltage. you can write this value to the eeprom, or have it calibrate automatically from time to time.
if you wanty more info, get back to me.
+KiSwiSje Thank's for the tips. I also have a INA219 to play with, but had no time. I think, if I have to have an external component I would not go for a voltage reference, because the Arduino only has 10 bit resolution. Then, I would go directly for an external ADC like the ADS1117 (my video #18) or for current measurement as you propose, to the INA219 which also has 12 bits.
Hi Andreas, Do we need to remove the PC keyboard to detect Arduino micro as a keyboard.
No. You can have more than one "keyboard". The Arduino types in parallel. This is, why you absolutely need a possibility to switch it off!
That's very nice. I love your ideas. Keep doing.
Bon travail!
Merci!
I just love this!
I want to know. So I build a contraption that give the answers automagically.
And your "swiss accent" is just right. You'r not talking like a gatling gun, so people not having english as their first language can easily follow what your'e saying. Good, as I have huge problems following a monologue in "switzerdeutsch". :-)
That is why I change to "Swinglish" (Swiss English) after the first Swiss German word (Grützi)...
I must be missing something. Can't you just write to serial from the Arduino and have a little program on the PC listening and writing to a file?
You required additional USB-Serial converter & a PC app to do the task. I do agree, if you have PC app, i will open lot of other possibilities.
Hi Sir, great job but perhaps you could enlighten me.
How do you key-in the data into Excel? I don't understand the concept.
Thanks
This is described in the video. The Arduino keys in the data. Maybe you watch it again.
www.arduino.cc/en/Reference/KeyboardPrint
I'm new to all of this. How exactly did you get the data to go directly to excel? Did you write a code on Arduinos IDE? Thank you!
Maybe you watch the video again. I cannot explain it better.
I'm wondering you project is wired so could it possible to key in the data through wireless?
Everything is possible. I do not know how to do USB wireless.
very helpful
Thanks!
Thanks for valuable support.
I tried your code but it shows me an error
'keyboard' only supports on the Arduino Leonardo
Please guide me
Ehtesham Nisar Ahmed you need an arduino micro (see 2:39) or a leonardo. The other arduinos do not have usb support
Andreas Spiess
ok thanks
Good day sir.
I wanted to know how to get date onto the excel using this method.
Thank you.
+lohit madiwal I think, I explained thw way in my video. Where do you see problems?
www.arduino.cc/en/Reference/KeyboardPrint
Dear, Im making a project with the rc522 (RFID) to log onto computer directly, now i need to run rc522 on 3.3v while the micro gives 5v through usb, any work around ?
Thanks for your time and beautiful channel
You can use a voltage regulator for Vcc and a "level shifter" for the pins. Maybe you google to find the details
I am 72 years old retired Telecom Engineer and my hobby is Arduino. I really admire your Videos and a staunch fan of your articles. Your data logger project is, one of "The Best" and I am really fascinated by it.
I assembled it and it works, but the Voltage readings shows, 888 milli Volt for 3.7 Volts . Is there any multiplication factor to be set or any calibration process involved. Please show me the few lines of code that handles the calibration to get correct reading. Thank you for your service to our DIY electronics community. With Great Regards, Ragothaman R.
The Arduino should show 1023 at 5 volts at the input. If you want a voltage reading you need this formula: float voltage= sensorValue * (5.0 / 1023.0);
I made also a video if you want to improve accuracy of the Arduino ADC
Thank you for your immediate response. I will check and correct.
A pleasure to watch your videos, is like Terminator teaches you electronics. Can you make a system that can Bottom Balance the 18650 easy ? I have one simple ideea and that is to use the latest Tp 4056 usb (5v) charger that in theory has a cut-off on output voltage @ 2.5 but this will need to be tested and the other one is to use a more clever setup (I have all the faith in your ability :) ) that use "1-8S Lipo/Li-ion/Fe Battery Voltage Tester Low Voltage Meter Tester Alarm OE" with relays .
Thank you!
+fumezflori Batteries are only a component for me and I do not care too much about them. That is maybe the reason, why I do not understand which problem should be solved and if it is already solved by somebody else...
Whats the best way to set the middle pot? The multiplier? Does it actually lower current to the battery or just turn on an led?
I think I once made a video about this board.
Hi seeking for help in this project currently on going ,any code done for si1145 uv/ir/lumens sensor with rtc to excel
No, I did not use this sensor
How log it kept logging data?
In excel
Great simple idea!
Thanks!
need to send excel command to the esp8266 12e is this possible ?
and that the board send me the temperature and current information.
you have the code or a book that has to sell me ?
+Bento Souza Can you explain a little more your scenario? With this short description I not yet understand what you want to do.
But where can I get one of those blue Gamecubes? How can I input into Excelsior without the gamecube
You have to build it yourself using an Arduino and my video.
Did you have anything that prevented excel from loosing focus, which would mean data loss?
Das Kässpätzle No. I do not use the PC during data acquisition. I did not find a better way.
There is a function in excel to auto save say every 10th line or so. You set how often you want the data saved.
hi bro how can i be able to split the data cause in data streamer in excel the data shows together in one column, i would like to see the data in to different column. for example analog 0 store data in column 1 then analog 1 store data in column 2. something like this , thanks
The Arduino just creates keystrokes. So your program has to generate the proper keystrokes to fill out the columns you want (add TAB, for example)
Hi. Can i log the data directly into a pendrive?
I do not know. This is a solution to log data to Excel or Open Office or a text editor and if you press "save", it is on the disk.
greetings, can i ask how to connect your data logger in the 3 phase distribution panel?
You need special sensors for that. I made a video on how to measure AC. However I would use a wireless commercial device like the Shelly 3M
thank you....
You are welcome!
Do you have a wiring diagram available. Mostly how the switch is used? Are you using just NO Contacts or more?
+marboenterprises I now published the diagram as a pdf file to Github (link is in the comments). The connection to the PC is done via the USB plug of the Leonardo or the Micro Pro.
+Andreas Spiess Thank you very helpful.
Sir is it mandatory to keep the excel file open for the continuous logging details ?
Yes
@@AndreasSpiess thank you sir for your valuable reply .
sry to trouble you with one more doubt,
Is there any possibility to get direct input in file format without opening any file (may be direct com port indication to file or someother way ). Just striked my mind ,if I'm wrong pls correct me sir !
I only know this method. But I am sure you will find others.
@@AndreasSpiess thank you sir 😀
thanks for sharing, this could be the easiest way, but a more proper way would be to design a system using a SD card shield, and store your data in CSV files on your card. This way you don't need a PC, it's a small reliable embedded system that helps you save energy, you can leave it on a remote mountain for months as long as your batteries last.
There are many ways to capture data. This is only one. I started with the SD card and it worked. In the lab, this method is faster and simpler for me. But it is only a tool for my projects, not a product to deploy as you envisage.
The third possibility is to connect the data logger directly to the cloud. This is what I did in my recent projects. Then, you also have immediate access to the data.
Addd a raspberry pi type board and connect to a network. Excel can read .csv. too. Keyboard looks like a great method for real time updates!!!
Nice! Is there a way I can do this for 100 amps and more, for large batteries?
If you find an Arduino compatible sensor, why not?
@@AndreasSpiess did some research, and it appear all I need is to use the voltage across a shunt. Thanks for the video!
I have been looking for something like this for my battery reseerch project. I may be asking too much to ask you if I can buy one.
You have to buy the hardware and program it yourself, I think.
Thanks
„I love that they work when I sleep“.
After 35y working with them, computers often kept me away from sleeping.🤠
True :-))
Super Idee das über direkte Tastatureingabe zu machen. Fand das über SD auch zu umständlich und wollte das eigentlich über die serielle Schnittstelle zu Processing übergeben und dann in eine Datei oder Excel bzw. OpenOffice. So geht es natürlich viel einfacher und ich sehe sofort was ab geht! Wie verhinderst Du das sich irgend ein anderes Programm, Update oder Windows-Meldung in den Vordergrund drängt?
Diese Methode is sehr bequem, aber hat natürlich diesen Nachteil, dass sie einfach die Tastatur übernimmt.. Bei mir ist es in der Regel nicht das Problem, dass eine andere Applikation den Fokus kriegt, sondern, dass ich vergesse, dass da was läuft und ich mit der Maus ein anderes Programm wähle. Dann gibt es natürlich eine "Sauerei". Ich habe mir angewöhnt, dass ich während diesen Experimenten einfach den PC nicht berühre.
Mit der Scriptsprache AUTOHOTKEY könnte man evtl. Maus sperren und Excel im Vordergrund sowie aktiv halten!
as per your last direction, i purchased Leonardo and used the code given by you but one problem is occurring...
when LEO is importing data to excel it is continuous in a single row, from left to right
please guide me how to make it as in your video
Regards
Did you add Keyboard.println(char(13)); where you want a carriage return?
Andreas Spiess got it
Thanks
:-)
Keyboard.println(char(13)); was not working then i searched then found that return function can work by using Keyboard.println(char(176));
Now, its working fine as per my expectations
Thanks for valuable support
what is the minimum level of current you can measure... ?
+Electromania The hall sensor I used is made for higher currents up to 5A and as described in the video not very exact, especially not for small currents. Its advantage is the complete separation of measured circuit from the Arduino.
If you want to get better results for small currents I suggest to use the INA219 board:
de.aliexpress.com/item/INA219-I2C-Bi-directional-DC-Current-Power-Supply-Sensor-Module/32477303639.html
I have one and will make a video in the near future to compare the two sensors.
Thank you. Sounds very good.
I am interested in logging my serial port data into excel. How have you done this ? is there any specific library or addon for excel ?
I googled and found this, PLX-DAQ Spreadsheet. Is it the one you are using.
+Andreas Spiess
I made managed to log into excel spreadsheet using PLX-DAQ.
Thanks.
+Electromania Good to hear. No, I do not use the serial connection. I use the Leonardo and its USB (keyboard) function.
thanks.
sounds interesting, I didnt knew Leonardo has such option. i just found it has inbuilt usb connection.
Hallo Andreas,
das ist ein tolles Projekt, aber wie bekommst Du die automatische Eintragung der Werte in Excel hin?
Ich simuliere ein Keyboard mit dem Arduino.
Is this possible with an Arduino Zero? I have tried to compile and there appears to be an issue with EEPROM.
I understand it's emulates EEPROM, and has similar keyboard/mouse capabilities.
So a little unsure on a how I might make this work on a Zero.
Could someone please explain if this is possible and a starting point To getting this to work.
I don't have a Leonardo, and 3 weeks from China😂 so hoped my Zero could do the job.
Mr Spiess, could you add the Zero to a tutorial, so I can see its capabilities and how it could be used for testing etc
Thank you Andreas
+Dean Greenhough There are three issues:
1. As you described: The EEPROM
2. The correction of Vcc is also for 8 bit processors and will most propably not work
3. Maybe the keyboard() functionality also does not work
Summarized: I would wait for your Leonardo or use a micro (it has the same processor as the leonardo)
Concerning the Zero: According my opinion there are too many different Arduino processors around and for the moment I have no plans to use the zero. I already have my fair shares of problems with the MKR1000 (same CPU). But this can change in the future...
Thank you for your advice. That has saved me many hours of work. I have ordered the Pro Micro with a smile on my face.
Your advice is appreciated
Hi Sir,
Plz share link of Windows app or plz tell me how to configure "Excel" to receive serial data?
Excel needs no configuration. The Arduino emulates a keyboard.
@@AndreasSpiess ok Sir
I am very sorry to disturb you again, please tell me how do I increase the sampling rate to one sample for every 1 minute. This is to have data logging for a week or so. Please reply.
You should be able to influence the delay with this statement: while (millis() - tt < 1000) {} (line 138)
Dear Mr. Spiess, thank you for your advice. But if I increase the value to more than 3000, it is not working unless I increase 3000 in the line " if ((millis()) - tt) > 3000) break;" to a higher value than that. Please advice.
I did not analyze the code. But obviously, you found the solution. This is a good example to improve your programming skills. Use a lot of Serial.print(xxxxx) statements to understand what happens in this code.
Is there any way to log the data without emulating the keyboard?
Yes. Then you have to install a receiver software on your PC.
@@AndreasSpiess What software is needed?
Maybe google knows. I never tried.
Andreas: great stuff, thanks again. I think of your videos as I used to think of the library: and endless resource.
Readers: The second link in the notes - It has moved to hackingmajenkoblog.wordpress.com/2016/02/01/making-accurate-adc-readings-on-the-arduino/
Hope it helps!
"and Bob’s your uncle" Ha!
Lol da machsch es englischs Videos uf und kriegsch eifach es Grüezi is gsicht xD Gruss us Luzern. Danke für das Video, hedmer gholfe
Bitte, gern geschehen.
Charging, not loading. CHARGING.
Arduino Data Logger with Direct Input to Excel? Where is the info how do you really log it to excel? The rest is unnecessary, if it is not show everything. It will be fair to put correct name "Arduino Data Logger with not showing how to do Direct Input to Excel".
I do not know what I should show more? It keys the data directly into Excel via keyboard. You decide if you like it or not.