Showing posts with label scavenging. Show all posts
Showing posts with label scavenging. Show all posts

Saturday, June 25, 2011

Using the BU2090FS LED shift driver

I do a lot of scavenging for components. Whenever I get my hands on junk electronics I whip out my soldering iron, a desoldering pump, some pliers, and a pair of tweezers to see what I can extract from it. Scavenging is a long, tedious and sometimes painful process involving singed hair and burnt fingers, but every once in a while I come across a really nice component from an old TV or washing machine. I’ve learned a lot of desoldering (and some soldering) skills, and managed to save a few bucks by scavenging for components.

IIRC, I found the BU2090FS on a VCR board. I managed to desolder the SSOP16 chip by throwing the entire PCB into a toaster. I let the board cook for a few minutes and then started pulling off parts with my tweezers. The chip is quite solderable by hand, but I had no 0.8mm SSOP boards, so I superglued the chip onto veroboard and had a go at hand soldering the thing.

BU2090F-E2

Now you’re probably thinking that hand soldering a 16 pin SSOP is a daunting job, but its not really that hard. All you need is a fine point soldering tip and a steady hand. A little bit of magnification and good lighting helps as well. All in all it took me less than 15 minutes to make the DIY SSOP-to-dip ‘adaptor’.

DSC01430 DSC01425
Left: the ‘adaptor’
Right: the chip can be seen below the wires

The ‘2090 is a 12-bit latched shift register, and is primarily used to drive LEDs. It runs off 5v and can sink upto 25mA per channel. Coding for the chip wasn’t difficult at all. Serial data can simply be clocked in and you’re ready to go.

Below is a ‘scope capture of the data to make output Q8 and Q0 low. Data is fed in MSB-first. Keep in mind that the outputs are active low since this is a sinking driver.

scope

 Oscilloscope capture

Data and clock lines idle low. According to the datasheet data is sampled every rising clock. A shift occurs after every new bit of data is clocked in. Data is latched after all 12 bits are sampled by raising data high and then pulling clock low.

I used CCS-C on a PIC16F882 to test the chip. An excerpt of the driver is below:

#define clk pin_c5
#define data pin_c4

void writedata (int16 var)
{
    int8 loop;

    var<<=4;   

    for(loop=0;loop<11;loop++)
    {
        output_bit(data,var&0x8000);
        output_high(clk);
        output_low(data);
        output_low(clk);
        var<<=1;
    }
    output_bit(data,var&0x8000);
    output_high(clk);
    output_high(data);
    output_low(clk);
}

 

DSC01427  DSC01428
The BUF2090 mounted for prototyping

Sunday, February 14, 2010

Touch Me Please!

Before I dive into this post I take a moment to profusely apologize for the title of the post – it is tragically horrendous.

OK, so now that I’ve got that out of the way, lemme begin. This post is a little out of ‘order’; it would have been more appropriate had I first blogged about how I procured some of the components mentioned in this post. But heck! Lazy as I am, I guess I’ll leave that for a later date.

A friend of mine (un)fortunately busted his laptop several months back. I managed to persuade him to let me scavenge parts from the laptop. What parts did I get? That’ll be the subject of a different post :-D I managed to rescue several components; a touchpad being one of them. And as usual, I went about trying to interface it.

Electronics being my love, and today being Valentine’s Day, it is most fitting that I have successfully managed to communicate with the touchpad. Now before you start making judgements about me, and why I fool about with electronics on this most awesome day, let me tell you how I went about the interfacing.

The touchpad is a mouse replacement ubiquitous on laptops. Synaptics is by far, the biggest touchpad manufacturer. Alps Electric, Cypress, and a few others are also into the touchpad market. Most touchpads today work on the principle of capacitive sensing.

The touchpad of my trusty IBM Thinkpad R51 

The touchpad I scavenged was from an HP Pavilion dv2000 series laptop. The touchpad used is probably manufactured by Alps Electric Corporation (there is a prominent “ALPS” silkscreened onto the back of the PCB). The touchpad is a capacitive sensing type and is controlled by a 48 pin QFP. The chip is marked 1CA026A. I googled high and I googled low but I couldn’t find anything useful; no datasheets, nothing. So it became necessary that I give experimentation a shot.

There is a four wire flat cable (FFC) heading off the PCB. Having fooled about with electronics for a while now, I knew that it was but obvious that the touchpad used some sort of serial protocol. I figured that there were a few possibilities – maybe USB, possibly I2C. Again, I googled to see if touchpads followed a standard protocol. Most sites on the net said that laptop touchpads invariably use the PS/2 protocol, however, none of them said it with ‘authority’. It was always “apparently, touchpads use the PS/2 protocol” or “the PS/2 protocol is used even on laptops”.

Anyway, I thought I’d give USB a try. I used a hacked-together USB dev board, pulled out V+, Gnd, D+, D-, and connected them to what seemed like the appropriate pins on the touchpad. When the error “USB device not recognized” popped up, I reversed D+ and D-. After I still got the same error, I guessed that it was the PS/2 protocol that the device used.

I don’t have a PS/2-to-USB converter so I had to use one of my trusty PICs (a ‘628A is this case) to emulate a PS/2 host. I wrote my own driver basing my ‘read data’ code on something written by Dheera Venkatraman (who has very kindly made his code available online).

I also referred to these sites for info about the timing specs of the PS/2 protocol:
http://www.computer-engineering.org/ps2protocol/
http://www.computer-engineering.org/ps2mouse/
http://documentation.renesas.com/eng/products/mpumcu/apn/reu05b0121_h8s2100ap.pdf

 

Below are a few pics that I took.

tpboard bottom
Right: The touchpad; left and right buttons are on the PCB
Left: Bottom view of the touchpad PCB

The test rig 

Initially, when the touchpad is powered up, it sends 0xAA (‘passed self-test’), followed by 0x00 (which is the mouse ID). The ‘628 then sends the byte 0xF4, which tells the touchpad to stream data, i.e. continuously send any activity on the touchpad or the buttons. Once all commands are received/issued the PIC asserts a pin connected to an LED.

Init The initialization sequence – 0xAA(self-test OK) followed by 0x00(Mouse ID)

Here is my code if you need it. While you are free to modify it in any way you wish without permission, it would be nice if you remember to give me credit. :-D

Video to come up shortly.

Wednesday, October 14, 2009

Scrounging Around…….

This post is similar to one I had made on BITS 360 a while back. Having finished my Bachelor’s degree from BITS-Goa, I’ve now transferred to the Pilani Campus. So this is my first post after coming to Pilani.

As was in Goa, here too several ‘poor’ students (a point to note is that the word ‘poor’ refers to the usual scarcity of money that college students, being college students, face, and not an actual financial constraint :-D) wanted to know where they could cheaply source components. Obviously, I feel it my moral obligation to provide scrounging references. Read on to find out where I usually source a large part of my components.

Some excellent sources for jugaad are mentioned below. The list format is -
"Old electronics - many students throw out...."
"You will be able to scavenge...."

  • UPS systems
    buzzers, relays, power transistors, resistors, SRCs, triacs, massive heatsinks, even more gargantuan transformers (these are bl**dy heavy), awesome lead acid batteries (be warned, a faulty lead acid battery may be the very reason for the UPS' demise :-/ )

  • Electronic ballast tubelights (the new kind of 'slim' tubelights), CFL bulbs (I find loads of faulty ones in BITS - just ask the electrician, he'll only be too glad to get rid of them!)
    Ferrite chokes, thick wire to make air core inductors, high voltage capacitors, diodes, SRCs.

  • Alarm clocks (I don't really know how these get damaged...most BITsians claim that they fell down, or someone sat on them - I personally think they were chucked at the wall when they woke their owner up too early in the morning! ;-) )
    High pitched buzzer / speaker, 32768KHz crystal, tiny gears

  • Keyboards, mice (optical and ball), CD/Floppy drives, other PC junk
    JACKPOT!!! - buttons, leds, capacitors, optical sensors (optical mice have a very cool 18*18 pixel CCD - Google ADNS2610; anyone looking for advice or interface details, buzz me, I've done this), motors, heck maybe even a working 12 / 5 / 3.3V SMPS!

  • Phones (the traditional telephones, and newer cellphones)
    Magnetics, audio stuff. Mobile phones are a veritable source of ultra-small components: you need a steady hand, an SMD rework station, and guts of vanadium-steel to take these babies apart. I've used LCDs, very powerful white LEDs, joysticks, memory card connectors, buttons, etc from (discarded) mobiles. Most Nokias use the BL5C / BL4C - this is an uber-cool LiIon (old) and LiPoly (new) flat battery, 3.7v @ 700-1200mAh. I've drawn 15Amps from this thing for 60sec! No kidding! My multimeter leads got hot and one of the tips actually melted. I would not recommend doing this at all - you may damage the battery irreparably, and worse still risk explosion-caused burns (remember the Nokia battery-replacement drive a couple of years back?). Still, the BL5C is very good for small bots and compact electronics. You can get it for 750 bucks (original) or 120 bucks (cheapo duplicate). The duplicate seems to work fine, but test it out before buying.


While the phrase “one man’s junk is another man’s treasure” fits aptly, be warned that scavenging can be time consuming and the components obtained from the abovementioned sources can be unreliable. Having issued my warning - good luck, and happy scrounging!

Visitors