#9 Arduino Data Logger with Direct Input to Excel

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
grey YouTubers here is the guy with a Swiss accent again as you saw in my last video I wanted to understand the functioning of the trimmers on the step down converter I discovered that one of the trimmers sets the voltage the second sets the maximum current and the third sets the threshold to show when the battery is fully charged but this was a theory and I wanted to test it in reality during my work I often need to measure volt and milliampere at the same time this is why I built a small device consisting of a cheap meter a battery and a case it reads volt and milliampere at the same time very useful but not sufficient for the current task loading batteries takes time and I do not want to sit in front of the meter till it's finished this is why I wanted a meter which does not only show volts and ampere now I wanted to record the values over time and in addition I had to monitor the behavior of two LEDs and it had to be cheap and easy to be built you find many Arduino data loggers in the internet most of them write to SD cards this is a good approach for many applications however it is quite cumbersome because you always have to remove the card put it into a reader import the file to Excel and convert it into columns before you can start your analysis for my locker I wanted a direct way into Excel and the easiest way from Arduino to excel is the keyboard This has also the advantage that you can watch the results on the Fly and stop the experiment if it does not meet your expectation very good for prototyping so this is the plan to build a data Locker which is capable to measure volt and milliampere and at least two analog signals for the LED monitoring and it has to key the results directly into an Excel spreadsheet the Precision is not so important for this purpose the ingredients are an Arduino micro because the micro can emulate a USB keyboard a small OLED display a 5 ampere current sensor a rotary encoder a prototyping PCB and some connectors and cables for this project I use the approach with a prototyping PCB because there are quite a few connections to be made and I promised in in my last video to show you another possibility to build your projects the building process is straightforward I put all components on the PCB and connect them with colored wires for the connections to the display and the switch I use pin headers for the Arduino micro I use a socket because I do not want to lose it if something goes wrong with my PCB some commands to the different parts the current sensor provides a voltage which is linear to the current flowing through it it uses a hole element and therefore is capable to measure currents in both directions 0 milliampere corresponds to about 2.5 volts because I decided to use the analog to digital converter of the Arduino micro and not an additional and more precise ADC I discovered a huge problem arduinos used the power supply voltage as a reference to measure volts and this can vary quite a lot USP specifications allow 4.4 to 5.5 volts as VCC fortunately a trick helps to reduce the influence of VCC arduinos have a quite precise 1.1 volt reference builtin if you measure this voltage with your imprecise analog to digital converter you do not get exactly 1.1 volt this value however can be used to calculate the momentary Supply voltage and if you know the momentary Supply voltage you can correct the reading of your ADC you find a link to this trick in the comments below by the way this trick should be used at all the time if you want to have an exact reading of analog input with arduinos because the current sensor have similar issues it uses also VCC as an input I have to include a software function to set the milliampere reading to zero before I start with my measurements the next problem arduinos can only measure voltage from 0 to 5 volt this is not sufficient for my experiments to make sure I can measure higher voltages I include a trimmer as a voltage device this allows me to reduce the maximum voltage to 5 volt today I use a one to2 ratio which allows me to measure voltages up to 10 volt I also protect the analog input with a 5.1 Senor diode the Arduino code is straightforward it uses the libraries for the small olet and the library for a rotary encoder I have to admit I love rotary encoders as input devices they are very versatile you can easily build menus enter numbers and even acknowledge your selection with a built-in push switch and they can be very easily mounted just drill a hole in your box in this project I use also a library called eom I said before I can reduce the maximum voltage with a trimmer to get the voltage right I have to multiply the measurement with a factor I do not plan to change the trimmer settings very often this is why I want to make sure that the adjustment value survives a shutdown of the Data Logger this is why I store it in eom the last step was the Assembly of the whole thing and here it is the data loger with direct keyboard input now I can start with my measurements I connect my bench power supply to the buck converter and the converter to the data Locker then I connect two LiPO batteries to the output of the logger for my experiment I set the output voltage of the converter to 8.4 volts which is the maximum charging voltage for two lipos cell the current limitation is adjusted to 1,000 milliamp and the current for the charging indicator LED is 100 Milah to monitor the two LEDs with my data Locker I built a simple device consisting of two photo resistors and two 4.7 kiloohm resist these sensors produce a high voltage if the LED is on and a smaller voltage if the LED is off it is not very precise because the two LEDs are very close and the sensors will pick up lights from both LEDs however it is efficient and with some Excel tricks I can remove this effect now let's start the experiment lipos are completely discharged The Bu converter adjusted and the XEL started up the plus pole of the battery is still disconnected first I zero the current sensor in the next step I could adjust the voltage but because the adjustment is stored in the eom it is already precise and I do not have to change it after plugging in the batteries the loading begins I just have to press the rotary encoder switch to start data locking and go to bed this is why I love computers they work when I sleep it is now in the morning and I stopped the logger Excel contains all day data and with a few clicks I created this chart it shows the loading curve of the two lipos at the beginning the current is 1,000 milliamp and after a while 4,981 seconds to be precise the first led goes out because the current is now below the limit the batteries are now loaded in the constant voltage mode as soon as the current drops below the 100 milliamp threshold the second LEDs goes off and indicates that the battery is fully loaded the goal of this episode was to confirm the function of the trimmers and the LEDs on a bu converter this is why I had to build a data locker with direct input to Excel for sure this was an Overkill but this was not the only usage of this device in the next episode I will use it to check the performance of different AA batteries stay tuned thank you for watching bye
Info
Channel: Andreas Spiess
Views: 128,723
Rating: undefined out of 5
Keywords: Data Logger, Microsoft Excel (Software), Arduino (Brand), ADC, buck converter, step down converter, precision, keyboard, micro pro
Id: AgJegJ30Pj4
Channel Id: undefined
Length: 10min 12sec (612 seconds)
Published: Thu Jul 23 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.