733

Scroll down to read this article in German After our old kitchen radio broke down, I took the time and opportunity to recycle its display, a Vacuum Fluorescent Display (VFD). When I had finally figured out how to connect it, it fell to the ground, turning it into an FD rather than a VFD because there was not much left of the vacuum.

Scroll down to read this article in German
 
After our old kitchen radio broke down, I took the time and opportunity to recycle its display, a Vacuum Fluorescent Display (VFD). When I had finally figured out how to connect it, it fell to the ground, turning it into an FD rather than a VFD because there was not much left of the vacuum. Oh well, why not order a couple of new ones online for very little money? Together with a Raspi I planned to build a new kitchen radio with clock and a timer for baking & cooking. An ATmega32 would control the display and the buttons, while the Raspi would function as internet radio (and later perhaps even a bit of FHEM home automation).
 
First, I built a prototype on a breadboard and used the transformer from the old kitchen radio for the necessary filament and anode voltage of approximately 32V. This worked quite well, but I wanted the new kitchen radio to be powered from a single 12V power supply and so I created the 32V with a converter.
 
The data exchange protocol between the ATmega and the Raspi is working on the ATmega, but is not included yet in this software release. The documentation is also still missing.
 
03/01/2016
So, now I've made my first steps in C on the Raspi. The ATmega and Raspi can now talk to each other via the serial interface. The ATmega sends for instance key press messages to which the Raspi reacts by switching the internet radio on or off or by switching live streams (the radio stations). The Raspi in return sends the name of the radio station to the ATmega. The station name is then shown on the display, alternating with the time.
To avoid setting the time off the clock the ATmega asks the Raspi for it because he has access to the correct time through NTP and so he responds with a message that contains the actual time. As a result, the time is automatically adjusted. A nice feature.
 
The current files for the software on the ATmega and the Raspi are attached.
 
NetBeans turned out to be particularly helpful for the development of the C program for the Raspi. I have found a good guide on the web on how to set up NetBeans. Works really well.
 
A first, simple draft of the communication protocol is attached. The protocol supports the addressing of nodes. This feature is not required in this project, but since I use this software module also in my 2-wire bus projects, I just recycled it.
 
Here are a few useful links to VFDs:
 

Original text in German

Nachdem unser altes Küchenradio seinen Geist aufgegeben hat, habe ich die Gelegenheit genutzt und mich mal mit diesem Typ Displays zu beschäftigen. Kaum hatte ich das einigermaßen raus und die Belegung der ganzen Anschlüsse rausgetüftelt, da fällt mir das Teil runter und aus dem Vacuum Fluorescent Display (VFD) wurde ein FD, weil nix mehr mit Vakuum. Naja, dann eben für ganz kleines Geld mal ein paar neue bestellt. http://www.pollin.de/shop/downloads/D120120D.PDF Zusammen mit einem Raspi soll ein neues Küchenradio entstehen. Mit Uhr, Timer zum Backen/Kochen und Webradio. Ein ATmega32 soll das Display und die Tasten übernehmen, der Raspi macht WebRadio (und später vielleicht noch ein bisschen fhem)

Zunächst habe ich das ganze mal auf einer Lochrasterplatine aufgebaut und für die notwendige Filamentspannung sowie die Anodenspannung von ca. 32V den Trafo aus dem alten Küchenradio verwendet. Klappte soweit ganz gut, ich wollte aber für das neue Küchenradio mit einem einzigen 12V-Steckernetzteil auskommen. Also habe ich die Filamentspannung und die Anodenspannung mit entsprechenden Wandlern erzeugt.

Das Protokoll für den Austausch zw. ATmega und Raspi ist auf dem ATmega schon lauffähig, fehlt aber in diesem SW-Stand noch. Die Doku dazu fehlt auch noch.

03.01.2016

So, mittlerweile habe ich auch meine ersten Schritte in C auf dem RasPi gemacht. Der ATmega und der RasPi können jetzt über die serielle Schnittstelle miteinander sprechen. Der ATmega sendet z.B. Nachrichten, welche Taste betätigt wurde. Der RasPi reagiert darauf mit ein-/ausschalten des WebRadio sowie wechseln der Livestreams (e.g. des Radiosenders). Rückwärts gibt der RasPi dem ATmega den Namen des Radiosenders, der gerade läuft. Der Sendername wird dann im Display im Wechsel mit der Uhrzeit angezeigt.

Damit man die Zeit auf dem µC nicht einstellen muss, fragt der ATmega den Raspi danach. Der hat ja die korrekte Zeit per NTP und antwortet mit einer Nachricht, welche die akt. Zeit enthält. Im Ergebnis stellt sich die Uhrzeit automatisch. Ein nettes Feature.

Die akt. Dateien für die Software auf dem ATmega und dem RasPi sind beigefügt.

Als besonders hilfreich hat sich NetBeans für die Entwicklung des C-Programmes aus dem RasPi herausgestellt. Ich habe im Web eine gute Anleitung gefunden, wie man NetBeans einrichten muss. Klappt wirklich gut.

Eine erste, einfache Beschreibung des Rahmenausbaus und des Protokolles ist beigefügt. Das Protokoll unterstützt die Adressierung von Knoten. Das wird in diesem Projekt zwar nicht benötigt, da ich die SW-Module aber auch für Projekte mit 2-Draht-Bus einsetze, habe ich sie einfach receycelt.

Hier noch ein paar nützliche Links zu VFDs allgemein:

Kerry Wong:  NE555 als Triber für die Filamentspannung

Das Display FV651G bei Pollin

Wie solche Displays funktionieren findet man hier

oder auf Deutsch, nicht ganz so ausführlich hier