Head-Fi.org › Forums › Misc.-Category Forums › DIY (Do-It-Yourself) Discussions › The LCDuino-1 I/O processor
New Posts  All Forums:Forum Nav:

The LCDuino-1 I/O processor

post #1 of 403
Thread Starter 
Last update: April 25, 2010


- April 25, 2010: All future announcements and updates for the LCDuino-1 and related app modules (δ1 relay-based attenuator, δ2 relay-based input/output selector, and others) have moved to the new AMB DIY audio forum. We have an entire forum category dedicated to the LCDuino system, with separate sub-forums for each module. LinuxWorks and I will focus our support of these projects there. We welcome your continued interest and participation.
- Mar 25, 2010: The δ2 (delta2) relay-based input/output selector application modules has been posted.
- Mar 14, 2010: The δ1 (delta1) relay-based attenuator application module has been posted.


Ever since I built my β24 power amplfier, I've been wanting to build a high-end pre-amp to match. However, rather than using ordinary rotary switches for input/output selection, and a conventional potentiometer or stepped attenuator based on a mechanical switch for volume, I wanted to do something better.

There are off-the-shelf solutions available for relay-based selectors, relay-based, chip-based or motorized pot volume controls, etc., but virtually all of them are designed for a singular purpose, some are operable with a remote control, some not. Some have a display for status, some don't. It would be nice to have all of those features, yet implement it in an extensible manner such that more capabilities could be added without wholesale redesign, and to allow a builder to tailor the system to suit his/her exact needs.

Many of you may have noticed the recent Arduino-based LCD driver circuits that linuxworks built on perfboards, controlling a myriad of devices such as the input/output selector and volume control for his β22, a S/PDIF input selector, and even an Espresso machine monitor/controller. Many months ago we began exploring the idea about turning the basic concept into a generic, extensible and modular platform, usable for many applications not only for audio, but other devices too.

Arduino is attractive because of the rich set of tools, libraries, code and support available for firmware development. It uses the C programming language and the GNU C compiler (gcc) in a nice graphical integrated development environment. The environment runs on Linux, Windows and MacOS X. There is also a large and active Arduino programmer and user community where Open Source is de rigeur. In all it's a very exciting and dynamic scene and fits perfectly with the spirit of our project and goals.

The LCDuino-1

The first result of this collaboration is the LCDuino-1 I/O processor, which will serve as the "heart" of the entire framework.

LCDuino-1 is basically an LCD driver circuit based on a customized Arduino platform with some extra features. This board has two 6P pin headers which will mate up with matching receptacles on an industry-standard 2 row x 16 characters LCD module (80mm x 36mm, parallel interface, 5V DC, low-power backlighting). These LCD modules are available in various colors and backlighting, transmissive or transflective. Here are some examples of usable LCD modules. The LCDuino-1 has the same form-factor as the LCD module, with matching screw hole locations. When mated together, they become a two-board "sandwich" that is easily mounted to an enclosure's front panel. LCDuino-1's slim profile allows the assembly to fit in a 1U rack case. Off-the-shelf front bezels are available for these LCD modules.

Depending on the nature of the application, the LCD display would show the current input/output selection, a volume control bargraph, the date and time (see below), or some other information as appropriate.

It is worth noting that the LCD module is actually optional, LCDuino-1 could function without one. There may be applications where no display is required, yet LCDuino-1 could still serve as the control center.

The main component on LCDuino-1 is the Atmel ATMEGA328P microcontroller. See the datasheet for chip features, you'll notice that amongst other features, this microcontroller offers many digital and analog I/O ports, I²C serial bus support and serial UART for program download, making it very versatile as a monitor and controller for devices. The microcontroller is clocked by a 16MHz ceramic resonator, and has an onboard pushbutton reset switch should the need arise.

On the LCDuino-1, the I²C bus is connected to an onboard MCP23008 port expander chip, which gives us 8 more I/O ports. Six of these ports are used for controlling the LCD module. This means that we only consume 2 of the microcontroller's ports to operate the LCD module (plus one more port for the backlight). The I²C bus can be extended offboard to other devices (see "Application modules" below).

An optional real-time clock chip DS1302 may be populated (clocked with a 32.768KHz crystal and could be backed up with an optional 0.022 Farad supercapacitor). This allows the LCD display to double as a date/time clock. The real-time clock option consumes three of the microcontroller's ports.

A 3P pin header is provided to connect a Vishay TSOP34838 infrared receiver for remote control purposes. The infrared receiver's output uses up one microcontroller port. The module should be mounted on the enclosure's front panel.

The remaining microcontroller ports are connected to three rows of pads with 0.1" spacing, which could then be connected (via pin headers and receptacles) to other devices.

A 6P pin header allows a FTDI TTL-232R cable to be connected between a computer's USB port and the LCDuino-1 for program download purposes (see below). When installed in the target system, this connector is also where an offboard +5V DC power source would provide power to the LCDuino-1.

There are two LEDs on the LCDuino-1 board, one for power, and another for digital port 13 activity (the latter is customary on Arduino boards). There is also a trimpot for LCD contrast adjustment.

For versatility, a "prototyping area" consisting of an array of through-hole pads with 0.1" spacing allows custom added parts. Pads with +5V DC and GND are located nearby for convenience.

The LCDuino-1 PCB has a low parts count, no SMD parts, and all parts are easy to find. Therefore it's easy and inexpensive to build.

Application modules

The LCDuino-1 itself has enough I/O ports, both analog and digital, to implement simple control and monitoring functionalities. However, such features as input/output selectors, volume controls, etc., require extra hardware. We plan to introduce some or all of the following "application modules" in the future, which will inter-operate with the LCDuino-1:

- Relay based input and output selector
- Relay based volume control attenuator
- PGA2310 based digital volume control
- LDR (light-dependent resistor) based volume control attenuator
- Motorized potentiometer volume control
- X10 power line control
- Possible others

The LCDuino-1 platform and one or more of these "application modules" will be a new, versatile, high performance and extensible way to implement audio and non-audio control functionalities.

In some cases, a separate audio application module allows optimized placement within the system enclosure. For example, the input/output selector and volume control may be installed at the rear, adjacent to the rear panel jacks to minimize audio signal wiring and reduce the opportunity of interference and capacitive-coupling related stereo crosstalk.

I mentioned that LCDuino-1 does not require an LCD module to function, and the motorized potentiometer volume control may be a good candidate to be implemented with no LCD display at all.

Since the firmware will be open source, others are invited and encouraged to use LCDuino-1 as a platform on which to implement their own custom functionality, including more application modules.

Microcontroller programming

There are two steps to program the ATMEGA328P and make the LCDuino-1 functional:

1. Initialize the bootloader
2. Download the program (firmware) code

Both of these require special hardware, the bootloader needs a special AVR programmer dongle and ZIF socket board, and the program code needs to be downloaded with a special FTDI TTL-232R cable. Both need to be connected to the computer's USB port running the Arduino development environment.

I plan to offer pre-programmed microcontroller chips for some "canned" applications, so that builders need neither the special programming hardware nor the Arduino programming environment and firmware source code. Just plug and play.

For those who wish to use LCDuino-1 in a customized manner, then the programming cables and tools will be necessary.

Firmware progress

Linuxworks currently has separate versions of firmware code for each type of functionality that he has already prototyped on perfboard. The plan is to integrate them into a single source code base, add some application module auto-detect capability, and modularize the code to make it easier to understand and maintain.

An integrated code base would also allow a single program to support multiple application modules, so that only one variant of pre-programmed microcontroller chip could support all "standard" application modules.

Other work in progress is to improve the IR remote control support (learning capability, support more brands, etc.).

Schematic diagram

Here is the current schematic diagram of LCDuino-1.

PCB layout

Here is an image of the current PCB layout.

PCB 3D rendering

Here are 3D renderings of the top and bottom sides of the PCB.


- AMB's LCDuino-1 page
- linuxworks audio page


All future announcements and updates for the LCDuino-1 and related app modules (δ1 relay-based attenuator, δ2 relay-based input/output selector, and others) have moved to the new AMB DIY audio forum. We have an entire forum category dedicated to the LCDuino system, with separate sub-forums for each module. LinuxWorks and I will focus our support of these projects there. We welcome your continued interest and participation.
post #2 of 403
Thread Starter 
Here is the LCDuino-1 BOM.

post #3 of 403
Very cool Ti and linuxworks...Can already see many future DIY projects using this...making DIY more professional looking in addition to the coolness factor.
post #4 of 403
Hi amb, hi linuxworks,

nice to see that your LCDuino is announced. It is great and I personally think that you can allways need a bit more microcontrollers in your preamp.

Due to my personal need I have started to design an input selector and volume control, which is intended to run with the LCDuino.

I am happy to contribute it to your project. (see this thread).

It is basically all balanced stuff - but if it helps you I am happy if it is of any use for anyone.

Currently I am finishing the balanced input selector. Aim for this week is to get an volume control too.

post #5 of 403
Interesting, I just finished my MicroC project based on a 8051 chip for my university and I used LCDs too. I programmed everything using assembly language though

Would want to enter the prototyping team if not for my dreadful finals at this moment for 2 weeks.

I could use some PIC controller experience though
post #6 of 403
our project is now public

to keep myself occupied while the wait for the pre-production boards arrive, I took to modifying an M3 amp. here is a 'VOLUmastered' (lol) M3 with a proto-board LCDuino-1 and also a proto PGA vol control chip, mounted on a daughter card right where the volume pot would go:

(the colors are a bit off since I shot this at night and didn't have the right lighting)

on this build, I used a 'sparkfun' chip breakout board for the PGA chip and while its not optimal for trace layout, it does basically function. it takes 24v (dual rail) from the amp, itself; and needs only an additional 5v for its digital control side.

this install of the PGA is mostly just a proof-of-concept. we plan to do a proper PGA board but in the meantime, I needed one to install into my M3 so I just built one up pt-to-pt style.

also to come, we are planning on a relay-based attenuator (using latching relays), a version of the SPDIFmaster switch and some other goodies, too

in order to make the programming understandable, I am planning on some articles (HOWTOs) that will explain how you can take our code, bring it into the free software development GUI, make some changes and download the new version into your very own arduino board. I think (and hope) this will be a fun new adventure for many here.

for a long time, controllers (and programming them) was a 'secret society' (lol) that was reserved only for those who had background and experience in this subject and the many tools it took to follow that process. we're hoping to make this a bit more accessible with a common platform (initially the LCDuino-1) and enough code examples and pre-written working applications to start from.

some general arduino links to start off with:

- the arduino page: Arduino - HomePage

- the lady ada page (she does interesting and informative DIY arduino projects): Make stuff

- the arduino 'playground', which has many simple examples of arduino programming: Arduino playground - HomePage

- an announcement on the arduino forum for LCDuino-1: Arduino Forum - LCDuino-1 goes to pcb house
post #7 of 403
Great project.
post #8 of 403
looks awesome!
great work
post #9 of 403
Very cool guys, great work. Can't wait to spend some quality time reading all the info and I'll most certainly be using this in the near future.
post #10 of 403
very col. i'm looking at building a tube buffer/pre-amp/headamp to use with my Buffalo32 and headphones/ powered monitors. and this looks like just the ticket to ease me into such an alien headspace for me. and if its too much for my little brain I can likely find one of your default modules and adapt it for this purpose ie. output selection and volume control. nice work guys!!
post #11 of 403
I've been looking for a way to volume-control and input switch my planned MMM re-case and balancing act for a while now.

DACT doesn't have enough steps.
Khozmo is still an unknown quantity.
Joshua Tree draws way too much juice.

This is going to be *PERFECT*
post #12 of 403
just like when you do a build (or plan a build) you decide which components and parts you'll use, which boards you'll use and which features you offer the user.

same with this kind of project. its an 'infrastructure' with options that you can pick and choose from, user interface elements, real-world control primitives; and then some sample code that shows how you make use of these things.

the final part is the ability to take in the source code, mix and match how YOU want, then turn the crank and have it download your customized application. in the arduino world, there's one GUI that you download from the net (its free) and it runs on mac, linux, windows. its java based so it looks and feels the same way on all platforms. its the text editor and also it 'builds' the code from source and when you press the 'flash' button, it downloads the new code into the device (the amp you're working on).

I think it will be a kick (lol) to have users be able to flash their stereo systems with their own firmware! get used to seeing a usb connector (or something equiv) to download code, in the back of audio gear, now

one of the frustrations I felt with non-extensible code is that you are stuck with the style that the developer picked for you. I bought a preamp with an IR remote and display but found one feature so annoying that it made the whole device unusable to me. it had a display that scrolled and blinked and changed. I hated that. I thought about ways to work around it, somehow. some kind of blanking routine that I could layer on top of this thing. I actually considered stuff like that, for a while

but when you have source code to the device, you now have the freedom to say 'no scrolling on MY box!' and disable or change or, well, fix, any routines that don't act the way you want them to. then reflash your device and you now have the UI behavior you like.

in a way, I guess that 'binking screen' box I bought really pushed me over the edge and forced me to get into this microcontroller thing a bit more seriously. and once I found out how cheap and easy this arduino stuff was, I figured it would be a natural for DIY and audio. finally, people will be able to customize their UIs and not be stuck with what the manufacturer of the firmware decide. *you* are now the final manufacturer (if you want to be) of your own device. change the names, translate to local languages, even *add* blinking if you really want to.

the only real expense is a one time $20 cable which has a usb-to-serial chip inside and isn't at all a passive cable. that cable and the free software and free sample code is enough to get you up and running.

if you have a standard hitachi 2x16 or 4x20 lcd display, that's what we are using and those are easy to find/buy.

the port expander chip is in the dollar range and is pretty easy to find from the mailorder vendors.

the clock chip is a fun frill but not strictly needed in order to run the main programs.

I've been able to use any old IR receiver, even this crusty old radio shack 'pre war' (lol) metal shielded device:

IR was chosen as the primary input method. everyone has some kind of handheld IR remote control at home and the arduino can learn your remote codes. you now have a large multibutton input device and you only have to wire up a 3-pin dollar-priced part and drill a round hole in the chassis!

it should be a pretty easy project to build and all the parts are cheap and easy to source. cutting the rectangle hole in the chassis is probably the hardest part of this kind of project, now
post #13 of 403
Oh man, the more I think about this, the tighter my underpants feel.

The possibilities are endless. And such an ambitious project as well! I'm so glad AMB and Linuxworks are at the core of this...... I don't know who else could pull it off, and get it to the masses so effectively.
post #14 of 403
Just to add ideas to the Flame. Add a network module so you can control the preamp via the network. This could be very handy to use a device like an iPhone or ipod Touch as a remote for it.

Could also use it to display current track info if your source is a computer.
post #15 of 403
Originally Posted by m1abrams View Post
Just to add ideas to the Flame. Add a network module so you can control the preamp via the network. This could be very handy to use a device like an iPhone or ipod Touch as a remote for it.

Could also use it to display current track info if your source is a computer.

its very crude and needs a LOT of more software work, but what is shown here is the arduino talking over wired 10/100 ethernet, speaking tcp/ip to a webserver and getting current song name and time from that server. that server is running apache webserver and that connects to the 'mpd' (music playback daemon) which really plays the songs. its 'sound card' is a usb/spdif box that sends spdif to my dac. the dac feeds its analog out to a PGA volume control chip (similar to the m3 photo). the arduino controls that chip, too.

the neat integration part is that you see the volume level AND the song name/time info on the same screen. the arduino 'manages' both and does some web i/o for the song playback (and even pause, skip over the web, too); and also does local volume control in the analog domain. its a bit confusing since it has a few data paths (ethernet, usb, spdif, analog) and has 'control planes' (remote control and management) as well as 'data planes' (sound info).

I've been using that as my main music playback system the past few months. its been fun

here's what the development environment looks like and I've highlighted where the arduino sends out a web request, 'please pause that song' to my music jukebox:

the black region/window is the debug area and you can see a web style http header block followed by that green circled area. that's the business part we care about that's the abbreviated 'song and time info' block returned from the MPD playback process. the arduino gets this 'pound delimited string' of stuff back, parses out the fields and writes the values to the lcd in 3 lines of text. the display only updates the parts that change, so when one song is over and the next one starts, only the song name and play duration areas on the lcd have to be updated.

again, this is a very early proof-of-concept. a lot more work needs to be done to make this more of a finished application; but it shows some of the capability of what a simple 5v fanless cpu like the arduino can do, these days.
New Posts  All Forums:Forum Nav:
  Return Home
Head-Fi.org › Forums › Misc.-Category Forums › DIY (Do-It-Yourself) Discussions › The LCDuino-1 I/O processor