Model of a Shutter Tower exhibit, repair/refit - Page 1
Forum section: electronics / repair

author: naxxfish
author_rank: Contributor
timestamp: August 26, 2010, 11:02:32 pm
content: 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_linefor 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.

author: naxxfish
author_rank: Contributor
timestamp: August 26, 2010, 11:52:27 pm
content: Aha! Got a photo of it I took before dismantling it.Hehe, yay.

author: Simon
author_rank: Unknown
timestamp: August 27, 2010, 06:53:17 am
content: sounds like your gonna have fun, don't be surprised, my company have been spending 60 quid a piece on water activated pumps that I found no end of childish mistakes in

author: TechGuy
author_rank: Regular Contributor
timestamp: August 27, 2010, 07:46:57 pm
content: Quote from: naxxfish on August 26, 2010, 11:02:32 pmYou would have to replace all of the solenoids if you want to switch them using MOSFETs. You can't drive AC solenoids with DC MOSFETS (unless using an H-Bridge circuit). You may be able to drive original AC Solenoids with Triacs, but you need to use opt-isolators to switch the AC solenoids.QuoteSounds like a typical Linear power supply. The transistor is most likely a linear regulator such as LM7805K +5V regulator.Its possible that the cap has dried out and is causing excessive current draw. I assume this circuit no longer works? I bet if you just replace the cap on the power supply it will go on working for another twenty years. The Buzzing noise usually occurs in a transformer that is overloaded. When a Transformer overloads the core saturates and plates vibrate at the AC frequency. Most likely the cap has lost all or most of its electrolyte over time, and is operating more like a resistor than a capacitor.

author: JohnS_AZ
author_rank: Frequent Contributor
timestamp: August 27, 2010, 08:01:26 pm
content: If you do end up replacing the solenoids, I've bought quite a few (among a LOT of other mechanical stuff) from here.https://www.surpluscenter.com/sort.asp?catname=electric&keyword=ERSOAre you going to convert the thing over to a microcontroller? I wouldn't hesitate, particularly since I haven't seen my PROM programmer in about 12 years. :-)

author: naxxfish
author_rank: Contributor
timestamp: August 27, 2010, 08:05:38 pm
content: The solenoids are 12V DC driven. Which might not be so obvious given the schematics and stuff. They're definitely not AC. We were thinking of replacing them with latching ones, but it'd require much more work and go over budget.The problem I'm pretty sure is the EPROM is corrupted, which has happened before. Pretty sure the PSU is just fine.I am going for a micro. The nice thing is I can then use the same board to refit the other exhibit I'm going to work on next :p It drives 2 steppers. If I design the outputs properly, I don't see why it can't be used to drive two stepper coils instead of a solenoid.I'm thinking of a ATMEGA164PA as the micro - it's got enough I/O to do the job easily. Maybe a bit overpowered, but the main thing it's got loads of I/O.

author: naxxfish
author_rank: Contributor
timestamp: August 29, 2010, 03:30:27 pm
content: Pretty much decided on the micro - it'll be the ATMEGA164PA (or a pin compatible one with more flash, if required).Now, I'm just trying to get my head around the power outputs.Decided to go with a MOSFET, plus some other bits and bobs (as per suggestions on my other thread). This will be a replacement for solid state relays, so it's all new.I think I've decided on a MOSFET: Farnell #1779250, SI4104DY-T1-GE3. It has a voltage rating of loads, current rating of 4.6A which by my guestimates should be fine for the solenoids I'm looking at. Vgs threshold is such that I can drive it directly from a micro without having to do any amplification, which is handy.I'm now looking for a flyback diode for the solenoid output. According to my simulations, when switching off the FET my solenoid will probably kick back quite a lot of voltage (in the kV). My logic is that if I get a diode which has a reverse breakdown voltage of around about the supply voltage (12V), and a current rating at least that of the solenoid, that should do the job. This is turning into something of a problem. Finding a diode both with a low reverse breakdown AND a "high" current rating is not easy. I'm almost wondering if I can put several diodes in parallel to get the effect I need.Round and round I go ...

author: naxxfish
author_rank: Contributor
timestamp: September 10, 2010, 10:01:27 pm
content: An update!We eventually decided that the solenoids were in fact driven by AC .... which was entirely not what I expected. I'm a but confused about why there is a 12V supply on the board, but whatever.So, we're going to replace them with hobby servos which are cheaper and much easier to replace should they blow up - and in fact there is a hobby shop down the road that sells them!I designed a pretty basic microcontroller board - there's not really a lot more to it, other than having the appropriate pin headers connected to the appropriate pins on the micro. It's mostly single sided - the bottom layer is almost entirely just a VCC plane with a couple of traces coming from the DC jack.I shall order the parts, check the footprints and go to the workshop at uni and get a board etched up and build the thing.Once I've done that, I'll have to write some software for it! Most of it will be pretty straightforward, a little loop for scanning the keyboard input. Driving 6 servos independently might be a bit of a challenge, especially if it's going to be in software. Some creative use of timers may be in order.