![]() ![]() (…provided I don’t exceed the ☐.5 volt limit that PGA setting imposes…)Īfter installing Rowbergs I2Cdev library, and running a couple of jumpers, my drip sensors were generating raw count output like this: Jeelabs elegant solution to this ranging problem uses two shunt resistors and a diode, but with 15bits of differential range on the 1115, the 8x gain setting can do the job with a single resistor. Even if you have a nice Rigol to play with, it can still be tricky to get all the settings and timings right because the loggers can draw anything from 0.15mA while sleeping, all the way to up to 100mA during SD writing events. I posted the code used to generate these graphs on GitHub, but you will have to noodle around with it to figure out what the threshold settings should be for your particular application.Īlthough I already have a good method to estimate the overall power consumption of my loggers, I was motivated by this Jeelabs post to see if there was a way I could look at individual events. Having the ability to spool data to the screen with a simple print statement, turns the exercise into a “What happens if I do this?” kind of process, which is perfect for providing feedback to students learning how to program Arduinos. The plotter’s vertical axis auto adjusts as the value of your output increases or decreases, while the X axis is fixed at 500 points, with each tick of the axis equal to an executed serial println command. It’s not often that something works this well on the first try, and I thought I would post about using the combination as a kind of ‘poor mans oscilloscope’. I recently picked up a ADS1115 breakout board, and it was fairly easy to use that with the serial data plotting capability of the Arduino IDE. Differential readings are also useful for sensor applications that use a wheatstone bridge arrangement. Since the second logger is ‘floating’ with no connection to the UNO’s ground line, the voltage drop across the 5Ω shunt resistor is recorded using a differential channel on the ADS1115. Other thoughts: You could use an SD (or microSD) module on your arduino, with appropriate libararies, and write data to a txt file on the SD card, then later read it into your computer.Here, I’m using the basic UNO Logger as a tethered Data AcQuisition device, recording the current used by a second data logger. Or you could do all this with one serial port, if the Arduino code is stable and doesn't need revision, so the serial port can be used for just data. ![]() If you wrote your own program on the PC, you could choose to define a serial protocol which allowed the Arduino to command it when to open a file, write to it, and close it. ![]() You could consider using two serial ports on both your computer and on the Arduino (with either an Arduino with multiple hardware serial ports, or by using the SoftSerial library) keep a program (CoolTerm or your own program) always listening to one port and transcribing to disk use the other port for uploading new firmware to the Arduino. One problem is that for some Arduinos, the same serial port is used for programming and debugging, and also for user defined data from the Arduino - so you have to alternate between uploading new versions, and saving txt files of output printed to serial by the Arduino. ![]() You could write your own program to run on your computer, to do the same thing, but there's not a lot of gain there if CoolTerm does it for you. Terminal programs (like CoolTerm but there are many others) often have that function. So it needs some program running on your computer, to open a file, receive the serial data and write it to the file, and then close the file. The arduino doesn't have direct access to the files on your computer it's just sending data over the serial port. ![]()
0 Comments
Leave a Reply. |