Home
Serial Graph Tool - Earth People Technology
Contents
1. fort int count O count 451 count Sample the ADC Channel and add it to the Channel Buffer AnalogReadValue analogFeadi Channel ChannelBufferl ecount AnalogqReadValue rl Arduino Uno on COR Next the code enters the buffer loop A for loop is set up so that one data point is entered into each element of the 500 integer buffer The channel number was set by the definition of the Channel variable Page 27 A EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO Arduino_SGTool_Analog Monitor U2 Arduino 1 iili sme aaa File Edit Sketch Tools Help Arduino _SGTool Analog Monitor UW oid loop i f foend the Channel selection at the beginning of each frame if iChamel gt 5 H Channel QO SPI busal fort int count O count lt 451 count Sample the ADC Channel and add it to the Channel Buffer AnalogReadValue analogPRead Channeli i ChannelBufferl ecount AnalogPReadValue rl Arduino Uno on COR Each time through the for loop the analogRead function is called with the Channel number providing the pin number for the analog input The result of the analogRead function is stored in the variable AnalogReadValue This value in turn is stored into the buffer element selected by the for loop Page 28 EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO Ge Arduino_SG
2. g Arduino_SGTool_Analog_Monitor_U Arduino 1 a File Edit Sketch Tools Help Arduino _SGTool Analog Monitor WU f f Set the Analog O simal as an input pinMode 0 INPUT AnalogReadValue 0 Channel QO ffInitialize the Serial Graph Tool EPT_ SsGToolIniti Arduino Uno on COR Page 25 A EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO g Arduino_SGTool_Analog_Monitor_U Arduino 1 a File Edit Sketch Tools Help Arduino _SGTool Analog Monitor WU oid setup i ff Set the Analog O simal as an input pinMode 0 INPUT AnalogReadValue 0 Channel QO 7 Je e EPT SGToolInit Arduino Uno on COR Next the code enters the main loop function First thing to do at the top of the loop is to check the channel number and make sure it has not incremented above the highest channel number If so roll the channel back to zero This will allow each channel to fill up a data buffer and transmit it to the Serial Graph Tool Page 26 EARTITRPEORPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO Arduino_SGTool_Analog_Monitor_U2 Arduino 1 l l File Edit Sketch Tools Help Arduino _SGTool Analog Monitor UW oid loop i f foend the Channel selection at the beginning of each frame ifiChannel gt 5 Channel f go through for loop and incrementally send a count to SPI bus
3. ChannelBufferl ecount AnalogReadValue f Write the block of data to the Serial Graph Tool EPT_ SGToolWriteBlockData ChannelButferl 450 Channel TEN BITI f fsend end of frame so the SG6Tool will plot the data EPT_SGToolFrameEnd delay 20 Arduino Uno on COR Nex the EPT SGToolFrameEnd function is called to graph the data in the buffer Page 30 EARTITRPEORPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO Ge Arduino_SGTool_Analog_Monitor_U Arduino 1 File Edit Sketch Tools Help Arduino _SGTool Analog Monitor WU ra go through for loop and incrementally send a count to SPI bus fort int count O count lt 451 count fsample the ADC Channel and add it to the Channel Buffer AnalogReadValue analogPRead Channeli ChannelBufferl count AnalogReadValue ffWrite the block of data to the Serial Graph Tool EPT_ SGToolWriteBlockData ChannelButferl 450 Channel TEN BIT D ff send end of frame so the SGTool will plot the data EPT_SGToolFrameEnd delay 20 Arduino Uno on COR Finally the Channel variable is incremented by one and the process starts over again This process will go through and record the output for the next analog input A1 into the ChannelBufferl Then the data is transmitted to the Serial Graph Tool and graphed to the display This process repeats for all 6 channels Th
4. s Vertical Voltage Scale Vertical Position Vertical Scale 1 2 gt 450 PIXELS EACH PIXEL CORRESPONDS TO ONE DATA ELEMENT FROM THE SELECTED CHANNEL IN THE CIRCULAR BUFFER Page 14 A EARTIIPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO BB Serial Graph Tool Serial Graph Tool 0 Device Connected Close EL Horizontal Time Scale y X Position a Ls Vertical Voltage Scale Vertical Position Vertical Scale 1 2 50 PIXELS EACH DIVISION IS MADE UP OF 50 PIXELS When the Serial Graph Tool receives a FrameEnd command it reads the previous 450 data elements starting from the most recent data element from the selected channel in the circular buffer It graphs each data element in one pixel The value of the data element determines the amplitude of the signal 7 Circular buffer description The Serial Graph Tool stores the incoming channel data into separate buffers There is one buffer for each channel All of these channel buffers are organized as Circular Buffers The concept of using a Circular Buffer is pretty straight forward e Continuously store incoming data into the same buffer e When reaching the end of the circular buffer start overwriting data at index 0 It starts filling at index zero and increments the index whenever new data arrives When the index reaches the maximum point it starts filling the buffer at zero Page 15 A EA
5. section will explain the example code and how to create your own Arduino Serial Graph Open the Arduino IDE and locate the Arduino Example code Load up the Arduino_SGTool_Analog_Monitor_U2 sketch The first thing to add to the sketch is include EPT_SGTool h And include lt SPI h gt The first include is the EPT Serial Graph Tool library and the second is the Arduino SPI library Page EARTIHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO Arduino_SGTool_Analog_Monitor_U2 Arduino 1 Sa File Edit Sketch Tools Help include EPT S6Tool h ff include the SPI library include lt SPI h gt B Declare some int variables for use in the Loopij int Channel int AnalogPReadValue fDeclare a Buffer for storing the ADC samples int ChannelBufferl 500 0 oid setup i F Set the Analog O simal as an input pinMode 0 INPUT Arduino Uno on COR Next declare an integer Channel and integer AnalogRead Value The Channel variable will hold the channel number that the data will be written to The AnalogRead Value will hold the result of the analogRead function Page 22 EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO Ge Arduino_SGTool_Analog_Monitor_U Arduino 1 File Edit Sketch Tools Help Arduino SGTool Analog Monitor UW ffDeclare some int variables for use in the Loop int Channel int AnalogP
6. 2 EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO EARTH PEOPLE TECHNOLOGY SERIAL GRAPH TOOL FOR THE ARDUINO UNO USER MANUAL BB Serial Graph Tool VoRage Scale Vertical Position Vertical Scale 1 2 The Serial Graph Tool for the Arduino Uno provides a simple interface for graphing data to the PC from the Uno It can graph up to 8 separate channels Each channel is limited to eight bits only It has several tools that allow the data to be scaled for examination Scaling can be performed in the Vertical and Horizontal Each channel can be turned on or off for display The Serial Graph Tool has easy to use Arduino functions to transmit data to be graphed from the Uno It uses the SPI bus so data is transferred at up to 4 Megabits per second Page 1 EARTIIPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO Serial Graph Tool Getting Started Below is a list of the steps to take to get started using the Serial Graph Tool l 2 10 11 PA 13 14 Install the Serial Graph Tool Driver Install the Serial Graph Tool Application Connect the EPT 220X DB U2 board to the Arduino Uno Connect each board separately to two USB Ports on the PC Locate the Arduino Examples folder under the Serial Graph Tool Install Locate the Arduino_SGTool_Analog_Monitor_U2 folder double click on the ino file When the Arduino IDE comes up Go to Tools gt Board and select Ardui
7. 3 A EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO B Serial Graph Tool Serial Graph Tool 0 Device Connected Horizontal Time Scale BEVSP ERE SECETELESESECeESSCTECECererccrre corer rcrreccrcrrcrreecrcrccrrccercrrcrreccrrsrcry gt _ X Position lt Vertical Vertical Scale Vertical Postion Vertical Scale V3 Data can also be viewed as 8 10 12 or 16 bits The Arduino code must store the collected data as 8 10 12 or 16 bits before selecting these settings in Serial Graph Tool To do this closes the EPT Serial Graph Tool 0 device and exit out of the application Open the Arduino SGTool Analog Monitor example code in the Serial Graph Tool folder Use the Rst button to reset the location of the horizontal position of the data to the start of the most recent 450 data elements of the circular buffer Page 44 EARTIIPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO Arduino SGTool Analog Monitor WW include EFT SGTool h f include the SPI library include lt 5FI F f Declare some int variables for use in the Loopi int Channel int AnalogReadValue f Declare a Buffer for storing the ADC samples int CharnnelButferl S500 0 old setup i Set the Analog 0 signal as an input pinMode INPUT AF Scroll down to the EPT_SGToolWriteBlockData function irite the block of data to the Serial Graph Tool
8. AGING THE THE ANALOG VALUE LOOP AND READ NEXT ANALOG INPUT LOOP AND READ NEXT ANALOG INPUT EACH OF THESE TASKS TAKES TIME TO COMPLETE THIS CREATES A NON LINEAR PROGRESSION OF DATA VS TIME MAKES IT IMPOSSIBLE FOR SERIAL GRAPH TOOL TO DETERMINE EXACT TIMING OF DATA THE USER MUST KEEP UP WITH THE TIMING OF DATA There are several types of data that benefit from graphing e Real time data Streaming the outputs of the analogRead functions Page 18 ED EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO e Long Duration data Measuring temperature once every second e Mathematical data Result of an equation Each of these types of data will be graphed using a different strategy of when the frame end should occur For real time data the circular buffers in Serial Graph Tool are constantly written to as fast as possible Every time the buffer index reaches 450 the frame end should be called For long duration data the frame end should be called after each data element is added to the buffer For mathematical data the frame end only needs to be called after the equation is complete and you want to graph the results There are menu items on the Serial Graph Tool that allow you to view the contents of the buffer using different methods 1 Zoom in the buffer i Zoom out of the buffer iu Shift left in the buffer iv Shift right in the buffer These four menu items wil
9. Analog_Monitor_U2 include EPT_3GTool h ff include the SPI library include lt SPI h gt f Peclare some int variables for use in the Loopt int Channel int AnalogReadValue Declare a Buffer for storing the ADC samples int ChannelBufferl 500 0 void setup f f Set the Analog O signal as an input pinMode 0 INPUT 13 Each integer stored into this array will become a pixel in the display The value of each integer will become its amplitude The position of each integer in the DataArray is the point in time in which the data sample was collected Each integer added to the DataArray can be either eight bit ten bit twelve bit or sixteen bit However each integer added must be the same as all the other integers in the array Mixing different bit sizes in the array is not allowed So the fact that we are changing the bit size of the data going into the array means we are not actually adding integers in the ANSI C sense of the meaning Integers in the Arduino are 16 bits However we can store an eight bit or ten twelve to the elements of the array with no problems The EPT_SGTool Library just needs to know what the bit size of data we store into this array And that is why we pass the NumberOfDataBits parameter to the EPT SGToolWriteBlockData function 4 Channel selection The Serial Graph Tool can display up to eight individual channels of data When the us
10. EFT SGToolWriteBlockData ChannelButterl 450 Channel ELGHT BIT DATA Change the EIGHT_BIT_DATA parameter to TEN_BIT_DATA Page 45 A EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO d Write the block of data to the Serial Graph Tool EFT sAGToolWriteBlockData ChannelButferl 450 Channel TEN BIT DATA This will store each sample of the analogRead function as a ten bit word instead of an eight bit byte Then go to Serial Graph Tool and re open it Ta Serial Graph Tool ey ol LA Device Connected Channel St HU i me iil 1 id Horizontal i Time Scale AL an Of g Ra X Position Re Se Ret 3 Bit aad LJ _ C Us B gt 10 Bit Vertical gt 12 Bit l Vertical Scale Vertical Position 16 Bit Unity Scaling Notice that the data oscillates from zero to the top byte data This is because the data is now being transmitted as to byte packets In eight bit mode the data is transmitted in single byte packets To display this data correctly select the 10 Bit radio button Page 46 TECHNOLOGY D CARTHPEOPLE User Manual EPT SPI Serial Graph Tool For the UNO Serial Graph Toc Sera it eee Det i f Pt ft fee pt td 7 Serial Graph Tool 0 Device Connected Close Channel Stop Select Horizontal Time Scale o 9 Rat X Position E g o Fs lt gt Vertical Vertical Scale Vertical Pos
11. RTIHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO CONTINUE TO WRITE INTO BUFFER STARTING OVER AT INDEX 0 FILL EACH ELEMENT IN THE CIRCULAR BUFFER WITH INCOMING DATA INCREMENT THE BUFFER INDEX This approach allows you to save data forever without having to use the hard drive of the PC If we imagine the array arranged in a circular way it is easy to see from the diagram Just keep saving data and start over when the buffer rolls over So we end up with a buffer filled with the channel data When a FrameEnd command comes in from the EPT 220X DB U2 the Serial Graph Tool reads the 450 buffer elements from the selected channel and graphs them in the appropriate channel color It will then store the index value that it read up to into a local register The next time the FrameEnd command is received by Serial Graph Tool it reads 450 buffer elements starting at the end point of the previous read graph This way data will be graphed in an orderly manner in which it was received by Serial Graph Tool This process can repeat forever the incoming data will never overflow the local memory or slow down the computer by using the hard drive 8 When to update the display The display can be updated at any time Just call the EPT_SGToolFrameEnd function and the Frame End command is sent to the Serial Graph Tool When the Serial Graph Tool receives this command it reads the previous 450 data elements from th
12. ReadValue fDeclare a Buffer for storing the ADC samples int ChannelButferl S00 0 oid setup i Set the Analog O signal as an input pinMode 0 INPUT AnalogPReadValue O Channel QO f fInitialize the Serial Graph Tool EPT_SGToolInit Arduino Uno on COR Next declare the buffer to hold the data that will transmitted to the Serial Graph Tool The buffer is limited to a size of 500 integers This limit is important because the Arduino Uno has an SRAM of 2048 bytes 500 integers will take up half of the memory The user code will need some amount for the program and some amount for the stack Page 23 EARTITRPEORPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO E gt Arduino_SGTool_Analog_Monitor_U Arduino 1 Mi File Edit Sketch Tools Help i Arduino_SGTool_Analog_Monitor_3 Declare some int variables for use in the Loopi int Channel int AnalogPReadValue E2 int CharmelEuffer1 500 0 gid setup i ff set the Analog O simal as an input pinMode 0 INPUT AnalogPeadValue O Channel QO f fInitialize the Serial Graph Tool EPT_SGToolInit q 11 Arduino Uno on COR The setup function is next The code will set the analog I O s as inputs define the variables and initialize the Serial Graph Tool Page 24 EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO
13. Tool_Analog_Monitor_U Arduino 1 File Edit Sketch Tools Help Arduino _SGTool Analog Monitor WU a go through for loop and incrementally send a count to SPI bus fort int count O count 451 count f sample the ADC Channel and add it to the AnalogReadValue analogPRead Channeli ChannelBufferl count AnalogReadValue ffWrite the block of data to the Serial Graph Tool EPT_ SGToolWriteBlockData ChannelButferl 450 Channel TEN BIT D ff sSend end of frame so the SGTool will plot the data EPT_SGToolFrameEnd delay 20 Arduino Uno on COR When the for loop has iterated 450 times the channel buffer has enough data to fill up the Serial Graph Tool display for the selected channel So the for loop exits EPT SGToolWriteBlockData is called This function takes the channel number number of bits per data element and total number of elements in the buffer and a pointer to the buffer and transmits this data to the Serial Graph Tool Page 29 EARTITRPEORPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO Ge Arduino_SGTool_Analog_Monitor_U Arduino 1 File Edit Sketch Tools Help Arduino _SGTool Analog Monitor WU go through for loop and incrementally send a count to SPI bus fort int count O count 451 count fsample the ADC Channel and add it to the Channel Buffer AnalogReadValue analogPRead Channel
14. al Graph Tool For the UNO Mini B cable into the board connector and an open USB port on the PC When the board is connected the USB driver described in the previous section automatically loads Connect the Uno to the PC using a USB Cable Connect the Uno to the PC using a USB Cable Next add some code to the Arduino and use the Serial Graph Tool functions to plot out user data Serial Graph Tool Data Flow The Serial Graph Tool is designed to graph any data This data can be 8 10 12 or 16 bits It can have up to eight individual channels displayed at any one time This data can be the result of the AnalogRead function or Temperature from and I2C sensor or it can be created from a mathematic equation Once the data has been graphed to the display it can be scaled in the horizontal or vertical directions You can zoom in or out in the horizontal or move forwards or backwards in the data buffer In the vertical direction you can scale the data with an integer or fractional multiplier You can also set the vertical position of each channel The figure below shows the Data Flow for graphing data from the Arduino The user will collect data then format the data transmit over SPI to the EPT 220X DB U2 then transmit over USB to the PC and finally the Serial Graph Tool displays the data Page 8 EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO SERIAL GRAPH TOOL DATA FLOW t 77 Pl s WW l
15. aller is ready to install Serial Graph Tool on your computer To install im this folder click Next To install to o different folder enter below or click Browse Click Next to start the installation Eolder C Program Files lt 86 Sernal Graph Tool This computer program is protected by copyright law and imemaional restes install Serial Graph Tool for yourself or for anyone who uses this computer WARNING Unauthorized duplication or distribution of fis program or any portion of R may result in severe ovil OF Chrninal penalties and will be prosecuted to the maximum extent possible under the law Everyone Justme Installing Serial Graph Tool Serial Graph Tool has been successtully installed Serial Graph Tool is being installed Click Clase to ext Please wait Please use Windows Update to check for any critical updates to the NET Framework Page 6 EARTIIPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO When the installation is complete the application is ready for use The installer adds a folder under the users Programs x86 folder Go to Start gt Serial Graph Tool to view the files and folders HyperSerialPort Jolly Richard Documents Pictures Microsoft Office Microsoft Office Live Meeting 2007 Microsoft Silverlight Microsoft System Center 2012 R2 Music Computer Control Panel J P
16. e first channel and graphs them in the display in the appropriate channel color It continues to do this with all of the active channels and they have all been displayed Knowing the right time to send the Frame End command depends on what type of data the user Page 16 PA EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO is collecting and how often it is added to the DataArray Because the data is stored into an array at the Arduino the concept of time or any other measurement must be maintained by the user The Serial Graph Tool does not know the exact timing of the elements in the data For example let s graph four channels of data In the loop function of the Arduino one data element from each channel is stored into a separate buffer Each channel data must be collected possibly from the analoagRead function Next the data is processed by determining if it is greater than a threshold Next if it is greater than the threshold store it Repeat this process for each channel When the end of the loop function is reached start the process over until the buffers reach the maximum index value When the buffers are full send each buffer to the EPT 220X DB U2 using the function EPT_SGToolWriteBlockData Then repeat this process until there are 450 data elements transmitted to each channel At this point there is enough data to fill up the entire display with graphs for all four channels So call
17. en it starts over again at channel zero This will continue forever or at least until the power is removed Page 31 A EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO 25 Arduino_SGTool_Analog_Monitor_U Arduino 1 File Edit Sketch Tools Help Arduino _SGTool Analog Monitor WU f fChannel Buffer AnalogPReadValue analogPRead Channeli ChannelBufferl count AnalogqReadValue Write the block of data to the Serial Graph Tool EPT_ SsGToolWriteBlockData ChannelButferl 450 Channel TEN BIT D ffSend end of frame so the SG6Tool will plot the data EPT_SGToolFrameEnd delay 20 a Channel Arduino Uno on COR Make sure the appropriate board and serial port are selected Click on the Upload button and the code will load onto the Arduino Uno Next open up the Serial Graph Tool to actually graph your data VisiPort 2 Using the GUI Connect the EPT 220X DB U2 to the Arduino Uno Connect each board to an open serial port on the PC using both USB cables Make sure that an example sketch is loaded into your Arduino Go to Start gt Serial Graph Tool to view the files and folders Page 32 EARTITRPEORPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO HyperSerialPort IAR Systems IrfanView Kst 2 0 8 rc2 Maintenance McAfee Microsoft Lync Microsoft Office Microsoft Office Live Meeting 2007 Microsoft Silver
18. er sends a block of data to the EPT 220X DBO U2 they send it to a channel And the data that is collected at the PC will be displayed in that channel only So the user must select a channel and enter in the ChannelNumber in the parameters for the EPT SGToolWriteBlockData function The Page 12 EARTIGTRPEORPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO data that is continuously collected for the channel in the Arduino code must keep the same channel number for the duration of the application If you collect data for more than one channel each time you call EPT_SGToolWriteBlockData function you will have to enter the correct ChannelNumber for that data It is up to the user to ensure the correct channel is passed to the EPT_SGToolWriteBlockData function Failure to do so will cause the display to show incorrect information 5 Pixel bit selection When the data in a channel is graphed in the Serial Graph Tool each integer in the buffer becomes a pixel on the display The integers start at zero in the buffer and increment up to 450 CHANNEL 2 DataArray O Ox2f DataArray 1 0x34 DataArray 2 0x39 DataArray 3 Ox3d DataArray 4 0x41 Seral Graph ToolO v DataArray 5 0x43 Daa aa DataArray 6 0x44 PTTTTT DataArray 7 0x45 Close DataArray 8 0x44 DataArray 9 0x45 DataArray 10 0x46 fn DataArray 11 0x47 DataArray 12 0x48 DataArray 13 0x49 NYE DataA
19. erwrite the previously written data Anytime you want to update the display with new data Page 9 EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO just call the EPT_SGToolFrameEnd Serial Graph Tool Arduino Library 1 Write Block Function EPT_SGToolWriteBlockData Gnt DataArray int NumberOfWords int ChannelNumber int NumberOfDataBits This function is used to send a block of data to the Serial Graph Tool software which resides on the PC The function does not return anything and takes four items as input parameters a DataArray this is an integer array that can take up to 16 bit data The array should be declared as an integer array with no more than 500 entries The Uno has only 2KB of SRAM so the buffer should stay under that size The array can be as small as one byte or it can be the entire 500 integers You must pass the DataArray to the function EPT_SGToolWriteBlockData as an integer pointer This is simple to do just add the int in front of the name of your array b NumberOfWords this is the number of items in the DataArray that you want to transfer to the Serial Graph Tool Make sure that the total number of items in this value is available in the DataArray If a null character is read from the buffer it will not be transferred c ChannelNumber this is the channel that you want to write the DataArray into in the Serial Graph Tool The tool has separate data buf
20. fers for each channel Channels are assigned 0 to 7 for a total of eight channels When the Arduino writes data to a new channel it is declared and becomes available for display If no command is sent to write data to a particular channel then that channel will not be available for display d NumberOfDataBits this value is used to determine the bit size of each data element 8 10 12 or 16 This value needs to be filled in correctly otherwise the data will be incorrectly organized in the buffers in Serial Graph Tool The correct values to use are Page 10 fa EARTHPEOPLE il iil 1V TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO EIGHT_BIT_DATA TEN_BIT_DATA TWELVE_BIT_ DATA SIXTEEN_BIT_DATA 2 Frame End Function EPT_SGToolFrameEnd This function should be called anytime you want to graph the data that was written into the channel buffers in Serial Graph Tool This function has no return and requires no parameters It can be called at anytime Serial Graph Tool Functionality 3 DataArray description The DataArray is the place in the Arduino memory where the data to be sent to the Serial Graph Tool is stored This is declared as an integer array with a maximum size of 500 integers Page A EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO 5 Arduino SGTool Analog Monitor U2 Arduino 10 5 t Lo x File Edit Sketch Tools Help Arduino_SGTool_
21. i Ch5 T Position ae HATH ona VL Tik o g B Ret s gt 10 Bit LLLI HLN HIN Ch 4 Vertical 12 Bit HT T pe m Ch3 Vertical Scale Vertical Position T 16 Bit 1E Vertical Scale 13 AE O i a a EA L S a A all i LAHI N Ch232 i En Reres Ch 1 Turn off each channel except for Channel 1 by first selecting the channel then clicking on the On Off button directly below the Channel Select drop down box Page 39 EARTIHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO BE Serial Graph Tool eS Device Connected ras Channel a Select oo I gt Horizontal Time Scale On LJ Position na 8 Bit g Ret Ls E 10 Bit Vertical 1 Bit Vertical Scale Vertical Position 16 Bit gt Vertical Scale TP 1 3 Refresh Select Channel 1 and grab the Time Scale slider and slide it to the left Notice the signal is zooming out Page 40 EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO BB Serial Graph Tool E Vertical Vertical Scale Vestical Position Vertical Scale 1 3 Tr E B rl N PREVIOUS GRAPH FULL SCREEN GRAPHS Next slide the Time Scale slider all the way to the right Notice that the display is zooming into the signal Page A ARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO BBR Serial G
22. ition 16 Bit Unity Scaling ae ES The Serial Graph Tool converts the upper byte and the lower byte of the data into the correct ten bit format Each of the analog inputs are correctly displayed The same directions hold true for twelve and sixteen bit data Serial Graph Tool So that is all there is to the Serial Graph Tool It is up to the user to add it to their Arduino project Page 47
23. l change the method of reading 450 buffer elements starting at the previous end point and graphing these elements in the selected channel The Zoom in feature will read each element from the channel buffer and add a selected amount of dead time between each element It then graphs this data in the selected channel The effect of this dead time between each graph point is zooming into to the data The amount of dead time between each data point is selectable by the Horizontal Scale slider The Zoom out feature will decimate the data and graph the selected channel This means that the data 1s read from the channel buffer at intervals of n 1 So data is skipped When the data is graphed the effect is that we are zooming out of the data The amount of skipped data between each data point is selectable by the Horizontal Scale slider The Shift Left and Shift Right feature will add some user selectable amount to the previous end point of the graphed data Serial Graph Tool then reads 450 elements from the buffer and plots them The effect is that the data is shifting right or left on the screen The amount of shifted data t is selectable by the Horizontal Scale slider 9 SPI Timing diagram Page 19 A EARTIIPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO The Arduino code transmits the channel data to the EPT 220X DB U2 over the SPI bus This serial data has a protocol that it adheres to to correctl
24. light Microsoft System Center 2012 R2 Minitab Notepad PostgreSQL 9 1 x86 Devices and Printers I QuickTime Seapine Software Serial Graph Tool 2 EPT_Serial_Graph_Tool Help and Support Pictures Music Computer Control Panel a a ee ee ee ee ee ee a ae a a a Default Programs Arduino Examples Documentation I Startup 4 Back Just click on the Serial Graph Tool icon to launch the application When the application loads click on the drop down box at the upper right of the window Select the Serial Graph Tool 0 in the list Next Click Open and Start The Ardiuno data will display on the graph A Serial Graph Tool ae oC fm Seral Graph Tool Device Connected Channel Stop Select Horizontal Time Scale o 5 Pa X Position C Ch 1 8 Bit Po g o Rs B gt 10 Bit Vertical 12 Bit Voltage Scale Vertical Position 16 Bit Pf fet tt Unity Scaling When the Serial Graph Tool connects with the EPT 220X DB U2 and the Arduino Uno is Page 33 TECHNOLOGY D ARTHPEOPLE User Manual EPT SPI Serial Graph Tool For the UNO running the Analog Monitor code the display will show all six analog inputs on the screen TA zr Graph Tool cx Device Connected Close sal ee ee a a f E E Channel St a I Horizontal o g Ret ef tf ef fy ft X Position Ch 1 gE 2 g __ P B gt 10 Bit Vertical 1 Bit V
25. no Uno Go to Tools gt Serial Port and select the correct port for the Uno Click on the Upload button of the Arduino IDE Click on the Serial Graph Tool Icon under All Programs When the application opens up click on the drop down box in the upper right corner Select the Serial Graph Tool 0 Click on the Open button then click on the Start button All six analog channels should appear on the display Serial Graph Tool Driver Connect the EPT 220X DB U2 board to a USB port on the PC Load the driver located on the CD at SPISERIAL_GRAPH_TOOL_PROJECT_CD Drivers EPT_2 08 24 The EPT 220X DB U2 uses the ftdibus sys driver This driver is loaded upon connection of the USB to Serial Cable to the PC by the ftdibus inf file To install these two files onto your PC follow the instructions from the Update Driver Software utility This utility will automatically Page 2 EARTITRPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO load when the board is connected to the PC How do you want to search for driver software Search automatically for updated driver software Windows will search your computer and the Internet for the latest driver software for your device unless you ve disabled this feature in your device installation settings gt Browse my computer for driver software Locate and install driver software manually Click on the Browse my computer for driver Softwa
26. oltage Scale Vertical Position 16 Bit Unity Scaling All of the channels will be grouped at the same spot on the graph by default To separate these channels click on the drop down box underneath the Channel Select lable Page 34 TECHNOLOGY A EARTHPEOPLE User Manual EPT SPI Serial Graph Tool For the UNO Hin Serial Graph Tool Se t Seral Graph Tool Device Connected Close Channel stop i Horizontal Time Scale of 5 Ret x Position 8 Bit a g __ Rs Ls gt 10 Bit Vertical 12 Bit Vertical Scale Vertical Position 16 Bit Unity Scaling Refresh Select a channel and us the Vertical Position slider to adjust the position of the channel graph in the display Notice that the channel indicator highlights in bold when the channel is selected Page 35 EARTIHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO HA Serial Graph Tool l eae ne Device Connected Channel aa Stop _ ma bee Select e ite aid Horizontal Time Scale On p Rst_ Sane SA X Position 2R Ch3 8 Bit g st 10 Bit Vertical 12 Bit Vertical Scale Vertical Position 16 Bit a i PP tT te tf pt z T Ch 1 ES Grab the Vertical Scale slider and push up on it until the scale is 1 3 This divides each data element in channel 1 by 1 3 Page 36 EARTIGTRPEORPLE TECHNOLOGY User Manual EPT SPI Serial G
27. ostgreSQL 9 1 x86 Devices and Printers J QuickTime Seapine Software Default Programs Serial Graph Tool f aep EPT_Serial_Graph_Tool Help and Support Arduino Examples J Documentation Startup 4 Back Just click on the Serial Graph Tool icon to launch the application The Arduino Examples folder contains example code for you to use to setup a working graph application on the Arduino The Documentation folder contains the Data Sheet and User Manual for the Serial Graph Tool Serial Graph Tool Connections The Serial Graph Tool uses the EPT 220X DB U2 board to connect the Arduino Uno to the software application running on the PC The board is designed with stackable headers that connect into the Uno headers When the two boards are connected the SPI bus from the Arduino is connected to the USB port of the PC via the FT220X daughter board Connect the EPT 220X DB U2 to the Arduino Uno Connect the board to an open USB port on the PC The Serial Graph Tool is designed to mate with the Arduino Uno The four board connectors connect directly into the Arduino Uno Once the two boards are connected the SPI signals from the Uno are directed into the UMFT220XA module Both the Uno and the Serial Graph Tool can be powered up at the same time The EPT 220X DB U2 board receives its power from the USB cable To use the board connect a USB Page 7 52 EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Seri
28. raph Tool Channel Qat Select BR Horizontal Time Scale B On Ra X Postion 8B i lt gt 10 Ba vertica 12 Be Vertical Scale Vertical Postion 16 Ba Vertical Scale Refresh a Ch 1 1 6 OF PREVIOUS FULL SCREEN ORIGINAL GRAPH FULL SCREEN GRAPH ENDS Grab the Horizontal Position Slider and pull it to the left The display slides to the left The data is actually being pushed to the right but the effect is to view older data Click the Rst button to remove the horizontal scaling and display the data without the scale Page 42 A EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO E Serial Graph Tool x Serial Graph Tool 0 E Device Connected Close Channel Stat Select 1 Horizontal Time Scale KALAA LEARI LAAAA RIAA LARIA RALAS LAARI RARIS fret ret HO PEO eH OTF Od red eater totes On Rest X Position 8 be J Ret LSJ 10 Ba Vertical 12 Ba Vertical Scale Vertical Position 16 Be Vertical Scale V3 Refresh Grab the Horizontal Position Slider and pull it to the right The display slides to the right The data is actually being pushed to the left but the effect is to view the newest data When the slide right gets to the beginning of the newest data it cycles around and starts to display the data at the beginning of the circular buffer This data is the oldest in the buffer as the newest data overwrites the oldest data in the buffer Page 4
29. raph Tool For the UNO ae Serial Graph Tool Seral Graph Tool 0 ki Device Connected Close Channel Stop Select es Horizontal Time Scale On y Fe Ch3 8 Bit E g a Ret s B 10 Bit Vertical Vertical Scale Vertical Position 16 Bit ap 173 Rates Ch 1 B Repeat this process for all six signals Leaving one division between each channel Page 37 TECHNOLOGY D EARTHPEOPLE User Manual EPT SPI Serial Graph Tool For the UNO m Serial Graph Tool Serial Graph Tool O Device Connected Clase Ch 6 Channel Stop E ere ese Horizontal on J g Fa Ch 5 i e Position _ Ls gt Vertical Scale Vertical Position Vertical Scale gt Each channel can also be scaled in the Horizontal Scale Provide Channel with a signal A simple way to do this is to touch your finger to the analog input Then click the Stop button The Stop button will cause the Serial Graph Tool to stop filling the circular buffers with new data All of the previously stored data is preserved in the circular buffers This allows to you to scroll through the data to view events that occurred in the past Page 38 SO EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO Device Connected Close cCh Channel Start BH Serial Graph Tool o x Select Seral Graph ToolO id Horizontal Time Scale n g Fa
30. re icon Next click the Browse button and browse over to the cd and locate the above folder Page 3 Browse tor driver software on your computer Search for driver cofteure in thet locator chen Emm F nchate udfotden gt Lot me pick trom a ist of device drivers on my computer Thee Dat will chow putak driver cofteeare compitie with the device and al driver cofteasre om the carte category as the device Click the Next button Browse for driver software on your computer Search for driver software in the location IF Inctude subfolders Let me pick from a list of device drivers on my computer This list wilt chow installed driver software compatible with the device and all driver softwere in the sarne category as the device The next window is the Windows Security notice The EPT driver is not signed by Windows Click on the Install this driver software anyway Page 4 EARTIIPEORPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO Don t install this driver software You should check your manufacturer s website for updated driver software for your device Install this driver software anyway Only install dnwer software obtained from your manufacturer s website or disc Unsigned software from other sources may harm your computer ysteal informadon Windows has finished installing the driver software for this device USB Serial Converter A When this is complete
31. rray 14 Ox4a DataArray 15 0x49 DataArray 16 0x49 DataArray 17 0x48 DataArray 18 0x48 DataArray 500 Oxba CHANNEL 1 DataArray 0 Ox2f DataArray 1 0x34 DataArray 2 0x39 DataArray 3 Ox3d DataArray 4 0x41 DataArray S 0x43 DataArray 6 0x44 DataArray 7 0x45 DataArray 8 0x44 DataArray 9 0x45 DataArray 10 0x46 DataArray 11 0x47 DataArray 12 0x48 DataArray 13 0x49 DataArray 14 Ox4a EACH ELEMENT IN THE ARRAY NOTES THE VALUE OF THE PIXEL OF THE GRAPH OF THAT CHANNEL THE DATAARRY S00 ELEMENTS GO FROM ZERO TO 450 AND DataArray 15 0x49 DataArray 16 0x49 DataArray 17 0x48 DataArray 18 0x48 DENOTE THE PIXELS FROM LEFT TO RIGHT ON THE CHANNEL DataArray 500 Oxba GRAPH while each pixel is placed on the graph from left to right The value of all elements in the DataArray can be either 8 10 12 or 16 bits The user will determine which bit selection to use based on the data 6 Length of display pixels There are 450 pixels from left to right on the display Each division has 50 pixels in it Each Page 13 EARTIGTRPEORPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO pixel is a data point that is derived from the data elements in the circular buffers E Serial Graph Tool Serial Graph Tool 0 Device Connected Cose Channel Select Horizontal Time Scale i F X Position J
32. t a w L COLLECT DATA FORMAT DATA me OVER i OVER DISPLAY DATA The EPT Serial Graph Tool makes it easy to graph fast or slow data coming from the Arduino Uno The user only has to write code for the Uno Just collect the data into an array then send the array and channel number to the EPT 220X DB U2 then send the end of frame command There are only two functions needed to display data on the Serial Graph Tool 1 EPT_SGToolWriteBlockData DataArray NumberOfBytes ChannelNumber NumberOfDataBits 2 EPT_SGToolFrameEnd These functions are explained in the next section When the EPT_SGToolWriteBlockData function is called it takes the block that was previously stored into DataArray and transmits the bytes over the SPI bus to the EPT 220X DB U2 This data will be automatically sent from the EPT 220X DB U2 to the PC Upon arrival at the PC the Serial Graph Tool will store the data into a circular buffer The circular buffer will continue to store new data as it arrives from the EPT 220X DB U2 When the EPT_SGToolFrameEnd function is called on the Arduino it sends a command to the Serial Graph Tool to graph the data in the circular buffer You can keep sending data to the Serial Graph Tool indefinitely Because it uses a circular buffer 1t will continue to fill this buffer When it reaches the maximum size of the buffer it circles back around to the beginning of the buffer and fills the buffer at that point So it will ov
33. the EPT_SGToolFrameEnd function Next the display is updated with the collected data from the Arduino Examining each of these processes we can see that each process adds its own finite amount of time to execute these commands So the timing information cannot exist in the Serial Graph Tool The user will have to note the amount of processing time for each of these tasks to know exactly when they occurred Page EARTIIPEOPRLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO For each of the 115 elements in the buffers read each Determine if the value is Loop ull lall dos above the threshold of 0x100 If so average the LoopCount value with the previous For Index 0 Index lt 115 Index values and store it into the respective channel For Channel 0 Channel lt 4 Channel buffer AnalogValue analogRead A0 Channel If AnalogValue gt 0x100 Average Channel Average Channel aaa nr has Average Channel Average Channel de ae h AboveThresholdCoun Channel t ROTINE Buffer Channel int Average gR Ag 4 for Channel 0 Channel lt 4 Channel EPT_SGToolWriteBlockData Buffer Channel 115 Channel TEN_BIT_DATA If LoopCount 4 0 If the loop has made four cycles EPT_SGToolFrameEnd then graph the data SEND UPDATE COMPARING THE READING THE ANALOG INPUT ANALOG VALUE TO THE THRESHOLD RANSMITTING EACH BUFFER TO THE EPT 220X DB U2 AVER
34. the drivers are installed and the EPT 220X DB U2 is ready for use Serial Graph Tool Application Install The Serial Graph Tool application software must be installed onto the users PC before using Page 5 EARTIIPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO This is an easy process as the application and all the supporting files such as Data Sheets Arduino Examples and the application itself has been packed into Windows Installer files This comes in the form of two files gO J EPT_Serial_Graph_Tool EPT_Serial_Graph_Installer gt Release v Search Releas A NO a a OOOO _ Organize Share with Burn New folder 3 4 Earth People Technology gt J Boards 4 EPT Serial_Graph_Tool_32Bit 4 EPT Serial_Graph_Tool 4 EPT_Serial_Graph_Tool 4 EPT_Serial_Graph_Installer a REPT Serial Graph Tool DJL bin vE m A 2 items Just double click on the setup icon to launch the installer Click through all of the install screens by clicking Next Name ff EPT_Serial_Graph_Installer D setup auj J Serial Graph Toal Select Installation Folder I Serial Graph Tool Welcome to the Serial Graph Tool Setup Wizard m re The installer will install Serial Graph Tool to the following folder The installer will guide you through the steps required to install Serial Graph Tool on your computer The inst
35. y send the formatted data to be graphed by Serial Graph Tool The protocol is a command data model The Master sends a command to the Slave Then it sends some data The only command that is not followed by data is the Frame End command Data Description Data Length Data Format Channel Data to be graphed No Restriction 8 Bit Each data packet is 8 Bits However each data element to be graphed can be up to 16 Bits e e The Arduino will send the Channel Command with the selected channel before sending any data See the figure below It shows two channels being written to followed by a Frame End EPT SERIAL GRAPH TOOL MESSAGE FORMAT THE TOOL CAN ACCEPT UP TO 8 CHANNELS COMMAND BYTES COMMAND BYTES CHANGE TO CHANNEL 1 CHANGE TO CHANNEL 2 DATA FOR CHANNEL 1 Conra2 Conran FRAME END CMD DATA FOR CHANNEL 2 COMMAND BYTES COMMAND BYTES CHANGE TO CHANNEL 1 DISPLAY DATA DATA FOR CHANNEL 1 Command The number of eight bit data packets that follows the Channel Command is dependent on user code There are no restrictions on how many data packets follow the Channel Page 20 fa EARTHPEOPLE TECHNOLOGY User Manual EPT SPI Serial Graph Tool For the UNO Command Each 8 bit data packet in both the commands and data follow the SPI signaling convention This means the Arduino SPI library is used to send commands and data over the SPI bus Serial Graph Tool Arduino Coding This
Download Pdf Manuals
Related Search
Related Contents
Sony SMU-S1 Operating Instructions 5. datalogger - PCE Instruments 取扱説明書 (1.08 MB/PDF) operating manual - ICARE Sailplanes and Electrics Avaya IP Office Softphone - Northwest Communications Inc. HP ProBook 6475b Roksan Audio Mseries-1 User's Manual INSTALLATION MANUAL INSTALLATION MANUAL 1501X Service Manual - Martin Yale Industries Copyright © All rights reserved.
Failed to retrieve file