A solution for a free programmable 2x16 dot matrix LCD Display
This is how you could welcome yourself when the system is powering up. But any text is possible ...
In, what feels like another century (haha actually true), I used to be able to write programs for microprocessors in machine code.
A hard job and you need tons of time for little result. I did pick up the fact, that programming these days has become much easier
thanks to high level programming language (Like C) and complete platforms with pre-written program parts (the so called libraries).
The past years I have been writing quite some code for Office-macros. Simply to automate boring daily stuff in statistics.
Making a longs story short, programming is FUN! It is always a challenge to make something work and fit the pieces of the puzzle.
Now Lucian made a firmware upgrade for the WaveIO Module to make it work up to 384kHz. As the LED indicators are not enough to indicate that,
he decided to use for 352.8kHz the 88.2 and 176.4 LED and consequently the 96 and 192 LED for 384kHz. At this point I said, OK lets make a LCD
display solution.... I picked the Arduino platform for this to keep things simple. The Italian guys who set up this platform did a great job
and you get used to it VERY quickly... It took me one evening to get this up and running...
I won't go into detail on how Arduino works. Why not check their Website? It is great and has very good learning tools...
The Arduino Homepage
With an Arduino board your options are suddenly only limited by your creativity and imagination. EVERYTHING is possible. For testing
purpose I already set up a small experiment where I can control things (switches, volume control etc) with my Apple remote control ;-)
Any way, next project will be a LCD in my Tube amplifiers, as a sentinel for the Bias voltages. Nice % read out, so I know when to change the Tubes.
May be Vu meter as well? As said, imagination is everything... (send ideas !!! ;-)
The Solution for the DDDAC:
Just up front. This is totally flexible. Just change the display texts in the code and you have your own personalized LCD...
Anyway... my personal choice was the following:
- I completely arbitrarily picked the Arduino UNO... They supply much more boards, but UNO will do the job :-)
- Start with a welcome boot message (just for fun)
- Check the 12 Volt supply if below 11.4V and display a LOW battery warning(My DAC can run on batteries as well)
- Check if there is a computer connected to the WaveIO or switched on (Host Active)
- If music is streamed, display the actual sample rate in kHz
- Always displays the actual power supply voltage
Indeed, it was fun programming it and also (for publishing purposes) write some serious comments how things work, into the code file.
Of course I will share actual code (version 5.0) below. Have a try reading and understanding it. You can also download
the INO file which works with the Arduino EDO control software
Page with the Arduino Code
A close up of the Arduino
The Arduino has digital and analog in/outputs. I use a combination, as there are not enough digital inputs on the board.
But an analog input can be used for a digital decision as well of course. basically you must connect the output from the WaveIO
directly to the Arduino board. Do not use the LEDs; when they are "HIGH" the voltage over the LED is only 2.1 Volt.
The Arduino (working on 5 Volt) sees this as a "LOW".
The other connections are pretty straight forward. The LCD is described in depth on the Arduino site. Also the WEB is full
of other examples
The Arduino UNO is highly versatile and cost like 25 Euro only ...
Arduino connected to the LCD
As said, relatively standard connection. Just to make sure: Pin Vo is for contrast and I used the trimmer (10k) to set the contrast right.
The Background illumination is done by LEDs and I use a 330 Ohm series resistor. use one or may be burn the display...
you can go lower or higher without any problem. It is not critical (but stay above 100 Ohm I suggest)
VERY IMPORTANT: Do NOT connect the 12 Volt just like that to the analog input (A0). The processor will be damaged. Max input is 5 Volt.
Therefore (hard to see on the picture) I used a voltage divider of 4:1 Very easy: 10k in series and 3k3 to ground :-)
This point goes to A0. In the code there is a mapping function to multiply the reading back to the original value. Actually if you check with a
good Voltmeter, you can tweak the mapping function for exact reading of course (just compare the two readings)
|Arduino & LCD display:|
Still on a bread board, but very simple to implement in a chassis of course
Connections Arduino and LCD
A good view on how it is all interconnected. This wiring scheme is not a MUST. You are flexible to assign pins. I made it so, the
WaveIO is at one side (d8-d13) and the display takes d3-d7. d0 and d1 are used for the communication with the computer, so I decided
not to use them. If they are connected in a live system, there are sometimes issues with uploading the code to the Arduino.
As you see, the USB port is not connected. It is only used to upload the code in the beginning. After loading your code
the system works stand alone after power is connected... You can also see I used a DC
adapter to supply the Arduino. When i finally will put it in the DAC chassis, I will use the 12 Volt supply of course ...
|Wiring up, the connections:|
A good top view of the connections... click for larger view
Regardless if there is a host or not, or music is playing, this message will display. That is the idea of a warning message after all, isn't it?
The level of 11.4 Volt can be "programmed" of course ;-)
Low battery will always show and stay till voltage goes back > 11.4Volt
When nothing is connected to the WaveIO, the display shows "no host". Quite logical eh? BUT, this will
only work with an external 5 Volt supply for the WaveIO. Clearly, when the USB Board has no power, the LED outputs are "undefined"
and the display will flicker a little bit as host and no host alternate at high rate...
With no host, the power supply voltage is measured anyway
This message will display when the host is connected and the USB board is recognized by the operation system. No music is playing
yet. If the music starts streaming the next message show up ...
When the host is active, this is indicated in the display
As soon as the music is streaming, there is an indication for the sample frequency. In this case 44.1 kHz
Of course all sample rates will be indicated. The text can be freely programmed
Here a good example, the code logic works fine for the "too high" sample frequencies. In this case 352.4 kHz
This shows the flexibility of the processor. Actually we could have much more information through the LEDs now. Work for Lucian? ;-)