So, I've been asking about driving solenoids and stuff - here's why. A friend of a friend owns a museum on the coast which has an exhibit which is a model of a shutter tower (
http://en.wikipedia.org/wiki/Semaphore_line for some background info - but basically it's 6 big shutters which are either vertical or horizontal, which you can see from far away to convey messages). The model is broken. I was asked to help fix it.
Nobody knows who built this model - and I'm starting to wonder if that's because they've gone into hiding after a manslaughter case.
Ohhh ho ho hoooo.....
I went for a visit, brought back some souvenirs. This thing scares the heck out of me.
This thing is at least 20 years old. It was commissioned by BT, many years ago. (i.e. BT actually paid someone to make this).
As I suspected, it's got a keyboard decoder IC which connects to a custom built keyboard with a basic 5x5 matrix for the keys. Once decoded, this goes into the address lines on an EPROM, which then spits out the states for each shutter to be set to. There's also some rather fancy stuff to display the keys on an LCD display too (which doesn't work all that well I must add).
Apparently, before someone "fixed" it by reprogramming the EPROM (or possibly replacing it with a pin compatible one), but I think now it's been corrupted again.
I've uploaded the schematics, for you to look at. But they're not exactly as the thing ended up being produced. One thing which it entirely neglects to mention is the fact that the relays are designed to switch MAINS into the solenoids. (!!!) When I was poking around in the installation, I found 230V mains going along exposed copper tracks, terminal blocks, and all sorts.
The relay come power supply board has a rather interesting AC to DC converter which converts 9V AC 50Hz into 12V DC - which now is used to drive the solenoids. There are some hilarious green wire mods on the relay board - including a track which has been broken, but then rewired again with a thick piece of wire. Also, a wire which goes from a terminal block on the top side to a track on the bottom side. Oh and did I mention both of these mods are live and neutral?
The boards themselves are... interesting. The power supply/relay board is a home made PCB - no solder mask, silkscreen, nothing. The logic board is a protoboard, which is wired up with pegs wire wrap style. I wish I had a camera, this thing would be downright amusing if I didn't have to work with it. If it was a hobby board, I may understand. But someone *paid* for this. Even 20 years ago, you could at least, y'know, label things with a sharpie or something.
The actual power supply is done by a custom mains transformer (which is in the schematics). The transformer itself it bolted to a piece of wood in the cabinet (and it buzzes like nobody's business). It's got another board attached to it with a gigantic capacitor (which I'm fairly sure isn't an approved X or Y type) and a transistor connected to a massive heatsink. Quite what it's doing I don't know - but I'm loathing to get anywhere near it.
My plan is this - rip out the keyboard encoder IC (it seems to work OK), and design an entirely new board with a micro of some description that does the decoding logic, AND uses FETs to switch the solenoids instead of relays. It's quite possible I could do the keyboard decoding in a micro as well - we shall see about that one. Also has the potential to accept input from alternative sources too, maybe an Internet connection one day! Scrap all of the power supply gunk, buy a proper one from Farnell or something.
By the end of it, the entire box full of wires and circuit boards should be reduced to a manageable plastic project box with a few inputs and a few outputs. Not a giant system spread across 4 circuit boards.