Introduction: Arduino Mega and Visuino: Connect AD7606 8 Channel 16 Bit Bipolar Analog to Digital Converter in 16 Bit Parallel Mode

AD7606 is a very nice 8 Channel 16 Bit Bipolar Analog to Digital Converter manufactured by Analog Devices. The module has great many features, including Sample and Hold for the 8 Channels, per channel Analog filters, shared digital filter, and more. It is also capable of working in 3 different modes - 16 bit parallel mode, 8 bit parallel mode and Serial mode.

Few weeks ago I was asked to add AD7606 support for Visuino, and ICStation generously offered to send me one AD7606 Module. The module arrived, and I started working on the Visuino support. The module came pre-configured for 16 bit parallel interface, and I decided to add this first, before I start reconfiguring it for the other modes. The support was added to Visuino, but other priorities prevented me from making Tutorial for it. Finally I have found some time to make this Tutorial, and once done, I will see to re-configure the module and add support for the rest of the modes in Visuino.

Step 1: Understanding How the AD7606 Works

Picture of Understanding How the AD7606 Works

The AD7606 (Picture 1) is 16 bit ADC with 8 Bipolar channels (Each channel has its own ground, and can measure both positive and negative signals). It has Sample and Hold components for each channel, and individual per channel filters. It also has a shared digital filter.

There are readily available modules with the AD7606, and I recently received one generously donated by ICStation(Picture 2).

The AD7606 can be configured to work in 3 different modes. 16 bit parallel, 8 bit parallel, and Serial.

The AD7606 Module that I received has the option to be configured in any of the 3 modes, by an SMD resistor (Picture 2). Unfortunately the labeling on the module is confusing or incorrect, and although the module from the picture appears to be configured for 8 bit parallel, it is actually configured for 16 bit parallel mode. I plan to move the resistor and reconfigure the module, so I can make Tutorials in 8 bit and Serial mode, but since there is a danger to damage the module in the process, I am first making this Tutorial with the 16 bit parallel mode.

Step 2: Components

Picture of Components
  1. One Arduino Mega - you need enough pins for the 16 bits of the data bus
  2. One AD7606 8 Channel 16 bit Bipolar Analog to Digital Converter Module
  3. One small Breadboard (Any breadboard can be used, or any other way to connect 3 wires together)
  4. One Joystick that I got from this cheap 37 sensors set (I use the Joystick to generate analog signals for the AD7606 Module. You can use any other source of +/- 5 V Analog signal to test)
  5. One K2 Breadboard power supply with adapter (Picture 2)
  6. One Jumper with open top (Picture 3) allowing a wire to be inserted from the top side between the pins
  7. 17 Female-Female jumper wires
  8. 29 Female-Male jumper wires
  9. 2 Male-Male jumper wires
  10. 5 Female-Female jumper wires

Step 3: Connect the Data Bus and the Chip Select Signals of the AD7606 Module to Arduino

Picture of Connect the Data Bus and the Chip Select Signals of the AD7606 Module to Arduino
  1. Connect the Female ends of 16 Female-Male wires to the DB0 to DB15 pins of the AD7606 Module (Picture 1)
  2. Connect the Male end of the wires in the same order (DB0 to Pin 14) to the Digital pins 14 to 29 of the Arduino Mega board (Picture 2)
  3. Connect the Female end of a Female-Male(Gray wire) to the CS pin of the AD7606 Module (Picture 3)
  4. Connect the Male end of the CS wire(Gray wire) to the Digital pin 3 of the Arduino Mega board (Picture 4)

Step 4: Connect the Busy and Reset Signals of the AD7606 Module to Arduino

Picture of Connect the Busy and Reset Signals of the AD7606 Module to Arduino
  1. Connect the Female end of a Female-Male(White wire) to the Busy pin of the AD7606 Module (Picture 1)
  2. Connect the Male end of the Busy wire(White wire) to the Digital pin 7 of the Arduino Mega board (Picture 2)
  3. Connect the Female end of a Female-Male(Brown wire) to the RST pin of the AD7606 Module (Picture 3)
  4. Connect the Male end of the RST wire(Brown wire) to the Digital pin 5 of the Arduino Mega board (Picture 4)

Step 5: Connect the Read, CVA, and CVB Signals of the AD7606 Module to Arduino

Picture of Connect the Read, CVA, and CVB Signals of the AD7606 Module to Arduino
  1. Connect the Female end of a Female-Male(Orange wire) to the RD pin of the AD7606 Module (Picture 1)
  2. Connect the Male end of the RD wire(Orange wire) to the Digital pin 2 of the Arduino Mega board (Picture 2)
  3. Insert the Jumper with open top to connect the CVA and CVB signals of the AD7606 Module (Picture 3)
  4. Insert Male-Male(Green wire) in the center of the Jumper with open top between the CVA and CVB signals of the AD7606 Module so the wire will make electrical contact with both pins (Picture 4)
  5. Connect the Male end of the CVA/CVB wire(Green wire) to the Digital pin 6 of the Arduino Mega board (Picture 2)

Step 6: Connect the OS0, OS1, and OS2 Signals of the AD7606 Module to Arduino

Picture of Connect the OS0, OS1, and OS2 Signals of the AD7606 Module to Arduino
  1. Connect the Female end of a Female-Male(Orange wire) to the OS2 pin of the AD7606 Module (Picture 1)
  2. Connect the Female end of a Female-Male(Blue wire) to the OS0 pin of the AD7606 Module (Picture 2)
  3. Connect the Female end of a Female-Male(Purple wire) to the OS1 pin of the AD7606 Module (Picture 3)
  4. Connect the Male end of the OS0 wire(Blue wire) to the Digital pin 8 of the Arduino Mega board (Picture 4)
  5. Connect the Male end of the OS1 wire(Purple wire) to the Digital pin 9 of the Arduino Mega board (Picture 4)
  6. Connect the Male end of the OS2 wire(Orange wire) to the Digital pin 10 of the Arduino Mega board (Picture 4)

Step 7: Connect the Ground and Power Wires to the AD7606 Module

Picture of Connect the Ground and Power Wires to the AD7606 Module
  1. Connect the Female end of a Female-Male(Black wire) to the RAGE pin of the AD7606 Module (Picture 1)
  2. Connect the Female end of a Female-Male(Red wire) to the VIO pin of the AD7606 Module (Picture 2 and 3)
  3. Connect the Female end of a Female-Male(Black wire) to the GND pin of the AD7606 Module (Picture 4)
  4. Connect the Female end of a Female-Male(Red wire) to the +5V pin of the AD7606 Module (Picture 5)

Step 8: Connect the Ground and Power Wires Between the AD7606 Module and Arduino

Picture of Connect the Ground and Power Wires Between the AD7606 Module and Arduino
  1. Connect the Male ends of the Ground Wires(GND and RAGE) (Black wires) to the Ground pins of the Arduino Mega board (Picture 1)
  2. Connect the Male end of a Male-Male Power wire (Red wire) to the 5V Power pin of the Arduino Mega board (Picture 1)
  3. Connect the Male ends of the 3 Power wires(Red wires) - the 2 wires(+5V and VIO) from the AD7606 Module, and the one from Arduino together as example with the help of a Breadboard (Picture 2) - In my case I used a small Breadboard

Step 9: Connect the Joystick to the AD7606 Module

Picture of Connect the Joystick to the AD7606 Module

To test the AD7606 Module we can use a Joystick. We will connect it to the first 2 Analog inputs, and will leave the rest unconnected. If you want, you can connect other analog signal sources to the rest of the channels.

  1. Connect Female-Female wires to the Ground(Black wire), Power(Red wire), VRx(Yellow wire), and VRy(Green wire) of the Joystick (Picture 1)
  2. Connect 2 Female-Female(Black wires) wires to the Ground pins of the first 2 Analog ChannelsV1 and V2 of the AD7606 Module (Picture 2 and 3)
  3. Connect the other end of the VRx wire(Yellow wire) to the Signal(Vx) pin of the first Analog Channel V1 of the AD7606 Module (Picture 4)
  4. Connect the other end of the VRy wire(Green wire) to the Signal(Vx) pin of the first Analog Channel V2 of the AD7606 Module (Picture 4)

Step 10: Connect Separated Power to the Joystick

Picture of Connect Separated Power to the Joystick
  1. Make sure the Power Selection Switch of the K2 power supply is set to 5V (Picture 1)
  2. Connect the other end of the 3 Ground wires (Black wires) from the Joystick and the AD7606 Module to the "-" Ground pins of the K2 Power supply (Pictures 2 and 3)
  3. Connect the other end of the Power wire (Red wire) from the Joystick to the "+" Power pins of the K2 Power supply (Picture 4)

Step 11: Start Visuino, and Select the Arduino Board Type

Picture of Start Visuino, and Select the Arduino Board Type

To start programming the Arduino, you will need to have the Arduino IDE installed from here: http://www.arduino.cc/ .

Make sure that you install 1.6.7 higher, otherwise this Tutorial will not work!

The Visuino: https://www.visuino.com also needs to be installed.

  1. Start Visuino as shown in the first picture
  2. Click on the "Tools" button on the Arduino component (Picture 1) in Visuino
  3. When the dialog appears, select "Arduino Mega 2560" as shown in Picture 2

Step 12: In Visuino: Add AD7606 Component, and Connect the Data, Oversampling, Busy, and the Reset Pins

Picture of In Visuino: Add AD7606 Component, and Connect the Data, Oversampling, Busy, and the Reset Pins
  1. Type "ad76" in the Filter box of the Component Toolbox then select the "Analog Devices AD7606 8 Channel ADC Parallel" component (Picture 1), and drop it in the design area (Picture 2)
  2. Click in the "Data" pins box of the AD7606ADC1 component to start connecting all the Data pins at once (Picture 2)
  3. Move the mouse over the "Out" output pin of the "Digital[ 13 ]" channel of the Arduino component. The Visuino will automatically spread the wires so they will connect correctly to the rest of the pins (Picture 2)
  4. Click in the "Oversampling" pins box of the AD7606ADC1 component to start connecting all the Oversampling pins at once (Picture 3)
  5. Move the mouse over the "Digital" input pin of the "Digital[ 8 ]" channel of the Arduino component. The Visuino will automatically spread the wires so they will connect correctly to the rest of the pins (Picture 3)
  6. Connect the "Busy" input pin of the AD7606ADC1 component to the "Out" output pin of the "Digital[ 7 ]" channel of the Arduino component (Picture 4)
  7. Connect the "Reset" Output pin of the AD7606ADC1 component to the "Digital" input pin of the "Digital[ 5 ]" channel of the Arduino component (Picture 5)

Step 13: In Visuino: Connect the AD7606 Component's ChipSelect, Read, and the Start Pins

Picture of In Visuino: Connect the AD7606 Component's ChipSelect, Read, and the Start Pins
  1. Connect the "ChipSelect" Output pin of the AD7606ADC1 component (Picture 1) to the "Digital" input pin of the "Digital[ 3 ]" channel of the Arduino component (Picture 2)
  2. Connect the "Read" Output pin of the AD7606ADC1 component (Picture 3) to the "Digital" input pin of the "Digital[ 2 ]" channel of the Arduino component (Picture 4)
  3. Connect the "Start" Output pin of the AD7606ADC1 component to the "Digital" input pin of the "Digital[ 6 ]" channel of the Arduino component (Picture 5)

Step 14: In Visuino: Add a Packet Component and 8 Binary Analog Elements to It

Picture of In Visuino: Add a Packet Component and 8 Binary Analog Elements to It
  1. Type "pack" in the Filter box of the Component Toolbox then select the "Packet" component (Picture 1), and drop it in the design area
  2. Click on the "Tools" button of the Packet1 component (Picture 2)
  3. In the "Elements" editor select the “Binary Analog” element, and then click 8 times on the "+" button (Picture 3) to add 8 Analog elements (Picture 4)
  4. Close the "Elements" dialog

Step 15: In Visuino: Specify Unique Packet Header

Picture of In Visuino: Specify Unique Packet Header

To make sure that Visuino will find the starting point of the packet, we need to have a unique header. The Packet component uses special algorithm to ensure that the header marker does not appear in the data.

  1. Select the Packet1 component (Picture 1)
  2. In the Object Inspector expand the "Head Marker"property (Picture 1)
  3. In the Object Inspector click on the "..." button (Picture 1)
  4. In the Bytes editor type some numbers, as example 55 55 (Picture 2)
  5. Click on the OK button to confirm and close the editor

Step 16: In Visuino: Connect the Packet Component

Picture of In Visuino: Connect the Packet Component
  1. Click in the "Out" pins box of the AD7606ADC1 component to start connecting all the Out pins at once (Picture 1)
  2. Move the mouse over the "In" input pin of the "Elements.Analog(Binary)1" channel of the Packet1 component. The Visuino will automatically spread the wires so they will connect correctly to the rest of the pins (Picture 1)
  3. Connect the "Out" output pin of the Packet1 component (Packet 2) to the "In" input pin of the "Serial[ 0 ]" channel of the "Arduino"component (Picture 3)

Step 17: Generate, Compile, and Upload the Arduino Code

Picture of Generate, Compile, and Upload the Arduino Code
  1. In Visuino, Press F9 or click on the button shown on Picture 1 to generate the Arduino code, and open the Arduino IDE
  2. In the Arduino IDE, click on the Upload button, to compile and upload the code (Picture 2)

Step 18: And Play...

Picture of And Play...

Congratulations! You have created an AD7606 8 Channel 16 bit Bipolar Analog to Digital Converter measuring project in Arduino, with Visual Instrumentation.

On Picture 1 you can see the complete Visuino diagram.

  1. In Visuino select the ComPort, and then click on the "Format:" drop down box, and select Packet1 (Picture 2)
  2. Click on the "Connect" button (Picture 2)
  3. If you select the "Scope" tab, you will see the the Scope plotting the values from the 8 Analog Channels over time (Picture 3)
  4. If you move the Joystick up and down, you will see the values of the first channel changing, and if you move it left and right you will see the values of the second channel changing. In the remaining 6 channels, you will see some small noise, as we did not connect any signal to them
  5. If you select the "Instruments" tab, you will see the Gauges showing the same information (Picture 4)

You can see the connected and running AD7606 8 Channel 16 bit Bipolar Analog to Digital Converter on Picture 5.

Also attached is the Visuino project, that I created for this Instructable. You can download and open it in Visuino: https://www.visuino.com

Comments

domingogarciaa (author)2017-04-19

Hello Mr. Mitov. I am trying to make this, but I have no reading from
AD7606. I have test all connections and I have check code sample, but I
can't find error. I have noticed that sample in visuino names "VisuinoAD7606Parallel8Tutorial.owarduino",
and I think that we are trying in 16bit parallel. Please,confirm that
sample code is ok. Thank you.

About This Instructable

2,307views

15favorites

License:

More by BoianM:Program Arduino UNO With Visuino to Draw on ILI9341 TFT Touchscreen Display Shield With PenAssemble Kuman Wi-Fi Robot With Camera and ManipulatorArduino and Visuino: Long Distance Remote Light Sensor With RFM95W/RFM98W Makerfabs LoRa Shields
Add instructable to: