
Major upgrade !
Finally the data logger is able to work autonomously. The data are saved to the SD card every DeltaTimeSave seconds and they are plotted on the graph every DeltaTimeMem seconds. It's possible to transfer the data from Arduino to the pc using serial communication without stoppig the CDL and it's possible to change the value of DeltaTimeSave and DeltaTimeMem from the computer
New features:
- SD card
- Intro image
- Save data to SD
- Send data by serial to pc with Processing (only in main screen)
- Change the data save and plot frequency by serial from pc with Processing (only in settings screen)
- 3 different X range graphs with autoscale
- Added total X scale time reference in graph
- Line connecting points if less than 80 points in graph
CDLv3 Manual (here the pdf file):
Needed Components:
- Arduino MEGA 2560
- ILI9341 240 x 320 display
- Any kind of sensor – For test I used Adafruit MAX31856 Thermocouple Amplifier
- 2 Potentiometers
- 10 μF and 100 μF capacitor
- 8 x 1 kΩ resistors
- DC adapter (I used this one)
Connections:
For MAX and ILI Screen same connections used in the CDLv2. Here the link to CDLv2, here the new CDLv3 full schematic:
ILI9341 SD Card:
Attention: in my case the SD is not working correclty if I use a voltage divider for the SD_CS, but it's working with a direct connection to pin 46.
SD_CS to MEGA pin 46
SD_MOSI to ILI9341 MOSI
SD_MISO to ILI9341 MISO
SD_SCK to ILI9341 SCK
DisablingAutoResetOnSerialConnection
With my MEGA connecting a 10μF capacitor between the RESET and GND works perfectly. This is absolutely necessary otherwise any attempt of data transfer with the pc will restart Arduino.
1) format a SD card as FAT32 and copy this file on it
2) insert the SD in the ILI9341 slot
3) load the CDLv3 Arduino Sketch normally on arduino
4) unplug the USB
5) connect a 10μF capacitor between the RESET and GND
6) power Arduino with the DC adapter
7) plug the USB to synch the arduino clock (using the processing sketch "CDLv3SyncAndSave.pde")
8) unplug the USB
Attention:
to load the intro logo I used the example "spitftbitmap.ino" from the Adafruit ILI9341 Library released under the MIT license.
Now you have a real independent data logger !
Data Transfer:
To transfer the data plug the USB to the pc and use the Processing sketch "CDLv3SyncAndSave.pde". You need to move to the main screen (see the manual).
The file Data.txt will be saved in the same directory of the processing sketch.
Change Settings Values:
To change the value of DeltaTimeMem or DeltaTimeSave use the processing sketch "CDLv3Settings.pde". Change this values in the processing sketch then launch the script:
int DeltaTimeMem = 3600;
int DeltaTimeSave = 1;
You need to move to the settings screen (see the manual).
Example of successful change og settings:
Known Issue: change DeltaTimeMem or DeltaTimeSave require several attempt. Just keep trying until you get it right !
Files:
Manual
CDLv3 Arduino Sketch
CDLv3Settings.pde
CDLv3SyncAndSave.pde
Required Libraries:
ILI9341:
https://github.com/adafruit/Adafruit-GFX-Library
https://github.com/adafruit/Adafruit_ILI9341
MAX
https://github.com/adafruit/Adafruit_MAX31856
Time
https://github.com/PaulStoffregen/Time
where do you get the coding?
ReplyDelete