Category Archives: Payphone project

Payphone project – screen problem solved & parts arriving

I’ve got some updates for the payphone project. First of all, a photo of the actual payphone I’m modifying. It’s a GPT Sapphire payphone, and there were a lot of payphones like this in Latvia just some years before. Now there are no payphones like this on the streets =(

Now, something about the HD44780 screen. First, this screen compared with the cheapest chinese HD44780-compatible screen:
IMG_0817

As you can see, they differ not only in sizes, but also that the header is not at the right place. What a shame =(

As I’ve told you, I’ve ordered replacement comtroller ICs for the display. They’ve arrived:
IMG_0746
A closeup shot:
IMG_0757
So – I’ve desoldered original ICs and soldered the new ones on the board.

IMG_0750IMG_0751IMG_0755IMG_0753IMG_0754IMG_0762

Still didn’t work! Why? Amused, I connected the display to the payphone… Only to see it working.

IMG_0792

What was it? I’ve had a guess, and I guessed it right.

IMG_0793

Seems that my HD44780 screen needs negative contrast voltage in order to display something. Couldn’t have known that earlier – there isn’t much information on this on the Web, and I can see why – it’s an extended temperature range screen, they aren’t that popular. I’ll need to make a negative charge pump in order to power it… BTW, would be a nice idea to see just how much current it needs on the contrast line – to understand which charge pump is needed. If it’s under 0,5 A, I can use a well-known 7660 IC. If not, well, that’s sad – that’d mean I’d need somebody to help.

Some info about this phenomena:
First clue I’ve found that helped me understand;
Actual screen modification that provides some info on how and why;
Just a bunch of photos of different displays =)

Also, I’ve received DTMF generators (datasheet) and decoders (datasheet)… But I haven’t got the crystals for them yet – they’re to arrive soon =( I’ve made breakout boards for both, but, as you can see, they lack some passive components and crystals.
IMG_0818IMG_0818

(Left – a ready board, center – DTMF decoder board w/o crystal and passive elements, right – DTMF generator board w/o crystal)
In order to understand my breakout circuit, just look at the datasheets, there’s a section with a sample usage. The breakout board with a crystal and IC is MT8870 DTMF decoder board – it’s basically the same IC, just older and from another manufacturer, but pinout and circuit are the same. I’ve made this board around 3-4 years before =) That might be one of the reasons it doesn’t work so well – my soldering wasn’t so good back then.
I also plan on making breakouts in Eagle CAD, just after I test these hand-made boards. I’ll share them here – along with some more useful breakouts I hope I’ll finally get an opportunity to test.

I’ve received a I2C-to-HD44780 interface converter, or, as they’re called, I2C LCD backpack.

IMG_0816

It’s also a Chinese version – so it’s not amusing it doesn’t work with the popular I2C LCD backpack Arduino libraries. Why? Seems that pin mapping between I2C-GPIO IC that’s on the backpack board and LCD header on the same board just isn’t the same as in popular versions of this kind of backpack. We’re left to guess just why they’d manufacture a backpack like that, yet it isn’t the prettiest thing to do. At least they’ve supplied Arduino libraries and example code… Which doesn’t compile in my Arduino IDE, and I don’t even want to know why ’cause I sure don’t want to translate code comments from Chinese. I suppose modifying some library that is already working just to have the bits of data sent in different order won’t be any hard. Also, it has a backlight control pin connected to the I2C-GPIO chip, so that’s a bonus =)

I plan on doing the next update when I’ll receive crystals and complete my breakout boards. I’ll probably have Eagle-made breakout boards and libraries for DTMF chips to share by then, too =) Not to forget Arduino libraries.

Project: Payphone remake

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 =)

diagram

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:

IMG_0567

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.

IMG_0564

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.

IMG_0565

Card reader module. Probably even has some actuators to push the card out – I didn’t look, I just guess.

IMG_0568IMG_0569IMG_0570IMG_0571IMG_0572

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.

IMG_0573

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!”

IMG_0632IMG_0633

 

Display, keyboard controller, accumulator controller and all that stuff. 

IMG_0637IMG_0639

IMG_0640IMG_0641

More about keypad

IMG_0634IMG_0636IMG_0635

 

The display. Why doesn’t authentic HD44780 IC work using the same protocol as all the other displays on this IC use?

IMG_0574IMG_0575IMG_0576IMG_0577IMG_0578

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!