How To Repair A Power Supply Board Tai 5024
In this article, we'll accept a look at the PT6311 VFD display driver and controller and see how to design a ability supply circuit for it. Since I have a bunch of AOTOM 20070-1A04 (datasheet) 8 digit xiv segment VFDs I took from a trip to China some time ago, we'll use the PT6311 to control such a brandish.
Forth with other powerful VFD drivers by the Taiwanese IC manufacturer Princeton, it takes care of multiplexing and dimming of the VFD display, has LEDs outputs and offers the input of up to 12x4 keys and four general purpose. That'south a whole agglomeration of work you'd otherwise all take to time inside your main microcontroller. The SPI interface makes information technology very like shooting fish in a barrel to control with any microcontroller of choice. We'll use an Arduino Uno this fourth dimension.
The article is targeted at those who have knowledge in electronics, too as VFD displays and are interested in edifice something very similar. In case you don't know how VFDs work, I suggest you lot to have a look at this Instructable first.
I've been upside down
Because PT6311 (datasheet) requires the cut off (segment/grid off) voltage to be negative! In fact this is why, for a long fourth dimension, I was intimidated by the powerful driver. Simply wait, shouldn't the VFD display voltage exist very loftier? A instructor of mine one time said that voltage is just a matter of perspective. I'll tell you why it is perfectly applied here. For a VFD display, typically a voltage departure of 20V to 30V between the on and off voltage (and cathode/filament, which needs a small voltage of around 2V itself to generate the flying electrons). Merely really, all you demand is only the voltage departure for the display to properly glow. This tin can be done by conveniently switching on the anode and grid with the power supply voltage of 5V, and when switching off, it gets pulled down to our negative supply (off voltage), which is 5V - 25V = -20V.
Take me to lower basis
Then now we know we want to have a negative voltage for our cut off power supply, let'south design one. If you wait into the datasheet of the VFD, the ideal anode/filigree voltage is 22V apart from the off voltage. Subtracting this from the positive supply of 5V gives us -17V. This is what we aim for. While we used a positive boost converter to obtain a HV ability supply, nosotros'll only a negative boost converter to get -17V: An LT1931 (datasheet) takes care of this. Designing is as simple every bit to look into its datasheet, calculating the feedback divider and look for appropriate inductor and capacitor values. Finally, we only replicate the typical application schematics, which is perfect for what nosotros need.
The Filament Supply
Ideally, the filament of the VFD is driven with AC to prevent having a brightness slope from where the college voltage of 0V and 2V sits. The datasheet tells that yous'll need 2.4V Air-conditioning RMS to drive the filament. From our filament, we can ii a rectangular pulses with a l% duty cycle, which will give us an RMS value of roughly 2.5V RMS, and that'southward great.
We need to have the two pulses, and button them into the -17V domain. Take a look at the excursion above. It decouples the two stage inverted pulses generated by the LM4871 (datasheet) into cypher hateful pulses, and re-biases it to -17V with a zener diode in between. The LM4871 itself serves as a pulse generator with self oscillation connected to an H span. A zener diode is necessary to counteract unwanted illumination when the off voltage is higher than the bias voltage. I.eastward. the off voltage has to exist slightly negative than the filament voltage.
All on board
As mentioned above, the PT6311 uses SPI to communicate with the outer globe, information technology will use four pins: Data in (MOSI), Data Out (MISO), which in open bleed configuration needs a pull upwardly resistor, and Clock (SCK), as well as chip select (SS). The VFD differs between filigree and segment pins. The grid pins will exist fastened to GR pins; the segments will (not fully) occupy the SG pins. Furthermore, two buttons are continued through SW1 and SW2 pins, respectively, and VEE is connected to our negative power supply output.
Accept a wait at the repository to save yourself time creating a library for PT6311 or the 8 grid 14 segment display. It also contains the PCB pattern in Eagle, putting it all together. The PCB measures 95mm x 25mm, and is part of a project that will be revealed later this twelvemonth. How exciting!
Creating a PT6311 Arduino Driver
Finally, it's fourth dimension to talk about how exactly we want to communicate with PT6311, for that we desire to write a library (well, a commuter is more accurate, since it contains the lowest level functions merely) for Arduino. We won't exist doing information technology in a classical sense, which is using the object oriented arroyo to create a class PT6311, but volition just use manifestly functions for the sake of compatibility to upper layers, that will be written in plain C. According to the PT6311 datasheet, we differ between control, and display information:
-
A command can be one of 4 different types. The commencement two well-nigh meaning bits tell what control information technology is, be information technology configuring how many digits and segments it has, read switch, write display style or turning the display on, off or dimming information technology
-
When in increment address fashion, the display data can follow consecutively afterwards setting the base address using control 3. This is what we'll do by default
Nosotros tin run into that it makes sense to have a bones part nosotros can build everything upon, which simply transfers one byte to the PT6311 using the Arduino SPI library:
void _vfdco_pt6311_set_data(uint8_t data) { digitalWrite(VFDCO_PT6311_SS_PIN_ARDUINO, LOW); SPI.transfer(data); digitalWrite(VFDCO_PT6311_SS_PIN_ARDUINO, High); }
The commands will consist of the command type OR'd with the bodily control, which can be stored within an enumeration or using macros. This is how a typical command can look like using or set data part:
_vfdco_pt6311_set_data( (uint8_t)VFDCO_PT6311_COMMAND_2 | (uint8_t)VFDCO_PT6311_OP_MODE_NORMAL | (uint8_t)VFDCO_PT6311_ADDR_MODE_INCR | (uint8_t)VFDCO_PT6311_RW_MODE_WRITE_DISPLAY );
Now the display data transfer can be put right afterward the configuration command. Since we're sending consecutive bytes, we don't want to utilize the set information role. Instead, we transfer iv times: The accost, where the multiplication by three takes you to the accost of the digit position, followed by the three bytes of raw display data.
digitalWrite(VFDCO_PT6311_SS_PIN_ARDUINO, Depression); SPI.transfer((uint8_t)VFDCO_PT6311_COMMAND_3 | (digit_pos * 0x03)); SPI.transfer((uint8_t)(information )); SPI.transfer((uint8_t)(data >> eight)); SPI.transfer((uint8_t)(data >> 16)); digitalWrite(VFDCO_PT6311_SS_PIN_ARDUINO, HIGH);
Finally, there is only the special case left, where we would like to request data from the PT6311. We will see how this is done past asking for the bits of SW1…SW4:
uint8_t vfdco_pt6311_get_sw() { digitalWrite(VFDCO_PT6311_SS_PIN_ARDUINO, LOW); SPI.transfer( (uint8_t)VFDCO_PT6311_COMMAND_2 | (uint8_t)VFDCO_PT6311_OP_MODE_NORMAL | (uint8_t)VFDCO_PT6311_ADDR_MODE_INCR | (uint8_t)VFDCO_PT6311_RW_MODE_READ_SW ); uint8_t sw_in = SPI.transfer(0xFF) & 0x0F; digitalWrite(VFDCO_PT6311_SS_PIN_ARDUINO, HIGH); return sw_in; }
Level up!
What do we take so far? We have written a driver, which is able to transport bytes, more specifically, scrap patterns which PT6311 volition choice up and interpret it as turning on and off the segments. So if nosotros want to transfer the capital letter 'A', nosotros need to marshal the bits and then that the eight digit 14 segment display (datasheet) turns on exactly those segments that are needed for an A. When using the send data office from to a higher place, information technology might wait similar this:
vfdco_pt6311_set_data(0, 0b0100001111110001);
Of course it doesn't have to. We can comfortably save the ones and zeros into an array, and map it to the ASCII grapheme map. While normally hand crafting the assortment is a fourth dimension consuming, cumbersome process, you can experience super lucky that I have done information technology already, and yous can only brand use of it! Yay! This is why it'southward chosen level up. Instead of getting muddied with bits, y'all tin just apply a higher level of abstraction and send characters, or even strings instead. And this is what the self explaining functions are for:
void vfdco_8d14s_write_char(uint8_t digit_position, char graphic symbol); void vfdco_8d14s_write_string(char *text);
There are two more functions, finally, that deserve the attention for the last office of this little article. These are the write with overlay variants of write char and write string. Write string is more important:
// Multi scrap overlay 0b[0|0|0|DPL|DPR|COL|COC|COR] void vfdco_8d14s_write_string_with_overlay(char *text, uint8_t overlay);
If y'all look at the display, you lot'll find that information technology has an upper dot later on the second digit, and symmetrically a lower dot later the sixth; and betwixt 2 and three, 4 and 5 every bit well as 6 and 7 there are colons. To plough on these, merely make use of the overlay parameter. To turn on the upper left dot and the eye colon, the parameter would await like 0b00010010.
Take a happy fourth dimension!
GitHub Repository
Equally always, the lawmaking is provided to you lot freely on GitHub. Have a happy time. The PCB files tin can exist downloaded here:
Source: https://www.thevfdcollective.com/blog/pt6311-vfd-display-controller-power-supply-and-arduino-library
Posted by: negrondrountint.blogspot.com
0 Response to "How To Repair A Power Supply Board Tai 5024"
Post a Comment