Check back, we should have the class posted soon!
The Product Description reads as follows:
MBI5026 is designed for LED displays. MBI5026 exploits PrecisionDrive™ technology to enhance its output characteristics. It contains a serial buffer and data latches which convert serial input data into parallel output format. At MBI5026 output stage, sixteen regulated current ports are designed to provide uniform and constant current sinks for driving LEDs within a large range of VF variations. Users may adjust the output current from 5 mA to 90 mA through an external resistor, Rext, which gives users flexibility in controlling the light intensity of LEDs. MBI5026 guarantees to endure maximum 17V at the output port. The high clock frequency, 25 MHz, also satisfies the system requirements of high volume data transmission.
Datasheets product descriptions are a great example of what happens when you mix engineers with marketing folk.
Here’s what that block distills down to:
This is an LED driver IC that uses a serially interfaced latch to drive 16 LEDs at a current of 5-90mA. Drive current is fixed by a resistor connected to the chip.
This chip has 3 main parts: The serial interface, the latch, and the output driver. Here’s what each component does.
The serial interface is a simple 16 bit shift register. It uses three pins – Serial Data In (SDI), Serial Data Out (SDO), and Clock (CLK). Each time the signal on the Clock pin transitions from low to high (GND to+5V), the value on the SDI pin is shifted into the first bit of the 16 bit shift register, pushing each of the 16 bits in the register over one spot. The last bit in the register is pushed out and onto the SDO pin. Think of it like a shelf only wide enough to hold 16 blocks. If you slide a block onto the shelf from the left, the blocks on the shelf are each forced over and the 16th one will be forced off the shelf. The SDO pin exists so that multiple shift registers can be connected in daisy chain fashion with the SDO pin of the first tied to the SDI pin of the second. This is like putting two of the previously mentioned shelves next to each other to make one 32 block wide shelf. Instead of falling off, the 16th block on the first shelf becomes the first block on the second shelf.
The latch is used to store the value of the shift register. It uses a single pin – Latch Enable (LE). When LE is high (+5V), the output of the latch matches the input. When LE is low (GND), the output is locked, or “latched” and the input can be changed without affecting the output. This enables you to output the current state of the latch while you are setting up the shift register with the next value. Once this new value is ready, the LE line is switched high and the latch output changes to the new value. The LE line is then switched low again to latch the value and the process starts over.
The output driver takes the value stored in the latch and uses it to set the state (high or low) of output pins. This translates into turning the LEDs off and on. It uses a total of 18 pins – Rext, Output Enable (~OE), and the 16 output pins. The output driver also regulates the current to each LED based on the value of a resistor connected between GND and Rext. Typically, each LED would need its own current limiting resistor, but this way the LEDs can all be directly driven by the IC. The state of ~OE determines if the output is enabled or not. This is an active low pin, which means that it must be low to enable the output and high to disable it.
OK, enough of the electronics lecture, let’s get back to the hacking!
Now that we know what’s driving those 16 LEDs, we can make a few more guesses about the ribbon cable attached to the board. The LED driver definitely needs CLK and SDI signals or it’s useless. LE is also probably used, but ~OE may be directly connected to GND since there’s no reason to disable the outputs. SDO probably isn’t connected since there’s no reason to chain these boards. So out of the 8 signals on the ribbon we’ve now likely figured out at least half of them. Now it’s time to check our work. We could probe everything out with a multimeter, but there’s another trick to help trace out connections on simpler boards like this one. Take a photo of each side of the board, then flip one photo and layer it on top of the other in a photo editing program like GIMP or Photoshop. By adjusting the transparency of the top layer you can easily trace out lines that transition from one side of the board to the other. Using a multimeter to verify the endpoints is still a good idea though.
From a combination of probing and tracing I was able to determine where each of the pins on the ribbon went. Pin 1 is designated by a square pad and is the farthest to the left when looking at the back:
Pin 1 wasn’t connected to anything, meaning we only have 7 lines in use on the ribbon cable instead of 8. Pins 2 and 3 were ground and power, and pins 6 and 7 went to the buttons. That leaves pins 4, 5, and 8 to control the LEDs. They all go to IC47, so it’s time to see what that IC does. Googling the part marking “CD40106″ reveals that this is a Hex Schmitt Trigger IC. This chip is a collection of 6 inverting buffers – a signal coming into it high leaves low and signals coming in low leave high. According to the datasheet, the outputs of the Schmitt Trigger gates connected to pins 13, 11, and 9 are 12, 10, and 8, respectively. Going back to the probing and tracing we can update the list:
Now we know enough to test things out! I had an Arduino handy, so I wrote a quick sketch to walk an alternating bit pattern (01010101…) through the shift register with one second delays between each bit.
Success! We’ve figured out how the board works and we know how to control it. What’s left? Turn it into something cool!
The board is of limited use in its present state, but the LEDs can be unsoldered and replaced with wires to drive other LEDs. Since the board switches the GND side of each LED, we’ll need one wire per LED plus a wire to feed +5V to all of them. With the help of Adam B., I used the Sherline CNC to mill out a disc of aluminum and drill 16 holes in a circle around the edge. I won’t go into detail now on that process (maybe in a future post!), but here’s a few action shots:
I mounted 16 LEDs in the disc, and housed it in an old cordless phone charging station that was also picked out of the trash. I wired the the board to these LEDs and crammed everything into the charger base with 5 wires coming out the back for SDI, CLK, LE, +5V, and GND.
In a few seconds I had a perfect match:The only portion of the 3/8″ bolt I cared about was the smooth, unthreaded shaft. This was the stock material I planned to use to make the new fastener. In order to make the threaded hole I first had to drill out a rough opening, and then use a tap to cut the threads into the drilled opening. I measured the bolt from the stool and found that the threading on it was 1/4″-20 NC. This means the the bolt was 1/4-inch in diameter with 20 National Coarse (a standard) threads per inch. I opened our tap and die set and grabbed the 1/4NC20 tap and the tap handle. According to this chart I’d need a #7 drill bit to make the hole I planned to tap, so I grabbed one of those too and headed over to the drill press. I clamped the stock bolt into the vise at the drill press, put the bit in the drill, and centered it over the shaft of the bolt: Then I squirted on some cutting fluid and slowly drilled the hole: After cleaning off the shavings here’s the result: This would be good enough for what I needed to do, but at this point I decided to try and make my replacement fastener match the old one as much as possible. The old one had a taper leading from the surface to the hole, to help guide the leg bolt in. To add this I put a larger drill bit into the drill press and drilled slightly into each side, using the hole as a centering guide. Now I was ready to tap the hole. I left the bolt clamped in the vise, added a bit of cutting fluid, and slowly started to thread the tap into the hole. If it felt like it was binding at all, I’d back it out, clean away any cuttings, add more fluid, and re-thread. Eventually I could turn the tap smoothly the whole way through and the threads were done: To test the threads, I took the bolt from the stool and screwed it into the freshly tapped hole. Perfect fit!: Now I needed to get rid of the extra parts of the stock bolt. I used the old fastener as a rough guide to estimate the first cut, clamped the bolt in the small chop saw, and cut off one end: Then I clamped it the other way, again using the old fastener as a guide, and cut off the other side: The newly cut one is a bit longer than the old one, but this is fine since I planned to grind the ends a bit to smooth them out. To grind the ends I clamped the piece in the jaws of a hand drill and used it to hold the end at an angle to a bench grinder while I spun the piece with the drill. This made a nice taper to the end I flipped the piece around the other way and did the same thing to the other end. Here is the new one next to the old one. You can see it’s still slightly longer, but since the tolerance in the stool leg is low it won’t be an issue at all. The last thing to add was a slot on one end of the piece. This slot is used to turn the fastener in the stool leg so that it will be aligned with the bolt. I did this by clamping the piece in a vise and cutting a shallow groove with a hacksaw. Done! Now all that was left was to reassemble the stool. Everything fit great and the stool is now as good as new!