One of my current projects in R&D stage is converting a GPT payphone to Arduino platform while preserving all the abilities and keeping its outside as-is. This is a project I’ve started to plan when I was asked to unlock this payphone. See, they have smart card system inside which somehow is responsible for security of the payphone and all that stuff… And the payphone effectively fails to work both with or without a small internal SIM-like smartcard, it’s locked with it and not working without it.
So what? We have a payphone that is useless, even though it’s a masterpiece inside – i’ll show you why.
Without any clue about how to unlock anything on existing hardware, I’ve got an idea… What if I could replace everything that relies on smartcard system (that, unfortunately, means about 75-85% of all electronics in the payphone) with self-developed solution that’d even be upgradeable in terms of its capabilities? That is, we take a MCU, we take all the other parts that we’d need to make a landline-connected phone, put them all together and write the firmware so that they all work together. Great, isn’t it?
When I had to choose a base, I chose Arduino. Why? Development will be easy for me because of great choice of libraries, my knowledge of Processing used in Arduino and huge count of people that are ready to help. Also, there surely are people who might repeat my project, and Arduino would be great for beginners. But… How the hell do you connect Arduino to a landline, let alone make it work as a payphone?
Turns out this isn’t easy, yes. AFAIK, Arduino cannot work with voice, so I’m kind of limited in what capabilities the payphone can have. However, we can leave alone voice synthesis and concentrate on how the heck do those two thin wires that come to our phone make sound…
It’s called DAA interfacing, and I’ve found around 10 articles or posts from people who had it implemented on different platforms. Turns out that you’d have legal problems connecting things to your landline… So – there’s a solution, called DAA interface module, it’s a bit like IC because it has all the needed components in one package, furthermore, it’s FCC approved. It takes those two wires and has contacts to connect the microphone, speaker and some more helpful contacts, such as signalling when there’s an incoming call and when the handset is lifted. Some even have Caller ID contact, although it’s not my case as currently I cannot find any DAA interface which has it and is in stock. Problem is – they’re old and they’re not manufactured anymore. Therefore, stock is not so great as I’d wish it was.
I’ll be ordering two different DAA module ICs:
1) CH1817 – datasheet is here, I’m getting them from here
2) CH1812 – datasheet is here, I’m getting them from here (same seller)
I’ll need to hook up a DTMF decoder to the module’s audio output and a DTMF generator to the module’s input. I’ll also need to mute microphone pre-amp for the time that DTMF generator will make sound. I’ll need something to control keypresses. There are keys on the payphone – and I need to preserve both them and PCB that has all the contacts for keys on it. I plan on cutting traces that lead to keys, disabling them from the rest of the PCB and wiring some kind of keypad controller IC to them. Maxim has one, it has I2C interface and does everything that’s needed – but it’s only QFN, no SOIC package available… There’s a need for a breakout, for sure =)
What about DTMF? Those old codes that phones and, recently, some robots and DIY smart house systems, are using to reliably encode and decode numbers over unreliable and limited phone lines? Well, Holtek seems to be partly targeted at that. They have both DTMF encoder and decoder ICs available, which are easy to control and cheap on eBay. Holtek even has a caller ID decoder IC available, even though I don’t yet know whether I’ll be able to implement that – it has some limitations =( All those ICs are easy to hook up to Arduino, there isn’t much code to be written and they’ll provide all the necessary functions.
By the way, the payphone has a nice HD44780 controlled screen. This screen has a connection header that is fully compatible with all those cheap 16×2 HD44780 screens, all the pins are of this header connected to right pins on HD44780 (I checked with an ohmmeter). In short, differences between this screen and any cheap 2-dollar HD44780 display on eBay are following:
1) Non-standard dimensions – this screen is 1,5 times bigger than all the screens available. Finding another one with the same dmensions would be quite a pain in the ass.
2) It doesn’t freaking work for me yet =(
I’ve ordered replacement controller ICs – there are two of them on a display board. BTW, those are quite hard to find – thank god I’ve found some offers on Alibaba. Well, they were expensive =(
I’ve added a diagram I made in Dia, it explains what’s connected to what =)
What I’ve ordered?
- DTMF generator – HT9200
- DTMF decoder – HT9170
- Two solderless breadboards – for prototyping (already arrived)
- Replacement controller ICs for the display – HD44780 and HD44100
- Arduino Pro Mini MCU
- DAA modules – I’ll be using only one but you can never be sure, things happen to break at the wrong time =)
- RTC module – using DS1307 chip and the breakout I’ve developed by myself.
I haven’t yet ordered the keypad controller IC, unfortunately. If I won’t have it in time, I’ll make a keypad controller using a spare Arduino Pro Mini =) Here’s my eBay collection for this project – includes almost all the parts I’ve bought.
Some links, projects and articles about DAA interfacing:
- This is probably the best article. It’s very close to my project and I guess I learned a lot from it. For everybody that will follow the same path as I did, this has to be read through.
- This article provides a lot of nicely explained theorethical information about designing your own DAA interfaces. I won’t be following this path because DAA module is claimed to be safer, but it was nice to know more about what am I actually doing 😉
- This is a price list from Cermetek, company that used to produce those DAA modules. Has nice datasheets of ICs that currently can’t be found anywhere 😉
- This site sells spare parts for GTP Sapphire payphones. Just so you know =)
- This is a project with handmade DAA interface – a landline-controlled alarm. If you can’t get a DAA module, take a look here – and don’t forget that theorethical article above so that your interface works instead of catching fire!
- One more dial alarm with DIY DAA interface. This is described much better than the previous one =)
- Sample project with DTMF generator hooked up to the phone line. Has some info about transformers and stuff.
More photos of this payphone:
That’s how it looks inside. Right part is security+DAA+MCU module, box on the left is a coin counting box, which hides a card reader/keypad/accu charger/display modules.
This module seems to be some kind of safety/power module, unfortunately, when I was doing research on it, I couldn’t connect it to the landline to check. When I’ll be assembling everything, I’ll retrace the schematics and fully understand what it does.
Card reader module. Probably even has some actuators to push the card out – I didn’t look, I just guess.
Some photos of main board (right side). Contains DAA and many, many general-purpose 15-year-old datasheetless MCUs that would be impossible to reverse-engineer. Also contains a DB9 port, must be COM – will see when I’ll work on it.
Security module. So much of a mess because of this PCB and some code in those MCUs that, apparently, says “Nothing will work without a proper authentication on my watch!”
Display, keyboard controller, accumulator controller and all that stuff.
More about keypad
The display. Why doesn’t authentic HD44780 IC work using the same protocol as all the other displays on this IC use?
Some stickers from inside of the payphone. Google search for “Multipaymond” gives 0 results… Now there will be one =)
Wait for updates – there sure will be some when I’ll get all the parts!