Mini VFD: Difference between revisions
m Fowkc moved page Mini VFD to Project:Mini VFD |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
A small Vacuum Flourescent Display I recovered from the skip at work. | {{Project | ||
|image= | |||
|name=Mini VFD | |||
|primary=[[User:msemtd|Michael]] | |||
|created=26/04/2012 | |||
|completeddate=10/12/2014 | |||
|dormantdate= | |||
|version= | |||
|members= | |||
|status=complete | |||
|type=member | |||
|livestatus= | |||
|qrmode=1 | |||
|LookingforCollaborators= | |||
}} | |||
A small [[Wikipedia:Vacuum fluorescent display|Vacuum Flourescent Display]] I recovered from the skip at work. | |||
It is housed in a project box with a mains transformer - it use to have a mystery 9-pin serial port input but it wouldn't work until we worked out that it was expecting a 5V TTL serial signal. | It is housed in a project box with a mains transformer - it use to have a mystery 9-pin serial port input but it wouldn't work until we worked out that it was expecting a 5V TTL serial signal. | ||
Line 52: | Line 67: | ||
The VFD character table includes some programmable characters. I'd like to have a go at this! | The VFD character table includes some programmable characters. I'd like to have a go at this! | ||
There are control sequences to shift the screen and create a scrolling effect. | There are control sequences to shift the screen and create a scrolling effect. | ||
<div style ="height:200px;overflow-x:hidden;overflow-y:auto;border: 4px solid green;"> | |||
<syntaxhighlight lang="cpp" line="GESHI_FANCY_LINE_NUMBERS"> | |||
/** | |||
* Futaba VFD box Software serial | |||
* | |||
*/ | |||
#include <SoftwareSerial.h> | |||
#include <math.h> | |||
// supports 3 major temperature scales | |||
enum { | |||
T_KELVIN=0, | |||
T_CELSIUS, | |||
T_FAHRENHEIT | |||
}; | |||
// manufacturer data for episco k164 10k thermistor | |||
// simply delete this if you don't need it | |||
// or use this idea to define your own thermistors | |||
#define EPISCO_K164_10k 4300.0f,298.15f,10000.0f // B,T0,R0 | |||
#define NOTTINGHACK_47K 4090.0f,298.15f,47000.0f // B,T0,R0 | |||
SoftwareSerial mySerial(2, 3); // RX, TX | |||
void setup() | |||
{ | |||
// Open serial communications and wait for port to open: | |||
Serial.begin(9600); | |||
while (!Serial) { | |||
; // wait for serial port to connect. Needed for Leonardo only | |||
} | |||
Serial.println("FutabaBox1 v1.0"); | |||
// set the data rate for the SoftwareSerial port | |||
mySerial.begin(9600); | |||
mySerial.println("Hello, world?"); | |||
} | |||
void loop() // run over and over | |||
{ | |||
while(Serial.available()){ | |||
mySerial.write(Serial.read()); | |||
} | |||
updateTemp(); | |||
delay(1000); | |||
} | |||
void updateTemp(void) | |||
{ | |||
mySerial.print("Temperature: "); | |||
delay(10); | |||
mySerial.println(Temperature(1,T_CELSIUS,NOTTINGHACK_47K,10000.0f)); | |||
delay(10); | |||
} | |||
// Temperature function outputs float , the actual | |||
// temperature | |||
// Temperature function inputs | |||
// 1.AnalogInputNumber - analog input to read from | |||
// 2.OuputUnit - output in celsius, kelvin or fahrenheit | |||
// 3.Thermistor B parameter - found in datasheet | |||
// 4.Manufacturer T0 parameter - found in datasheet (kelvin) | |||
// 5. Manufacturer R0 parameter - found in datasheet (ohms) | |||
// 6. Your balance resistor resistance in ohms | |||
float Temperature(int AnalogInputNumber,int OutputUnit,float B,float T0,float R0,float R_Balance) | |||
{ | |||
float R,T; | |||
R=1024.0f * R_Balance / float( analogRead(AnalogInputNumber) ) - R_Balance; | |||
T=1.0f/(1.0f/T0+(1.0f/B)*log(R/R0)); | |||
switch(OutputUnit) { | |||
case T_CELSIUS : | |||
T-=273.15f; | |||
break; | |||
case T_FAHRENHEIT : | |||
T=9.0f*(T-273.15f)/5.0f+32.0f; | |||
break; | |||
default: | |||
break; | |||
}; | |||
return T; | |||
} | |||
</syntaxhighlight> | |||
</div> | |||
[[Category:Screens and projectors]] |
Latest revision as of 18:21, 21 April 2019
Mini VFD | |
---|---|
Primary Contact | Michael |
Created | 26/04/2012 |
Completed | 10/12/2014 |
Status | complete |
Type | Members Project |
QR code |
A small Vacuum Flourescent Display I recovered from the skip at work.
It is housed in a project box with a mains transformer - it use to have a mystery 9-pin serial port input but it wouldn't work until we worked out that it was expecting a 5V TTL serial signal.
The Futaba Corp M202SD08G module is a 20 character x 2 line, 5x8 dot matrix display. It has a European font with characters in the range from 0x20 (space) through the ASCII range and up to 0xFF with a bunch of Greek and Cyrillic characters.
- http://www.futaba.com/products/displays/app_notes/index.asp
- http://www.futaba.com/products/display_modules/module_products/character/index.asp
- http://docs-europe.origin.electrocomponents.com/webdocs/0d12/0900766b80d12d9a.pdf
I've put a Xino into the box and I'm working on something amusing for it to do in the hackspace.
The module has a single 20 pin connector (2x10 0.1" pins) of which we only need connection for +5V, GND, serial data in and a busy line out. The module asserts the busy line when it is working but it is enough to just make short delays in your code!
I have a simple Arduino sketch that just shows each character. It uses NewSoftSerial on pins 2 and 3 as well as regular serial on pins 0 and 1 (on old Arduino0022) just for testing to see if NewSoftSerial is any good.
The mains transformer in the box is this LASCAR PSU 201 Fixed Voltage Single Rail Power Supply...
- http://www.lascarelectronics.com/temperaturedatalogger.php?datalogger=126
- Quite expensive at £107: http://uk.farnell.com/lascar/psu-20105/lascar-part/dp/2083568
Although the unit is useful as a plain serial-driven ASCII display there are some interesting capabilities alluded to in the various datasheets. The VFD character table includes some programmable characters. I'd like to have a go at this! There are control sequences to shift the screen and create a scrolling effect.