The TFT HiFiDuino Chronicles: 21 months in the making..

Since the very beginning of my Buffalo III project, I had decided that I would use an Arduino to perform all of the control functions (source selection, volume control, setting of parameters, etc.).

At first I thought that I would just do basic interfacing, that is control the Buffalo by interfacing with the built-in controller. After taking a closer look at HiFiDuino’s work it became apparent to me that direct I2C interfacing was the way to go. Since I wanted to use a better display than the one used in HiFiDuino, I shopped around for a nice color TFT screen. I bought one from Adafruit and got busy. After a few hours of figuring stuff out and coding I got to this point:

IMG_5249_resize

IMG_5251_resize

The date was March 3, 2012.

On that day I started a thread at avclub.gr announcing my Buffalo controller.

At this point since a number of people had expressed interest in the project I thought it a good idea to look for a less expensive TFT, sourced through Ebay rather than Adafruit. $50 for a 2.8″ TFT is indeed a bit steep. I came across this little gem:

TFT280

At $20 the price was right, but it was not compatible with Adafruit’s display library so I searched for a compatible library. I came across Harl Henning’s UTFT library which appeared to be exactly what I needed. It was compatible with a large number of TFTs, including the ones that I had on hand. I took care of some signalling issues (the new TFT needed 3.3V signalling but the Arduino Mega is 5V) and proceeded to adapting the code to the UTFT library.
At that time I discovered that HiFiDuino had also just discovered the UTFT library and was planning to use it as well. That was a nice surprise. He had got a hold of a 3.2″ 400×240 TFT which was also available on Ebay so I also ordered one and decided to standardize on that. The date was April 15, 2012. It was Easter.

While waiting for the 3.2″ TFT, I continued my work on adapting the code to the UTFT library. After having tried various fonts, including making a few of my own, I settled on these:

IMG_5388_resize

By the end of April the 3.2″ TFT had arrived and I confirmed that it worked. This is what it looked like with no code changes (they would be necessary since I wanted to make use of the total screen real estate).

IMG_5410_resize

At that time the weather got pretty warm so I froze all DIY activities for the summer. The DAC was not really finished but it was functional at the time so I was in no rush.
It was not until late November that I resumed the project. The new Arduino Due was becoming available in stores and I was anxious to see whether the improvement in speed would actually translate to real world improvement in Buffalo response times. Before the end of November I had received the Due.

533545_4591777745791_109805203_n

Since the Due was built using 3.3V logic, it was now easier to interface with the 3.2″ TFT and also the I2C lines would no longer need level change to the 3.3V that the Buffalo liked.

At this time I realized that there where 2 obstacles that I had to overcome:

1) The UTFT library was not compatible with the Due.
2) The Due did not have any on-board EEPROM so I could not save my code settings.

The first problem was solved 10 days later when a couple of lovely people at arduino.cc took it upon themselves to make changes to the UTFT library so as to support the Due. The hacked version of the library worked like a charm. I was very impressed with how little time it took these guys to adapt the library.
The second problem I tackled on my own, by adding a 24LC256 EEPROM chip to the design and adapting the code.

This is when I first came up with the idea of designing a custom shield for the controller. It would accommodate the 24LC256 as well as the necessary parts for electrical isolation between the Arduino and the Buffalo.

By mid January I had made sure that my code ran equally well on the Due as well as on the Mega, so I thought that I would produce a short video demonstrating the difference in processing power. That video has since gotten more than 2.000 views per month. Here it is:

By the end of February I had proceeded with polishing the code and had a rough draft of the shield.

About a month later I had a (nearly) working prototype of my new shield:

IMG_6274_resize

At that time, once again, the weather got too good for DIY so I suspended the project until September.

While I was on summer leave I got a little bored so I resumed the project. It moved along pretty fast, and soon I had a final version of the shield:

Arduino_Shield_v.1.1_1_800x872

..and a v.1.00 of the code:

v.1.00_screenshot_1_800x471

I proceeded to release the actual code and schematics for the shield on September 3 & 7 respectively, as well as some basic instructions on building it.

The next step was to make the code more Buffalo-III SE friendly, since most people buying Buffalos were going for the SE. I had one last request: to give the option of always-on, in other word to make it possible to bypass the “on/off” portion of the code. That was pretty easy to implement. At last, I made a few aesthetic changes. The end result was v1.06b, released at December 11, and it looked like this:

IMG_6903_fix_&_crop_res IMG_6905_crop_res

(the above screens are from the Buffalo-III SE version of the code)

And that’s it so far.

Comments

comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.