arduino real time data download arduino mega2560: download

8
Arduino Real Time Data Download Arduino Mega2560: http://arduino.cc/en/Main/ArduinoBoardMega2560 Download Arduino Processing: http ://playground.arduino.cc/Interfacing/Processing Note: This was done but not employed. Firmata DB was for UNO. Download PLX-DAQ: http://www.parallax.com/tabid/393/Default.aspx Blog on PLX-DAQ-n-Arduino: http://robottini.altervista.org/arduino-and-real-time-charts-in-excel Brief PLX-DAQ Code Used in Arduino Sketches. I think this all of it: LABLE - Used to define the column headings. Syntax: Serial.println (“LABEL, INT_COLUMN”); DATE, TIME - Allows the serial port to send data to Excel. Syntax: Serial.print (“DATE, TIME,”); Serial.println (val); Note: Serial.print (“DATE, TIME,”) must be used before each Serial.println(); ROW, SET, k, - This allows control over the row that excel accepts data. Syntax: Serial.println(ROW, SET, #); The column control: Serial.print(“,”) ; Like CSV

Upload: tylor-hallsted

Post on 14-Dec-2015

274 views

Category:

Documents


3 download

TRANSCRIPT

Arduino Real Time Data Download Arduino Mega2560:

http://arduino.cc/en/Main/ArduinoBoardMega2560 Download Arduino Processing: http://playground.arduino.cc/Interfacing/Processing Note: This was done but not employed. Firmata DB was for UNO. Download PLX-DAQ: http://www.parallax.com/tabid/393/Default.aspx Blog on PLX-DAQ-n-Arduino: http://robottini.altervista.org/arduino-and-real-time-charts-in-excel

Brief PLX-DAQ Code Used in Arduino Sketches. I think this all of it: LABLE - Used to define the column headings. Syntax: Serial.println (“LABEL, INT_COLUMN”); DATE, TIME - Allows the serial port to send data to Excel. Syntax: Serial.print (“DATE, TIME,”); Serial.println (val); Note: Serial.print (“DATE, TIME,”) must be used before each Serial.println(); ROW, SET, k, - This allows control over the row that excel accepts data. Syntax: Serial.println(ROW, SET, #); The column control: Serial.print(“,”) ; Like CSV

Short Ardunio Script Placing Arduino Reads into Excel Meter OpenDocument TextDouble click to open, 233 line sketch, reading analog pins A(15:0] and sending it to ECEL. Need win2k or better.14 bit decode of up/dwn counters to display CLK, and write A5A5 to nibs 7:4 and read that into nibs 3:0.Use bench_mon.xlsm found in plx.

ECEL Snapshot NOTES:The Arduino code writes to columns 1-3 (A-C) and ECEL maps columns B to G and to C to I .Column A is the “DATA, TIME, “ This is needed to have EXCEL read the incoming data.

8 Nibs can be read or written: pic shows a write of A5A5 and reading same. The value to R/W is CSV file read by script.

The frequency will be the decode of up/down counters used to generate CLOCK with base frequency of either 10 or 20 MHZ crystal module and I really need the “BOX” to finish this.

Reads of 12 analog ports with wait of 5mS B/W reads plus 40mS at end of reads allows about 10 reads/s. The box colors are based on the data received , set in EXCEL. Supply : 0<=5V consider a 5% de-rating. Supply >5v are a 10% de-rating. All values read outside their de-rating show RED.

The voltages monitored were 5V, 3.3V and 0V and the one pot V- OUT seen in the V-V supply where the color green/red was base on value V>= 0 = green and anything else is red.

All current values were tied to 0V where 0-0.9 = green and any measurement above or below this range is red. The Measured value has no constraints and will always be green.Must! open xcel to blank sheet. Connect to data port then move meter sheet to first page (blank out Meter).

                          

Supplies 

     5V 5.00 V 0.00 mA                             12V 3.44 V 0.00 mA                             V-V 2.26 V 0.00 mA                             N12V 4.99 V 0.00 mA   

Measured 

        A1-2 0.00 V 5.00 V                             A3-4 0.00 V 5.00 V                             A5-6 0.00 V 5.00 V                             A7-8 5.00 V 5.00 V   

Main Clock 

        BASE 10.00 MHZ    CLK 813.74 HZ     

NIBS [15:0]   

         Data R - - - - H A 5 A 5 H                             Data W A 5 A 5 H - - - - H                                                    

Box7_ino.txt

EXCEL Data Sheet Used

This is the excel DB used. The DATE,TIME, field A1 , measured value 1-2=B2-3.You must use the downloaded excel worksheet it contains VB code that allows Aduino access, or this one. Sheet : bench_mon2.xlsm.

10:15:41 AM 5.00 0.0010:15:41 AM 3.44 0.0010:15:41 AM 2.26 0.0010:15:41 AM 5.00 0.00 5V V mA10:15:41 AM 0.00 5.0010:15:41 AM 0.00 4.99 12V V mA10:15:40 AM 0.00 4.9910:15:40 AM 5.00 5.00 V-V V mA10:15:40 AM 1.22 kHZ 10 MHZ10:15:40 AM - - - - A 5 A 5 N12V V mA10:15:41 AM A 5 A 5 - - - -

A1-2 V V

A3-4 V V

A5-6 V V

A7-8 V V

BASE MHZ CLK kHZ

Data R - - - - H A 5 A 5 H

Data W A 5 A 5 H - - - - H

THE BOX

Main Clock

Measured

Supplies

2.26

3.44

5.00

5.00

0.00

0.00

0.00

0.00

5.000.00

0.00

0.00

5.00

NIBS [15:0]

4.99

10.001.22

4.99

5.00

ARDUINO & PROCESSINGDownload Processing:http://processing.orgDownload Arduino Processing: http://playground.arduino.cc/Interfacing/ProcessingCopy folder arduino to processing folder C:\downloads\processing-2.0.1-windows32\processing-2.0.1\modes\java\librariesEnter processing and add font: “Arial-BoldMT-14”, <Tools><Create Font>Add sketch box_proc_pde.txt making the box.

Click R-W to change the 32 bit bus status.Click Log to allow data log.

box_proc_pde.txt

box_proc_ino.txt

Change The 32 Bit Bus

The meter will default to all read: r,r,r,r,r,r,r,r . Click R-W and the box below will pop-up, make your entry and cliclk OK. The board is currently wired upper 2 bytes to the lower 2 bytes, so it will read what it writes.

Data Log

Click the Log button and the box below will pop-up suggesting a file name of the current date and time.Accept it or change to your preference. This will write out a CSV file containing the measurements and settings of the box.

CSV File

5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.43 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.26 1.02 9.21 1.02 2.44 1.02 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.21 1.02 2.44 1.01 1.02 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ5 1.02 8.25 1.02 9.22 1.02 2.44 1.02 1.01 5 5 2.05 2.05 5 4.99 5 610.39 HZ 10 MHZ

Summary of Box Details Listing Ports Used and the Data TransievedWould Like to Employ SPLC780D 40X4 LCD Display

Add Chars Port Value 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9Idenity ~Value chars Duib Port I/O Port Chars Units Space( ) 16 1/0 5 . 0 0 V 1 6 5 m A 1 2 . 3 5 V 1 6 5 m A 1 0 M H Z

5V 5.00 4 A0 1 A0 4 V 2 1 5 . 0 0 V 1 6 5 m A ~ 1 2 . 1 5 V 1 6 5 m A 6 1 0 . 3 9 H Z5V_I 1.65 4 A1 1 A1 4 165 mA 3 0 . 0 1 V 0 . 0 2 V 0 . 0 3 V 0 . 0 4 V R > ~ ~ ~ ~ A B C D H12V 8.25 5 A2 1 A2 5 V 2 0 . 0 5 V 0 . 0 6 V 0 . 0 7 V 0 . 0 8 V W > A B C D ~ ~ ~ ~ H

12V_I 1.65 4 A3 1 A3 4 165 mA 3V-V 14.96 5 A4 1 A4 5 V 2

V-V_I 1.65 4 A5 1 A5 4 165 mA 3N12V 3.96 5 A6 1 A6 5 V 2

N12V_I 1.65 4 A7 1 A7 4 165 mA 3A0 1.65 4 A8 1 A8 4 V 2A1 1.65 4 A9 1 A9 4 V 2A2 5.00 4 A10 1 A10 4 V 2 CHARS PORTSA3 5.00 4 A11 1 A11 4 V 2 105 94A4 3.33 4 A12 1 A12 4 V 2A5 3.33 4 A13 1 A13 4 V 2A6 5.00 4 A14 1 A14 4 V 2A7 4.99 4 A15 1 A15 4 V 2CLK 610.39 6 D[13:2,14,15] 14 6 0

FREQ HZ 3 - 0 kHZ 4BASE 10 2 - 2 3FREQ MHZ 3 - 0 MHZ 4NR7 F 1 D[52,50,48,46] 4 4 R 2NR6 F 1 D[44,42,40,38] 4 4 0NR5 F 1 D[36,34,32,30] 4 4 0NR4 F 1 D[28,26,24,22] 4 4 0NR3 F 1 D[53,51,49,47] 4 4 0NR2 F 1 D[45,43,41,39] 4 4 0NR1 F 1 D[37,35,33,31] 4 4 0 CharsNR0 F 1 D[29,27,25,23] 4 4 H 2 158NW7 - 1 D[52,50,48,46] 4 4 W 2NW6 - 1 D[44,42,40,38] 4 4 0NW5 - 1 D[36,34,32,30] 4 4 0NW4 - 1 D[28,26,24,22] 4 4 0NW3 - 1 D[53,51,49,47] 4 4 0NW2 - 1 D[45,43,41,39] 4 4 0NW1 - 1 D[37,35,33,31] 4 4 0NW0 - 1 D[29,27,25,23] 4 4 H 2 194R-W7 r 1 -R-W6 r 1 -R-W5 r 1 -R-W4 r 1 -R-W3 r 1 -R-W2 r 1 -R-W1 r 1 -R-R0 r 1 -

94

CSV Values Sent to Serial Port Serial1 Display

Serial2 Port

Serial Port

SPLC Character Chart