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

by BoianM in Circuits > Arduino

13136 Views, 19 Favorites, 0 Comments

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

Arduino Mega and Visuino: Connect AD7606 8 Channel 16 Bit Bipolar ADC 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.

Understanding How the AD7606 Works

AD7606-7606-6-7606-4-fbl.png
580a6a06deafa4a1f2000a45.jpeg

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.

Components

580947cf4936d47352000295.jpeg
58096c2745bceb4e690001bf.jpeg
56e1c29d15be4d76660005db.jpeg
  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

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

580936ae67400cf18700022a.jpeg
DSC05796.JPG
58093fb850e1b6ea770001be.jpeg
58093f5115be4d927400028c.jpeg
  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)

Connect the Busy and Reset Signals of the AD7606 Module to Arduino

58094058deafa4a1f2000286.jpeg
580940ce67400cf18700026f.jpeg
580941e850e1b6ea770001ce.jpeg
580941fc4fbade15eb000102.jpeg
  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)

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

580944154936d47352000277.jpeg
5809444d50e1b65d420002a7.jpeg
5809455e50e1b65d420002b0.jpeg
5809458b937ddbddd80002ba.jpeg
580945c867400cf187000296.jpeg
  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)

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

580949c945bceb96a10002d6.jpeg
580949fb15be4d92740002ea.jpeg
580949e5937ddbddd80002dd.jpeg
5809485750e1b65d420002c8.jpeg
  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)

Connect the Ground and Power Wires to the AD7606 Module

58094afc50e1b65d420002d9.jpeg
58094d1f15be4d6901000225.jpeg
DSC05714.JPG
58094d572e7fb678a90002f7.jpeg
58094e2015be4d6901000226.jpeg
  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)

Connect the Ground and Power Wires Between the AD7606 Module and Arduino

58094e9115be4d927400030b.jpeg
5695929050e1b652510007ee.jpeg
  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

Connect the Joystick to the AD7606 Module

580954ad4936d473520002f6.jpeg
58094f26937ddbddd80002fd.jpeg
58094fb067400cee65000211.jpeg
580951154936d473520002d7.jpeg

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 Channels V1 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)

Connect Separated Power to the Joystick

580954d84fbadec9f900023d.jpeg
580954ff67400cee65000224.jpeg
5809551f4fbade15eb000113.jpeg
5809553b45bceb96a1000327.jpeg
  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)

Start Visuino, and Select the Arduino Board Type

SelectBoard.jpg
SelectMega.png

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

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

ComponentAD7606.png
ComponentAD7606Connect1a.png
ComponentAD7606Connect3.png
ComponentAD7606Connect2.png
ComponentAD7606Connect4.png
  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)

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

ComponentAD7606Connect5.png
ComponentAD7606Connect6.png
ComponentAD7606Connect7.png
ComponentAD7606Connect8.png
ComponentAD7606Connect9.png
  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)

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

ComponentPacket.png
ComponentPacketSetup.png
ComponentPacketAddAnalog.png
ComponentPacketAddAnalogAdded.png
  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

In Visuino: Specify Unique Packet Header

ComponentPacketHeaderAdd.png
SetupHeader.png

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

In Visuino: Connect the Packet Component

ComponentPacketConnect1.png
ComponentPacketConnect2.png
ComponentPacketConnect3.png
  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)

Generate, Compile, and Upload the Arduino Code

Generate.png
ArduinoIDE.png
  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)

And Play...

VisuinoDiagram.png
SerialSetup2.png
SerialScope.png
SerialGauges.png
5809158150e1b6ec14000095.jpeg
Arduino Mega and Visuino: Connect AD7606 8 Channel 16 Bit Bipolar ADC in 16 bit parallel mode

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