Before you start you have to familiarize with Due pin numbers and positions. I found very handy marking all used pins with different colors:
For each rotary encoder, except for the VFO, you need 3 pins: two are reserved to A and B encoder ports and the third is used by the push button. Each encoder, also need +5V and GND connections, but in the schema they are not shown.
You have to refer to the TFT shield documentation to be sure what are the used pins. It is the best way to avoid issues during the following stages. In the picture below you can see the schema of my TFT board.
You may experience some problems with shields that came with the wrong jumper settings. Before install it be sure the jumper configuration is like in the following schema:
You can see the jumper layout in the picture below (many thanks to George, W2GS).
Make sure that the whole set display works: you have to assemble TFT Display, TFT Shield and DUE board as shown in the picture.
Then load the sketch you can find in UTF libraries provided below. Unzip the file in the directory <Arduino user dir>\libraries\
and load the file you'll find in the directory :
<Arduino user dir>\libraries\UTFT\examples\Arduino (ARM) + Teensy\UTFT_Demo_800x480_IW7DMH\UTFT_Demo_800x480_IW7DMH.ino
Download UTFT libraries from here UTFT.ZIP
Now you have to test the touch screen. Simply load the sketch you can find in UTOUCH libraries provided below. Unzip the file in the directory <Arduino user dir>\libraries\ and load the file you'll find in the directory :
<Arduino user dir>\libraries\UTouch\examples\Arduino\UTouch_ButtonTest\UTouch_ButtonTest_IW7DMH.ino
Download UTouch libraries from here UTOUCH.ZIP
If Touch Button Test wasn't fine you need execute to the Custom Touch Calibration
After the previous test you may have seen that the TFT shield gets all DUE pins, making it impossible to use the other free pins.
So it is better to connect the TFT board using free jumper wires and plugging the Ethernet shield on the DUE.
Note: before installing the Ethernet Shield you need the modification shown in NOTE-1 paragraph at the end of the page.
Now you can test the Ethernet shield. As we are using the official W5100, you can use a test example available out of the box in the Arduino IDE.
Connect the shield to your router using an ethernet cable and load the scketch from the menu: File->Examples->Ethernet->DhcpAddressPrinter..
Opening the serial console you should see the assigned IP address like in the picture below.
You need a lot of patience non and have to be careful. You have to connect all yellow pins (refers to the first picture) to the TFT board using a bunch of jumper wires.
To be sure everything is done properly test again your display loading the sketch used before (UTFT Libraries). You should see the same animated pictures of the first test.
In the picture below you can see my protoype. Really it is a bit confused, but it works very well.
A lot of the encoders now!! But that is why we are here! We need the soldering iron, but don't worry, it is a very easy
The easiest one is just the VFO: you have to wire pins 8, 9, +5V and GND. Usually high speed encoders are equipped with internal debouncing circuit and this makes work much easier. In the previous picture you can see the schema connection label: WHITE: +5-24V, RED Output A, GREEN Output B, BLACK Ground.
In order to get it to work, some kind of high speed encoders, needs to add pull up resistors. It's interesting to look at the specs for the various units. Another common connection schema is the following: RED: +Vcc, YELLOW Output A, GREEN Output B, BLACK Ground, so be careful because a wrong connection can damage the device.
To test this encoder you can use the sketch provided in the provided libraries. Unzip the two directories, Bounce and SimpleEncoder, in the <Arduino user dir>\libraries\ directory then copy the directory Simple in <Arduino user dir>\projects\ directory. Now load the sketch Simple.ino and start the test.
At the monent the 5-inch TFT display is still not configured, so you need to open the serial monitor in the Arduino IDE. Final output is shown below.
Download SimpleEncoder libraries from here SIMPLEENCODER.ZIP
Now you have install the remaining eight encoders. The model I choose has perfect mechanics, but each one requires a debounce circuit to prevent fake readings during the rotation. The recommended
circuit require n. 6 10k-Ohm resistors and n. 3 10nF capacitors (103). Actually, in the schema shown below, you can see a 74HC14 CI, but in my prototype I didn't need of it.
As the the encoder is big enough, I mounted the components directly on its body and this greatly reduced the assembly efforts.
You should have something like in the picture below.
THE ENCODER PIN MAP
GND and +5V lines are parallel connected to each encoder. A, B and Button lines are connected as in the schema below.
Before the final assembly it is better to test singularly each encoder. You can use the sketch I wrote for my control library.
Unzip the provided file in the directory <Arduino user dir>\libraries\ and load the file
<Arduino user dir>\Arduino\projects\knobDue\knobDue.ino.
At the monent the 5-inch TFT display is still not configured, so you need to open the serial monitor in the Arduino IDE and check the output.
As you can see now you have a multifunction knob. The encoder has a list of controls, like AGC-T, AudioLevel, Balance. By clicking the button you can select a control at a time, while rotating the knob you can change its related value.
You have to repeat the test eight times. Each time you have to modify the sketch with the corret pin number (define staments at rows 6,7,8 ENC_PINA/ENC_PINB/BUTTON), reload in to the Due
board and open the seral monitor.
Download KnobDue libraries from here KNOBDUE.ZIP
You need to reset the Due board each time you power up the controller. You need to wire an external button following the schema below.
Now you should arrange the components in a box like the one shown in the Hardware page.
It would be nice, in the future, to design a box using a 3D printer.
It is time to program your console now!! :)
NOTE 1 - Replicating ICSP-Lines
Both shields (TFT and Ethernet) needs all the ICSP lines to work properly. When you plug in the Ethernet shield you can't use the same ICSP lines for other shields. So you need to make a small
modification: simply solder 6 pins on the top side of the shield as you can see in the picture below. Now you can use the jumper wires to connect other shields.