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#

Tuesday, April 12, 2011

CD Player In Pieces

Here we go.

All pieces removed from the chassis. No turning back now :)

The actual interior height is 67 mm. Also, the bottom plate is raised by 8 mm (to seat CD transport assembly on the plate). Even with 10 mm spacer to mount motherboard (which I/O rear panel is 44.45 mm tall) and FlexATX PSU (40.3 mm), the chassis is plenty tall enough for them.

Also, the depth of the chassis is deep enough so that the Mini-ITX motherboard (170 mm) and slim optical drive (126 mm), expecting less than 1 cm overlap. <sigh of relief/>

The front-panel PCB needs to be studied closely.
It hosts the VFD, IR Detector (remote control receiver), and 8 buttons. The dimension of the PCB will be measured precisely to produce the custom PCB for the PC front panel interface. The front panel buttons make contact with the tactile switches (5 mm tall, <<1 mm travel) on the PCB so when buttons are depressed the switches make contacts.


References:

ATX Specification v2.2 - formfactor.org
Form Factor of 5 1/4" 9.5mm and 12.7mm Height Optical Drives - SFF Committee

Sunday, April 10, 2011

PicoScope 2104: diyer's perfect solution

Here's my first impression on PicoScope, a USB Windows based oscilloscope by PicoTechnology (U.K.). I ordered the hand-held entry-level model (2104) from Newark.com. This scope is a compact (essentially a bulky probe with USB leads) and economical (~$200) solution, perfect for DIYers.


This is it. The body of the probe houses all the essential data-acquisition electronics, and any post-processing and the waveform display are performed on PC. The scope only requires a USB 2.0 connection as it is USB-bus powered.


The spec:

  • Vertical Resolution: 8bits
  • Analog Bandwidth: 10 MHz
  • Maximum Sampling Rate: 50 MS/s real-time
  • Time Base: 10 ns/div to 50 s/div
  • Buffer Size: 8k samples
  • Probe: 1M Ohm, 20 pF, AC/DC coupling
  • Voltage Ranges: ±100 mV to ±20 V in 1, 2, 5 V steps
  • Accuracy: 3% (voltage) and 100 ppm (time)
  • Connected and powered by USB
  • 5 year warranty
 Nothing earth shattering as expected from its price point.

Packaging: The scope came in a plain box,
which contains a scope storage bag and an intro-to-picoscope poster:
The scope is obviously in the bag along with Quick Start Guide, Software and Reference CD-ROM, and a bag of accessories.
The contents of the accessory bag:

The PicoScope Software installed smoothly on my PC and has been running hiccup free so far (Windows 7, Intel Core2Duo 3GHz, 4 GB memory). Here's a screen shot:
I find that the user interface is pretty straight forward and self-explanatory (that is, if you've used scopes in the past) based on my brief experience.

The body of the scope has 1 lighted button, which brings the start/stop control to the user's fingertip. Also, the button illuminates green (running) or red (not running) to indicate the scope's status:
As seen in the picture above, the probe tip is also lit, which helps tremendously to locate test points, IC legs, etc.