This is a description of an open source/open hardware project of a remotely controlled Arduino (Freeduino) based clock/thermometer utilising power supply and VFD panel from a broken DVD player in a custom made acrylic enclosure. The aim of the project was to demonstrate what could be done from electronics that has been literally thrown away rather than design one more digital clock.
Having source code and all design files as a starting point it becomes very easy to customize it for your own needs and your own DIY project, even VFD driver might be modified with little efforts to control VFD panel from another DVD player – they all designed in a unified way.
This is a list of features that we’ve got in the end (and what could be potentially enhanced if you like):
- Real time clock battery backed up dedicated chip;
- 1Wire temperature sensor;
- Controlled wirelessly by any RC;
- Activated by PIR motion sensor;
- Speaker;
- Serial-to-USB convertor for reprogramming and logging purposes;
- Acrylic enclosure;
- Full source code is available;
The video demonstrates designing and assembling process and if you find it interesting please welcome to the next page for more technical details!
Thank you and we hope you will find this project useful and worth making!
Step 1: Scrapped DVD player parts
Vacuum fluorescent displays (VFD) make any consumer device looking eye-catching, compelling and unusual. A VFD emits a very bright light with high contrast and can support display elements of various colors, some of them are capable of rendering not only seven-segment numerals but characters and even graphical information. VFDs are equally great for anything from professional devices to basic do-it-yourself things. Yet VFDs are rather expensive for small hobby projects and notorious for their non-trivial control as they require voltages higher than just TTL levels, necessity to drive grids in addition to segments or dots and therefore make presence of dedicated VFD controllers highly desirable just to simplify communication with microprocessors.
But what if all this infrastructure already existed, would it be that difficult to combine together something like Arduino controller and VFD? The answer is no, not at all! Most modern DVD players equipped with VFDs and when less reliable mechanical parts (DVD ROM drives) fail devices are simply thrown away. Instead, some electronics could still be reused to give your project a completely new look reducing costs at the same time and saving the environment. In addition to a VFD with controller onboard and a power supply which provides everything with all vital voltage levels there is a bonus – an IR receiver and buttons. VFD controller takes care of refreshing display, handling events from buttons and IR receiver encapsulating whole control into a serial interface and making integration with even primitive controllers very possible, giving in exchange fully functional remotely controlled system.
But enough theory, let’s have a look at a real example. We found a broken DVD player literally lying in the street. Quick test indicated that VFD board and power supply were functional. VFD was 16-segment and therefore capable of displaying not only digits but characters as well. After a few minutes of internet search model name was identified: Philips DVP630
For our experiment we will need a front VFD panel and a power supply board only.
Step 2:
Having the service manual and VFD driver datasheet in front of you significantly simplifies reverse engineering. It took us only a few minutes of googling – and service manual with schematic diagrams were found. After opening up Philips DVP630_632_642 schematic diagram (please find the file attached below) and looking at page 3 it becomes obvious that the player utilises DP501 HNV-07SS61 display from Samsung which is controlled by HT16512. Then downloading datasheet for HT16512 (please find the attached file below) – it is a VFD driver with 11 segment output lines, 6 grid output lines, 5 segment/grid output lines 4 LED output ports, a control circuit, a display memory and a key scan circuit. Serial data inputs to the HT16512 through a three-serial interface – just what we need!
Returning back to the page 3 of the service manual, checking RB502 connector – there are V-CLK, V-CS, V-DATE to control VFD. Also we will need GND, IR (output from infrared receiver) and +5V. An attentive reader should notice that there is also +5V_STB at RB501 connector. It is 5V standby voltage that is always applied. +5V appears only after pressing either ‘Standby’ TA501 button on DVD’s front panel or On/Off button on a remote control. The power supply is instructed to activate/deactivate +5V via PCON signal. But in order to wake up the player from a remote control only original RC must be used otherwise IC581 won’t recognize the command. We want to make our device working with ANY type of RC that is why our microcontroller must take responsibility of decoding RC commands and controlling PCON signal.
Please refer to the picture, the hacking points are marked with red ellipses.
Step 3: VFD display and driver – mapping bits to segments
Let’s have a closer look at the VFD and its driver. For an external device VFD is accessible through a serial interface as static RAM. The display has 7 digits (symbols) by 16 segments. Each symbol is defined by two bytes (16 bits), so in total 14 bytes are used. A symbol is encoded by a combination of bits, a bit set to ’1′ makes a segment to glow. Most significant byte comes first, most significant bit also comes first. So, in order to display very first symbol on the display as ’1′ the first byte of RAM should be set to value 0x20 and the second one – to value 0x6. In other worlds, we need to set bits 13, 2, 1 to logical ’1′ and in binary representation it looks as 0010000000000110b.
Note, that colon is controlled with one single bit 5 and it is available for 3-th and 5-th digits only. Two vertical segments in the middle of digit are simultaneously driven by a single bit 9, there is no way to activate only one out of two segments.
In order to simplify output to the display a software driver has to be implemented. In the next step we will go through this process.
Step 4: VFD Driver Demo
In order to control DP501 HNV-07SS61 VFD in an effortless and efficient manner the following software driver has been implemented. The functionality is encapsulated in HT16512.cpp and HT16512.h files and designed for AVR processors. To drive communication interface the logic uses pinMode and DigitalWrite functions provided by Arduino low level library. Also new HT16512 class inherits Arduino’s Print class to simplify output to display even more. However, despite those Arduino’s dependencies the code might be easily ported to PIC or ARM architectures.
The driver’s logic is subdivided into several groups: initialisation and low-level methods, tests and visual effects, methods for direct access to HT16512 without intermediate buffer and methods for intermediate buffer operations.
We won’t discuss boring details of VFD driver implementation, however, if you are interested, you can refer to this article: http://atmega.magictale.com/853/vfd-driver-demo/
The code below demonstrates how to initialise our VFD driver:
#include <avr/interrupt.h>
#include <util/delay.h>
#include “wiring.h”
#include “HT16512.h”
#define VFD_CS_PIN 15 //PD7
#define VFD_SCLK_PIN 14 //PD6
#define VFD_DATA_PIN 13 //PD5
#define STANDBY_PIN 12 //PD4
HT16512 vfd(VFD_CS_PIN, VFD_SCLK_PIN, VFD_DATA_PIN); //VFD display
int main(void)
{
pinMode(STANDBY_PIN, OUTPUT);
digitalWrite(STANDBY_PIN, HIGH);
//Enable VFD power supply
digitalWrite(STANDBY_PIN, LOW);
_delay_ms(100);
digitalWrite(STANDBY_PIN, HIGH);
//Initialise VFD tube
vfd.reset();
vfd.addrSetCmd(0);
vfd.clearFrame();
vfd.flipFrame();
sei();
while (1)
{
vfd.testStep()
_delay_ms(200);
}
}
As you can see, apart from VFD_CS_PIN, VFD_SCLK_PIN, VFD_DATA_PIN pins that are dedicated to VFD communication there is also STANDBY_PIN pin that simulates POWER button and instructs to switch +5V power rail on.
Let’s get down to the hardware part. In this demo we will be using Freeduino board. In total we would need 4 (four) signal wires to connect it to the VFD panel. Of course, we will also need GND and +5V power rail.
Here is the signal mapping table between Freeduino board and VFD panel (please also refer to DVP630 Schematic Diagram):
Signal | Freduino connector-pin | VFD panel connector-pin |
---|---|---|
VFD_CS | J3-8 | RB502-2 |
VFD_CLK | J3-7 | RB502-1 |
VFD_DATA | J3-6 | RB502-3 |
STANDBY | J3-5 | CN503-3 |
+5V Standby | JP1-3 | RB501-5 |
GND | JP1-4, 5 | RB502-4 |
And the video demonstrates the result: Freeduino board running VFDDemo, connected to the VFD panel and power supply from broken Philips DVP 630.
For more detail: A DVD Player Hack