Bigi LED display: Skillnad mellan sidversioner

Från Stockholm Makerspace Wiki
 
Ingen redigeringssammanfattning
 
(2 mellanliggande sidversioner av en annan användare visas inte)
Rad 40: Rad 40:
</pre>
</pre>


# '''Idle:''' Clk is low. Data 1/2 are "don't care". During this period the display is off.
#'''Idle:''' Clk is low. Data 1/2 are "don't care". During this period the display is off.
# '''Data transfer:''' 2 packets of 64 bits are transferred on each of the data lines, to the shift registers. Each new bit is shifted in form the data lines on the rising edge of clk. The display is kept off during this period by the control circuitry on the panel boards. If it wasn't, a lot of random image data would be shown on the display as it's shifted out to its final destination. The meaning of the bits is described below. The stock controller has a 200 ns low/300 ns high timing for clk, but this should be pretty lax as long as you don't leave clk high for long enough to strobe the LEDs, or run it too fast for the 74LS logic on the board.
#'''Data transfer:''' 2 packets of 64 bits are transferred on each of the data lines, to the shift registers. Each new bit is shifted in from the data lines on the rising edge of clk. The display is kept off during this period by the control circuitry on the panel boards. If it wasn't, a lot of random image data would be shown on the display as it's shifted out to its final destination. The meaning of the bits is described below. The stock controller has a 200 ns low/300 ns high timing for clk, but this should be pretty lax as long as you don't leave clk high for long enough to strobe the LEDs, or run it too fast for the 74LS logic on the board.
# '''Strobe:''' After the last pulse data transfer is performed, clk is left at high signal level, which enables display output after a few microseconds. This lights up one line segment of the display with the data that was just transmitted. The length of the strobe time is controlled by the external device, but the stock controller is using a 720 µs strobe time.
#'''Strobe:''' After the last pulse data transfer is performed, clk is left at high signal level, which enables display output after a few microseconds. This lights up one line segment of the display with the data that was just transmitted. The length of the strobe time is controlled by the external device, but the stock controller is using a 720 µs strobe time.
# '''Idle:''' After the strobe, clk is pulled low which blanks the display. The stock controller leaves it low for 6.5 µs but it was measured that the line segment was typically turned off after 2 µs. Because 74x164 is clocked on rising edges but not falling edges, this does not produce a glitch during this period. This is also the next idle period, (1).
#'''Idle:''' After the strobe, clk is pulled low which blanks the display. The stock controller leaves it low for 6.5 µs but it was measured that the line segment was typically turned off after 2 µs. Because 74x164 is clocked on rising edges but not falling edges, this does not produce a glitch during this period. This is also the next idle period, (1).


Each of the two panel boards takes a 64 bit packet on each data line. Because this display has two boards, 128 bits are transferred on data 1 at the same time as 128 bits are transferred on data 2.  
Each of the two panel boards takes a 64 bit packet on each data line. Because this display has two boards, 128 bits are transferred on data 1 at the same time as 128 bits are transferred on data 2.  
Rad 52: Rad 52:




* First, 60 bits of each packet are color data, 0 for off and 1 for on. The value for the red subpixels are transferred on data 1, and the value for each green subpixel is transferred on data 2.
*First, 60 bits of each packet are color data, 0 for off and 1 for on. The value for the red subpixels are transferred on data 1, and the value for each green subpixel is transferred on data 2.
* Then, a bit indicating which group of the display should be activated is transferred. If the line belongs to the top half of the display, send 1 on data 1, otherwise send 1 on data 2. You could send 1 on both data lines, which will activate both the upper and lower half and mirror the image along the center line, but this is of course mostly useless.  
*Then, a bit indicating which group of the display should be activated is transferred. If the line belongs to the top half of the display, send 1 on data 1, otherwise send 1 on data 2. You could send 1 on both data lines, which will activate both the upper and lower half and mirror the image along the center line, but this is of course mostly useless.
* Then a 3 bit line address is sent, which determines which line should be displayed.
*Then a 3 bit line address is sent, which determines which line should be displayed.
* Since two panel identical boards are connected in series in this display, repeat he same sequence a second time with the display data for the other half.
*Since two panel identical boards are connected in series in this display, repeat he same sequence a second time with the display data for the other half.
* All data has now been transferred. Leave clk high for 720 µs (recommended) to strobe the line.
*All data has now been transferred. Leave clk high for 720 µs (recommended) to strobe the line.
* Set clk low to blank the display. Leave clk low for at least 6 µs (recommended) before sending any more clock pulses to make sure the display is propely turned off.
*Set clk low to blank the display. Leave clk low for at least 6 µs (recommended) before sending any more clock pulses to make sure the display is propely turned off.


(TODO: Confirm again which line is which of red and green, top and bottom, and document the board with pictures.)
(TODO: Confirm again which line is which of red and green, top and bottom, and document the board with pictures.)
Rad 75: Rad 75:
It was noted in an all pixels on stress test that the TIP120 transistors used for line selection could get as hot as 90 °C. This is not supposed to be a problem, and probably intended by design, as TIP120 is rated to a maximum temperature of 150 °C according to the datasheet, however it is a bit disconcerting. The transistors run a fair bit cooler when showing a typical image, though.
It was noted in an all pixels on stress test that the TIP120 transistors used for line selection could get as hot as 90 °C. This is not supposed to be a problem, and probably intended by design, as TIP120 is rated to a maximum temperature of 150 °C according to the datasheet, however it is a bit disconcerting. The transistors run a fair bit cooler when showing a typical image, though.


Replacing the TIP120 transistors with MOSFETs would make it run cooler. However, this would require another mod as well. The 74LS138 line drivers used to select which line to draw are active low. This is then fed into ULN2003 line drivers to drive the TIP120 transistors. This effectively leaves the transistors pulled to ground by default, and allowed to go high when active through internal biasing. P channel MOSFETs would require the opposite polarity. Replacing the 74LS138 with its active high counterpart 74x238, making the ULN2003 output active low, would solve this.
Replacing the TIP120 transistors with MOSFETs would make it run cooler. However, this would require another mod as well. The 74LS138 decoders used to select which line to draw are active low. This is then fed into ULN2003 line drivers to drive the TIP120 transistors. This effectively leaves the transistors pulled to ground by default, and allowed to go high when active through internal biasing. P channel MOSFETs would require the opposite polarity. Replacing the 74LS138 with its active high counterpart 74x238, making the ULN2003 output active low, would solve this.


This mod would also require modifying the supply voltage in order to not fry the LEDs, since the voltage drop of 2-4 V of TIP120 would now be nearly gone.
This mod would also require modifying the supply voltage in order to not fry the LEDs, since the voltage drop of 2-4 V of TIP120 would now be nearly gone.


== Image gallery ==
==Image gallery==


<gallery>
<gallery>
Bigi makerspace lights on.jpg|The Bigi display with lights in the room on.
Fil:Bigi makerspace lights on.jpg|The Bigi display with lights in the room on.
Bigi makerspace lights off.jpg|The Bigi display with lights in the room off. Much better.
Fil:Bigi makerspace lights off.jpg|The Bigi display with lights in the room off. Much better.
Bigi psu.JPG|The 10 kg absolute unit of a power supply unit.
Fil:Bigi psu.JPG|The 10 kg absolute unit of a power supply unit.
Bigi connectors.JPG|The interface connectors and switches on the back of the display. All of these are unused due to the Arduino mod.
Fil:Bigi connectors.JPG|The interface connectors and switches on the back of the display. All of these are unused due to the Arduino mod.
Bigi stickers.JPG|Original stickers showing the model number (MM2-2020 version 8806B) and serial number (724130).
Fil:Bigi stickers.JPG|Original stickers showing the model number (MM2-2020 version 8806B) and serial number (724130).
Bigi closeup.JPG|Closeup of the Bigi logo
Fil:Bigi closeup.JPG|Closeup of the Bigi logo
</gallery>
</gallery>
[[Kategori:Elektronikrummet]]

Nuvarande version från 18 april 2023 kl. 12.36

The Bigi display with lights off
The Bigi display with lights on

Description and history at Stockholm Makerspace

The Bigi display is a wall mounted, 1 meter wide, 120x16 pixel LED matrix display. It can display three colors: red, green and yellow (which is really just red and green mixed). Like many things at the makerspace, it was acquired by Erik Cederberg. Some time after it arrived at Stockholm Makerspace, Didrik Madheden (the writer of this text) worked on reverse engineering the display. Unfortunately, that documentation and code was lost due to a hard drive crash. During the 2022 renovation, it was assumed faulty and was about to be discarded. At this point I redid the work I did originally and restored the display to working order. Below are my notes, which may be of help if you have a similar display that you want to control, or even are tasked with repairing the one at Stockholm Makerspace at some later date.

Technical notes

Stock components

The display originally has ports for RS232 and a keyboard, which was lost before the display was even acquired for Stockholm Makerspace. The display also has a push button for "loader" and a memory on toggle switch. The display is controlled internally by a controller based on the 6502 CPU (the same CPU as in the Commodore 64). The stock controller is mainly character based. However, I ended up ditching that and controlling it with an Arduino, which gives complete pixel control.

The display panel consists of two LED boards connected in series. Each board takes serial data which is shifted into 74LS164 shift registers. Data is multiplexed one line at a time, described in more detail below.

It is powered by a power supply that is about as heavy as the display unit itself, ~10 kg, because it contains it 5x 30W linear transformers, each outputting a nominal 8-9 VAC.

Controlling the display board

The display panel boards are controlled through just 4 wires, using a SPI like protocol. The signals are: Ground, Clock, Data 1, Data 2. The clock line is clocking data into the shift registers, as well as acts as an enable signal for the display. The data lines carry red and green data, as well as addressing data for the multiplexing operation. Care must be taken to drive the display correctly, or else you will get bleed between the pixels or other glitches, or potentially even damage the the display boards. (The display currently has one dead subpixel, possibly due to experimentation.)

Data is sent to the display in packets, where each packet contains one line of pixels. Each packet is followed by an on period, where data is displayed. Because the 74x164 doesn't have latching outputs or even an output enable option, unlike for example 74x595, the panel board contains extra circuitry to disable light output while the data transfer takes place. Only when the multiplexing data is set correctly, and the clock line is set high for a certain period of time, is an image allowed to shown on the screen.

The data transfer protocol is shown below, with some example data:

Period:    (1)     (2)                                           (3)                (4/1)
                    ___     ___     ___     ___         ___     ____________    ___
Clk:     __________|   |___|   |___|   |___|   |_/--/__|   |___|            /--/   |_____
                          _______         _______    ________
Data 1:  xxxxxxx_________|       |_______|       /--/        |___xxxxxxxxxxxxxxxxxxxxxxxx
                   0       1       0       1           1       0

                                  _______            ____________xxxxxxxxxxxxxxxxxxxxxxxx
Data 1:  xxxxxxx_________________|       |_______/--/    
                   0       0       1       0           1       1
                   ^       ^       ^       ^           ^       ^
                   +-------+-------+-------+-----------+-------+-- Sampled on rising edge of clk.

  1. Idle: Clk is low. Data 1/2 are "don't care". During this period the display is off.
  2. Data transfer: 2 packets of 64 bits are transferred on each of the data lines, to the shift registers. Each new bit is shifted in from the data lines on the rising edge of clk. The display is kept off during this period by the control circuitry on the panel boards. If it wasn't, a lot of random image data would be shown on the display as it's shifted out to its final destination. The meaning of the bits is described below. The stock controller has a 200 ns low/300 ns high timing for clk, but this should be pretty lax as long as you don't leave clk high for long enough to strobe the LEDs, or run it too fast for the 74LS logic on the board.
  3. Strobe: After the last pulse data transfer is performed, clk is left at high signal level, which enables display output after a few microseconds. This lights up one line segment of the display with the data that was just transmitted. The length of the strobe time is controlled by the external device, but the stock controller is using a 720 µs strobe time.
  4. Idle: After the strobe, clk is pulled low which blanks the display. The stock controller leaves it low for 6.5 µs but it was measured that the line segment was typically turned off after 2 µs. Because 74x164 is clocked on rising edges but not falling edges, this does not produce a glitch during this period. This is also the next idle period, (1).

Each of the two panel boards takes a 64 bit packet on each data line. Because this display has two boards, 128 bits are transferred on data 1 at the same time as 128 bits are transferred on data 2.

This is the structure of two complete packets, which represents one complete 120 pixel line.

Data 1: RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTAAARRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTAAA...strobe...blank
Data 2: GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGBAAAGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGBAAA...strobe...blank


  • First, 60 bits of each packet are color data, 0 for off and 1 for on. The value for the red subpixels are transferred on data 1, and the value for each green subpixel is transferred on data 2.
  • Then, a bit indicating which group of the display should be activated is transferred. If the line belongs to the top half of the display, send 1 on data 1, otherwise send 1 on data 2. You could send 1 on both data lines, which will activate both the upper and lower half and mirror the image along the center line, but this is of course mostly useless.
  • Then a 3 bit line address is sent, which determines which line should be displayed.
  • Since two panel identical boards are connected in series in this display, repeat he same sequence a second time with the display data for the other half.
  • All data has now been transferred. Leave clk high for 720 µs (recommended) to strobe the line.
  • Set clk low to blank the display. Leave clk low for at least 6 µs (recommended) before sending any more clock pulses to make sure the display is propely turned off.

(TODO: Confirm again which line is which of red and green, top and bottom, and document the board with pictures.)

(TODO: Post example code for driving the display.)

(TODO: Dump the firmware of the original controller.)

Potential retrofits

Replacing the linear transformers with a 150 W switching power supply

This would reduce the weight of the power supply needed for the display significantly.

Replacing hot transistors with MOSFETs

It was noted in an all pixels on stress test that the TIP120 transistors used for line selection could get as hot as 90 °C. This is not supposed to be a problem, and probably intended by design, as TIP120 is rated to a maximum temperature of 150 °C according to the datasheet, however it is a bit disconcerting. The transistors run a fair bit cooler when showing a typical image, though.

Replacing the TIP120 transistors with MOSFETs would make it run cooler. However, this would require another mod as well. The 74LS138 decoders used to select which line to draw are active low. This is then fed into ULN2003 line drivers to drive the TIP120 transistors. This effectively leaves the transistors pulled to ground by default, and allowed to go high when active through internal biasing. P channel MOSFETs would require the opposite polarity. Replacing the 74LS138 with its active high counterpart 74x238, making the ULN2003 output active low, would solve this.

This mod would also require modifying the supply voltage in order to not fry the LEDs, since the voltage drop of 2-4 V of TIP120 would now be nearly gone.

Image gallery