Electronics, coding and hacking. And ADD.

Reverse engineering unbranded keypad


I bought a couple of these 16-button alphanumeric keypads a while ago, to use for various projects. They were dirt cheap with free shipping so the lack of a fancy label on them didn't worry me too much. If they worked they worked, and if they didn't - well, hey, not a big loss.

What I didn't take into consideration, was the fact that they didn't come with any documentation. At all. I had no clue what the pinouts were. Searching was useless, and the few similarly looking datasheets I found didn't match at all.

Since I got a new pair of probes for my multimeter today, I had a excuse to investigate this case further.

New multimeter probes
Finally a proper pair of probes, rated up to 600V/10A.

"Reverse engineering" isn't the proper word for this job, I think. There's no engineering involved, it's more... figuring out how it works. Anyway, time to figure out how this thing works, which should be a very simple job. As expected, opening the keypad revealed a single-sided PCB - although with a strange design. I guess the jumpers are inevitable on one side, but traces leading nowhere (broken by drilled holes) made no sense to me. You should be able to see a few of them vaguely on the image below:

Strange design, but still simple to follow.

I'm guessing multiple boards are produced simultaneously, and e-testing is done on the entire panel before separating and traces are cut by drilling holes.

Two boards, similar - but different.

...but wait. The other PCB is mounted upside down. I don't know wether my recently acquired mapping is correct, or as incorrect as it gets. I opened the other one and confirmed that both PCB's are identical. Must've been one assembly worker in China having a bad day, I guess.

Either way, if you have one of these, you should be able to figure it out from this map:

      COL1  COL2  COL3  COL4
    ROW1  (1)   (2)   (3)   (A)
    ROW2  (4)   (5)   (6)   (B)
    ROW3  (7)   (8)   (9)   (C)
    ROW4  (*)   (0)   (#)   (D)
    Column 1 = pin 8
    Column 2 = pin 1
    Column 3 = pin 2
    Column 4 = pin 3
    Row 1 = pin 4
    Row 2 = pin 5
    Row 3 = pin 6
    Row 4 = pin 7

When you notice the numbering, it makes you go all "ahh, but why didn't.. since.. jumpers.. oh, fuck it."

Scanning each row and column sequentially reveals if one or more buttons are pushed. It's worth mentioning that I experienced the internal resistance of these devices to be up to 70-80 ohms, due to the rubber contact pad.

Bluetooth controlled relays


As if moving to a new house in christmas wasn't enough, I've been ill for a couple of days. You know, just to top it off with something. Dunno what hit me, but it was hard. Now that I'm finally back on my feet, it's time to play with me ole' toys again.

Today's project was a bluetooth-controlled relay module.

Now, just to be clear, I've felt the unforgiving whack from 230VACs many times before, so I'm leaving the relays unconnected for now. I'm trusting the "tock" from the 10 amp relays to be reliable enough.

The bluetooth module is a UART bluetooth slave module purchased on eBay ages ago. Never really had the time to play with it, so now was the perfect chance to get my money's worth out of it. The relay board operates on 5V, and can be driven directly by the micro controller, which in this case is an ATmega128. The LCD display is not yet in use, but might be interfaced later.

Bluetooth controlled relays
Driven by a 9V battery at the moment

This was very straight-forward. After writing a simple UART program to interface the bluetooth module, it was only a matter of parsing the input and setting the PORTA pins accordingly. Honestly, this was about an hour of work, but the end result makes it seem like so much more.

Now, all I need to do is to grow a pair, and be a man enough to hook up some household items to this thing...

Boxes, everywhere! Everywhere, I say!


I'm gradually starting to see the tip of the iceberg, now that we've unpacked a few boxes. Still lots of stuff to do, like cleaning out the previous place, but at least I'm getting installed where I'll be the next 100 years (because I'm not doing this ever again)

Getting there..

Mac's up, oscilloscope and some of the part racks are in place, but there's still about a metric ton of stuff missing. And I also need a proper soldering station, that'll be on my wish list for this christmas, I guess.

Stay tuned, lots of interesting stuff will happen soon..

While we're waiting..


...we might as well do something useful. So, today, I wrote my first Z80 assembly program in many, many years. I keep asking myself why I favor the 6502 so much, when the Z80 is far superior in so many ways. It may not have the same efficiency when it comes to number of operations per clock cycle, but the instruction set is far more advanced and mature. But I guess that's the reason - limitations and restrictions attract me.

I've also studied N-MOS transistors and have designed a simple 4-bit ROM implementation using nothing but N-MOS transistors. I have also designed transistor-capacitor oscillators, LED matrices, and much more. You see, the electronics abstinence is kept under control using the Falstad Circuit Simulator, with the aid of pen, paper and daydreaming. It's actually pretty amazing how intense the urge to play with electronics is, when the real toys are out of reach.

I'm not implying anything, but the next project will certainly be a mess. Literally.

On the move..


So we're finally on the move, it's finally happening. More or less everything is stored in cardboard boxes here and there, and quite frankly, I have no idea where anything is at the moment. All I know for sure is that my desk is empty, and I have barely touched my workstation in a week.

As soon as I've installed, I'll start experimenting again. The good thing about absence from your hobby, is the inspiration that comes with it. I'm full of ideas, good and silly ones, which I will test out as soon as I'm back. And I'm taking notes.

That's all there is to it for now, you faithful reader(s?) will have to wait for at least another week for an interesting update.

Oh, and Santa, if you're reading this: I need a signal generator and a logic analyzer.

Add to Google