Saturday, May 21, 2011

Front Panel PCB Circuit Schematic


This PCB houses 8 buttons, 1 IR remote receiver, 1 LED, 1 VFD, and 1 30-pin FFC (flexible flat cable) connector along with several resistors and capacitors. Up on closer inspection (with the help of a multimeter) I was able to draw the schematic for this board:


Since I do not know the exact spec of the VFD (which has whopping 45 pins total but only 26 of them are actually connected), I've only indicated which VFD pins and FFC connector pins are connected.

The LED and IR receiver circuits are pretty straight forward.

The buttons, however, looked somewhat puzzling at first. But, further inspecting the main PCB (i.e., the other end of the FFC) revealed that both K0 and K1 are connected to an Onkyo proprietary front-panel control IC with pulled-up 2.7 kOhm resistors. In other words, there is a variable voltage divider which results in unique voltage at K0 or K1 for each button. The Onkyo chip has either a pair of A/D converter or of arrays of analog comparators.

What to do with Front Panel PCB

The initial idea was to design a replacement PCB with Noritake VFD and a socket for the Arduino Nano. However, I concluded that there would not be enough space for Arduino Nano and more importantly it is not very cost effective to order large sparsely filled board.

Instead, I've decided to design a smaller PCB to mount the Arduino Nano and connect it to the (modded) original front panel PCB.

  • Both IR receiver and LED circuits can be used as is.
  • Remove the original VFD, and attach the Noritake VFD PCB right on the vacated space. Interestingly, the height of the original VFD unit is pretty much the same as the height of the Noritake VFD module (VFD + PCB). The front panel PCB needs to be cut so that the 6-pin VFD connector is accessible.
  • Buttons. There are several alternatives here...

Button Circuit

I came up with 3 different approaches
  1. Use the existing voltage divider circuit with Arduino's ADCs
  2. Use 8-to-3 encoder (74148)
  3. Use Microchip 8-ch I/O Expander (MCP23S08)

Option 1. Use the existing voltage divider circuit with Arduino's ADCs


Pro:
  • Least amount of modification of the front panel PCB
Con:
  • More complicated Arduino firmware design
  • Arduino must monitor the buttons all the time and cannot be powered down.

Option 2. Use 8-to-3 encoder (74148)


Pro:
  • Interrupt-driven all-digital system
Cons:
  • Front-panel button circuits must be scrapped and rewired using jumper wires
  • Needs pull-up resistors

Option 3. Use Microchip 8-ch I/O Expander (MCP23S08)


Pros:
  • Clean interrupt-driven system
  • No extra hardware components (MCP23S08 has built-in pull-up circuits)
  • Each button press individually monitored
Con:
  • Front-panel button-related resistors must be removed and rewired using jumper wires

Verdict: Option 3 for simplicity, versatility, and "greenness".

Option 1 is appealing at first but ultimately got rejected due to its inability to power down the Arduino. Of the two digital, interrupt-driven approaches, Option 2 was the first one I considered (and tested) but went with Option 3 largely due to the pull-up resistor free design. Also, only Option 3 can detect of each button state change, which enables simultaneous multiple-button presses.

Saturday, May 14, 2011

INTEC275 PC: Main Internal Components

After much talk of AMD Zacate, I've decided to go with Intel Atom D525 for Intec275 PC. This rig is solely intended for music playback and CD ripping. Hence, the Zacate's advantage in graphics processing does not come into play. Plus, the Intel's D525 board costs $80 while the cheapest Zacate board is priced above $100.

So, in the end, here's what I got:


Component Manufacturer Model Cost
Motherboard+CPU Intel BOXD525MW $79.99
Memory Crucial (2 x 2GB) DDR3 1066 SO-DIMM $44.99
Power Supply FSP Group FSP120-50GNF 120W Single FANLESS FLEX ATX PSU $57.99
Hard Drive Western Digital WD15EARS Caviar Green 3.5" SATA 1.5TB $79.99
Optical Drive Panasonic UJ875A slot-loading slim DVD burner $16.00 (eBay)
Wireless NIC Intel Intel 622AN Mini PCI Express 6200 Centrino Advanced-N $20.95

A Couple Notes:

* Motherboard BIOS... The first thing when you buy an Intel motherboard is to flash its BIOS. Mine came with one that is 6 revisions older than the most current one (~10 mo old, it could just mean that it's not being sold well...) and Ubuntu had trouble with the default BIOS (locks up when CPU goes into deep sleep).

* 3.5" HDD... It's tight. I tried pre-fitting all the components into the Intec275 chassis and the HDD will be hanging over motherboard with 3/4" clearance. I may need to go to 2.5" HDD in the end. Fingers crossed.

* PSU version... I was hoping to receive the version 2 of FSP120-50GNF with SATA power and 4-pin 12V motherboard connectors but nope, got the first version with 4 strands of 4-pin molex connectors (8 connectors total). Bummer.

* Cables... In addition to above 2 power connector adapters, 2 coax cables for wireless antenna connection have to be purchased separately. Got a pair of 7" UL.FL to RP-SMA pigtail cables on their way now.

Thursday, May 5, 2011

XBMC -> MPD or XMMS2 based jukebox

I've started this project with intent of using XBMC as the base of my modded system. It appears to be a fantastic HTPC program. However, the INTEC275 PC is aimed to be a (digital) jukebox, i.e., not interested in supporting video playback feature. Also, the aim is to control it via the front panel VFD & buttons and via the remote control without monitor. So, XBMC's smooth UI will not be visible. All in all, XBMC is way over-spec'ed for the purpose.

So, I've been looking around for alternatives and came across 2 viable candidates:
Both are music player daemon (i.e., background service) and I will pick one of the two and develop the front-end interface program for INTEC275PC.

当初のプランはINTEC275PCをXBMCPCとして稼動するつもりだったのですが、XBMCは単純なジュークボックスにはぶっちゃけ向いていない(XBMCはビデオ再生が主目的)。なので、代わりを探してみたところ、丁度いい感じのミュージックプレーヤー・デーモンを2つほど見つけた: MPDXMMS2。(デーモンは悪魔ではなく、バックグラウンド動作するプログラム。)これからどちらか一つに絞って、INTEC275PC用のクライエントを自分で組む。

Sunday, April 24, 2011

Remote Control & Receiver Addendum

While implementing and testing the IR remote receiver program on Arduino (will be posted soon) I discovered another remote signal, which is vastly different from standard commands. When a remote key is held down for extended period, the remote repeatedly transmits the following signal (shown repeated twice):


Unlike the regular command signals, the start pulse is only 2.2 ms long (as opposed to 4.45 ms observed for regular commands), followed by (standard) signal low duration (0.6 ms).

Tuesday, April 19, 2011

Front Panel Controller: Arduino Nano


To interface the front panel buttons, IR receiver, and RI I/O with PC, I will use Arduino Nano. This board hosts an Atmel ATmega328 microcontroller (uC) and an FTDI FT232R USB-to-UART interface chip. Most of the ATmega328 GIO pins are made available (20 pins total), and the board can be powered solely by the USB bus power (although not sufficient for all of our needs).

The ATmega328 uC is equipped with 2 external interrupts (mapped to D2 and D3 pins) and 3 pin-change interrupts which can be software (semi-)selectable. The interrupts must be fully utilized to react to all user inputs (front-panel button presses, remote-control button presses, and RI input from the amp). It is also critical to wake Arduino from sleep state for it to power up the PC.

The idea is to mount this board on the (to-be-designed) front-panel PCB. Comparing its size to the original front-panel PCB indicates it can be doable.

Thursday, April 14, 2011

Remote Control & Receiver

This 60-key remote (RC-319S) is for the entire 2nd generation INTEC275 components (amp, 2 tape decks, tuner, MD player, and CD player). The INTEC275 CD player receives commands from this remote with a Sharp GP1U571X IR detecting unit (one on the PCB).


This detector is no longer produced (recall that the CD player is manufactured in the late '90). For the PC mod, I will use compatible detector from Sharp (GP1UM271RK0F, shown on the left above). This unit has the same band-pass filter center frequency (38 kHz) as GP1U51X and also has the exact same height profile as GP1U571X. The latter guarantees the GP1UM271RK0F to fit properly with the front panel plastic molding.

Experimenting with GP1U571X and the Onkyo remote

To test the IR detector, I hooked it up straight to 5V source and scope probe:


Here's the signal received when POWER button is pressed:

The detector outputs low (0 V) or high (4.5 V) levels. The output signal is normally high, and the beginning of received message begins with an extended period of low level (~9.11 ms), followed by a shorter period of high (~4.45 ms). The ensuing pulsing pattern defines the remote control command. But how is the information coded?

Upon closer inspection, we see that the low period duration is consistent all the time (~0.61 ms) while the high period duration is bi-modal (either 0.52 ms or 1.63 ms long). Hence, most likely it is pulse-length coded. There are 32 high periods during pulsating period; therefore, each button is coded with 32 bits (4 bytes).

For our convention, we let the short period to represent 0 Bit and the long period to represent 1 Bit. Also, the bits are transmitted in MSB first fashion. Accordingly, the 32-bit codes (in hex) associated with all 60 keys are listed below.

Row Col Code Button Name
1 1 0x4bb520df POWER
1 2 0x4bb59b64 SPEAKER A
1 3 0x4bb55ba4 SPEAKER B
1 4 0x4b36f807 INPUT SELECTOR PREV
1 5 0x4b367887 INPUT SELECTOR NEXT
2 1 0x4bb510ef SLEEP
2 2 0x4b3612ed TIMER
2 3 0x4b36c23d TIMER SETTING PREV
2 4 0x4b3642bd TIMER SETTING NEXT
2 5 0x4b36629d TIMER ENTER
3 1 0x4bb548b7 DECK-A REWIND
3 2 0x4bb58877 DECK-A FAST FORWARD
3 3 0x4bb5708f DECK-A REVERSE PLAY
3 4 0x4bb530cf DECK-A STOP
3 5 0x4bb5b04f DECK-A FORWARD PLAY
4 1 0x4bb558a7 DECK-B REWIND
4 2 0x4bb59867 DECK-B FAST FORWARD
4 3 0x4bb56897 DECK-B REVERSE PLAY
4 4 0x4bb5c837 DECK-B STOP
4 5 0x4bb5a857 DECK-B FORWARD PLAY
5 1 0x4bb518e7 DECK-B RECORD/PAUSE
5 2 0x4bb5906f TUNER FM
5 3 0x4bb550af TUNER AM
5 4 0x4bb5807f TUNER PRESET PREV
5 5 0x4bb500ff TUNER PRESET NEXT
6 1 0x4b7422dd MD REPEAT
6 2 0x4b7458a7 MD RECORD
6 3 0x4b7438c7 MD STOP
6 4 0x4b74f807 MD PAUSE
6 5 0x4b74d827 MD PLAY
7 1 0x4b74609f MD DISPLAY
7 2 0x4b74e01f MD SCROLL
7 3 0x4b7450af MD RANDOM
7 4 0x4b747887 MD PREV TRACK
7 5 0x4bb5d827 MD NEXT TRACK
8 1 0x4bb57986 CD DISC
8 2 0x4b361ae5 CD DISPLAY
8 3 0x4bb538c7 CD STOP
8 4 0x4bb5f807 CD PAUSE
8 5 0x4bb5b847 CD PLAY
9 1 0x4bb50af5 CD 1
9 2 0x4bb58a75 CD 2
9 3 0x4bb54ab5 CD 3
9 4 0x4bb57887 CD PREV TRACK
9 5 0x4bb5b847 CD NEXT TRACK
10 1 0x4bb5ca35 CD 4
10 2 0x4bb52ad5 CD 5
10 3 0x4bb5aa55 CD 6
10 4 0x4b36ea15 CD RANDOM
10 5 0x4bb5a05f MUTING
11 1 0x4bb56a95 CD 7
11 2 0x4bb5ea15 CD 8
11 3 0x4bb51ae5 CD 9
11 4 0x4b366a95 CD REPEAT
11 5 0x4bb540bf VOLUME UP
12 1 0x4bb55aa5 CD --/---
12 2 0x4bb59a65 CD 10/0
12 3 0x4bb5eb14 CD MEMORY
12 4 0x4bb51be4 CD CLEAR
12 5 0x4bb5c03f VOLUME DOWN

Note that the 8 MSBs (i.e., the first 2 hex digits) are always 0x4b, which can be used to identify the remote quickly. Otherwise, the codes appear fairly random. It would be interesting to know how they are chosen.

Wednesday, April 13, 2011

Noritake VFDs - Lesson: Read dimension specs correctly before ordering...


I thought GU280X16G-7003 would be *GREAT* for this project... The original VFD is 134 mm wide and 22 mm tall with display area of 113mm x 11 mm. I was reading the spec of GU280X16G-7003, which says 137.05 mm x 11.0 mm. "Perfect!" I was thinking (see this post).  Shortly after, I ordered it from Noritake online store and received the box a few days later.When I unpacked and had the VFD in my hand, I immediately had bad feeling. The dimension of the VFD is that of its display area, and the actual PCB dimension is whopping 182 mm x 33.5 mm...

After beating myself up over this for a few days, I ordered the half-size VFD (GU140X16G-7903) on sale. This module, which display area is half of GU280X16G-7003, can display full Japanese character set (Shift-JIS) which may be a good feature to have to display info of Japanese music or video.  (BTW, if you are interested in VFDs, noritake-vfd.com has great prices for their special sale promotion items.)

I've decided to keep GU280X16G kit as GU140X16G turned out to be just PCB module. The kit comes with a RS-232 cable with AC adapter prong, which is useful for development. The DB9 connector of the cable houses an IC chip to convert CMOS signals to RS-232. Because I prefer USB connection (neither of my desktop nor laptop PCs have serial port, does yours?) I actually disassembled the cable to keep the 2 cables.

VFD-PC Interface
Here's the pic of the actual device hookups:

FTDI's UB232R UART-to-USB interface module (the little PCB module on the breadboard) connects to the PC with mini-USB connection. Of 7 pins available on VFD's CN2 Connector, only 4 are use:

VFD CN2 Pin UB232R Pin Power Cable
Number Description Number Description Description
1 VCC (red) 5V (red)
2 SIN (brown) 8 TXD
3 GND (orange) 1 GND GND (orange)
4 SBUSY (yellow) 3 CTS#