Friday, February 27, 2015

Running a 8x40 LED Array from the Raspberry Pi

I have been trying to run one of the 8x40 LED signs from a Raspberry Pi.  For some reason I am getting a lot of glitches.  I know the Raspberry Pi can cause glitches when the GUI is running, but this is different.  UPDATE - I fixed the glitch it was a bad ground on the ribbon cable.

This is what it looks like.  A glitch is happening over the letter "Y".
Here is a video showing the glitching.
https://www.youtube.com/watch?v=n4tE-9H_Adg&feature=youtu.be

Another problem is that I cannot figure out how to do what is called macro substitution in python.  As a result the code is a bit long.  If I could say "if red&row[shift]=1" I could eliminate several lines of code. UPDATE - I have a solution.  Make the letter arrays into one big array for each letter.  Then use "if red[shift+row*5]".  I have used that technique for working with some other devices.

Here is my code to make it work:
# LED 8x40 Dual Color array
# Uses individual letters strung together
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)

GPIO.setup(17, GPIO.OUT) # Red Data
GPIO.setup(18, GPIO.OUT) # Green Data
GPIO.setup(27, GPIO.OUT) # Clock, 21 on older
GPIO.setup(22, GPIO.OUT) # Latch
GPIO.setup(23, GPIO.OUT) # Row Data 1
GPIO.setup(24, GPIO.OUT) # Row Data 2
GPIO.setup(25, GPIO.OUT) # Row Data 4
GPIO.setup(4, GPIO.OUT) # Row Enable

A1 =[0,0,0,0,0]
A2 =[0,0,1,0,0]
A3 =[0,1,0,1,0]
A4 =[1,0,0,0,1]
A5 =[1,1,1,1,1]
A6 =[1,0,0,0,1]
A7 =[1,0,0,0,1]
A8 =[1,0,0,0,1]

B1 =[0,0,0,0,0]
B2 =[1,1,1,1,0]
B3 =[1,0,0,0,1]
B4 =[1,0,0,0,1]
B5 =[1,1,1,1,0]
B6 =[1,0,0,0,1]
B7 =[1,0,0,0,1]
B8 =[1,1,1,1,0]

E1 =[0,0,0,0,0]
E2 =[1,1,1,1,1]
E3 =[1,0,0,0,0]
E4 =[1,0,0,0,0]
E5 =[1,1,1,1,0]
E6 =[1,0,0,0,0]
E7 =[1,0,0,0,0]
E8 =[1,1,1,1,1]

P1 =[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4+R4+Y4
Green5=R5+A5+Z5+P5+B5+Z5+R5+Y5
Green6=R6+A6+Z6+P6+B6+Z6+R6+Y6
Green7=R7+A7+Z7+P7+B7+Z7+R7+Y7
Green8=R8+A8+Z8+P8+B8+Z8+R8+Y8

# set up the loop
cycle= 0
while cycle < 1000:
  row = 0
  while row <9: 

    row = row+1
    # Send data to the shift registers
    shift = 39
    while shift >= 0:
        GPIO.output(17, GPIO.LOW)
        GPIO.output(18, GPIO.LOW)
        # determine if bit is set or clear data is NOT inverted
        if row==1:
          if Red1[shift] == 1: GPIO.output(17, GPIO.HIGH)
          if Green1[shift] == 1: GPIO.output(18, GPIO.HIGH)
        if row==2:
          if Red2[shift] == 1: GPIO.output(17, GPIO.HIGH)
          if Green2[shift] == 1: GPIO.output(18, GPIO.HIGH)
        if row==3:
          if Red3[shift] == 1: GPIO.output(17, GPIO.HIGH)
          if Green3[shift] == 1: GPIO.output(18, GPIO.HIGH)
        if row==4:
          if Red4[shift] == 1: GPIO.output(17, GPIO.HIGH)
          if Green4[shift] == 1: GPIO.output(18, GPIO.HIGH)
        if row==5:
          if Red5[shift] == 1: GPIO.output(17, GPIO.HIGH)
          if Green5[shift] == 1: GPIO.output(18, GPIO.HIGH)
        if row==6:
          if Red6[shift] == 1: GPIO.output(17, GPIO.HIGH)
          if Green6[shift] == 1: GPIO.output(18, GPIO.HIGH)
        if row==7:
          if Red7[shift] == 1: GPIO.output(17, GPIO.HIGH)
          if Green7[shift] == 1: GPIO.output(18, GPIO.HIGH)
        if row==8:
          if Red8[shift] == 1: GPIO.output(17, GPIO.HIGH)
          if Green8[shift] == 1: GPIO.output(18, GPIO.HIGH)
        # advance the clock
        GPIO.output(27, GPIO.HIGH); GPIO.output(27, GPIO.LOW)
        shift=shift-1
    # select the row data is inverted
    GPIO.output(4, GPIO.HIGH) # Turn off display
    if row==2: GPIO.output(23, GPIO.LOW); GPIO.output(24, GPIO.HIGH); GPIO.output(25, GPIO.HIGH)
    if row==3: GPIO.output(23, GPIO.HIGH); GPIO.output(24, GPIO.LOW); GPIO.output(25, GPIO.HIGH)
    if row==4: GPIO.output(23, GPIO.LOW); GPIO.output(24, GPIO.LOW); GPIO.output(25, GPIO.HIGH)
    if row==5: GPIO.output(23, GPIO.HIGH); GPIO.output(24, GPIO.HIGH); GPIO.output(25, GPIO.LOW)
    if row==6: GPIO.output(23, GPIO.LOW); GPIO.output(24, GPIO.HIGH); GPIO.output(25, GPIO.LOW)
    if row==7: GPIO.output(23, GPIO.HIGH); GPIO.output(24, GPIO.LOW); GPIO.output(25, GPIO.LOW)
    if row==8: GPIO.output(23, GPIO.LOW); GPIO.output(24, GPIO.LOW); GPIO.output(25, GPIO.LOW)
    # latch and display the data
    GPIO.output(22, GPIO.LOW); GPIO.output(22, GPIO.HIGH)
    GPIO.output(4, GPIO.LOW) # Turn back on
    # time.sleep(.0005)
  cycle=cycle+1 

 

Wednesday, February 25, 2015

Raspberry Pi Projects - 8x8 RGB LED array

I have been working on a book of Raspberry Pi projects.  One of the projects is an 8x8 three color LED array.  I picked up some more of them on eBay lately and they had a different pin-out.

The MEU 8860 RGB pin-out as seen from above.  I use Dx for the rows as Rx is used for Red.

R1  R2  G2  R3  G3  R4  D2  D1  D3  G5  R6  G6  D5  R7  B8  R8
                                                                                                     

G1  B1  D7  B2  B3  D8  B4  G4  B5  R5  D4  B6  D6  B7  G7  G8

The bottom row is where the model number is stamped.

Here is a picture of one of the displays wired up and working.


Here is a video of another three color 8x8 LED array in operation.

https://www.youtube.com/watch?v=Wj9w4rqbikk

Here is a video of an 8x15 dual color LED array in operation.

https://www.youtube.com/watch?v=oxbNxy2toeU

Thursday, February 19, 2015

Dell 2300MP DLP Projector Repair

My church had a fairly new Dell 2300 MP DLP Projector that had died.  I came across a video on YouTube that said this one capacitor in the power supply was the problem.  Here is a picture of the old 22uF capacitor to the left of the trensformer.

The new capacitor is a bit tricky to install.  There are surface mount components close to it on the bottom side.  I decided to replace the capacitor on the top side of the circuit board.

Here is a picture of the projector now that it is working.  Just a little more assembly to do.

Tuesday, February 10, 2015

NEC LT-265 LCD Projector repair

The other day I had a NEC LT-265 projector that would not focus and had a rattling sound.  To open it up remove the screws on the bottom, one screw is under the handle and the top cover lifts off at the front first then the back so that that it clears the jacks on the rear.


Removing the lens assembly was not easy.  I had to remove the circuit board first.  There were a lot of screws hidden way down inside and behind things.  When I got to the rattle it was the leveling foot that had gone up inside of the projector.  The focus issue was still there and there was nothing obvious that was causing it.  I took a hold of the lens and forced it to turn and to pull out.  The lens then popped into place and started working!  I guess I never needed to take it apart in the first place.

Thursday, February 5, 2015

Hitachi CP-X809 High power LCD Projector repair.

Yesterday I dissembled a Hitachi CP-X809 Projector to see why "dust" was stuck in between the lenses or LCD's.

There are a lot of screws to remove to get to the LCD assembly.  There are about 6 screws accessed from the bottom of the projector.  You have to remove the cover around the lens first.  There are four screws, two are hidden under a flip out panel that hold the lens cover in place.  There are three screws on the back panel that are not marked.  Then you can remove the top cover.  To remove the circuit boards there are another 6 or 8 screws.  Do not forget the screws on the back cover.


The circuit boards can be folded up and out of the way like this.

You need to disconnect some wires and the three LCD ribbon cables and then the circuit board flips back revealing the LCD and lens assembly.  The plastic around the rear jacks needs to be bent out of the way a little.  Here is the LCD and lens assembly.


Here is the problem with the projector, the left color filter is totally shot.  It was not dust that was causing the problem.  I have never seen one so badly damaged.  It must have been severely overheated.  Does anyone know where to get one of these?


By the way I should point out that this kind of damage is usually from overheating because the air filter is clogged.  Usually it is not this severe.