Voip Desk Phone - with the help of a PIC

Having used VOIP services like Skype and SipGate for a while, two things were clear, VOIP is a great way to get another phone line, cheaper calls etc, and using a headset is a real pain.

Yes, I know there are some very good VOIP phones out there, but as I don't make lots of calls, I would be spending more on the phone that I'd be saving on call costs, I also thought it would be more fun to see what I could do with what I already had.

There are various web pages with details of how to modify a DECT portable phone or link a standard phone using a 'chat cable' style adaptor. I looked at these but could not modify the phone I had (without the risk of breaking it) and although I was able to get audio in and out of a standard phone using an adaptor, it suffered from echo on the remote end - very off putting for the caller.

With the cost of a cheap handset style phone running at a few pounds, modifying one of these to feed audio directly into a PC running the VOIP software seemed to vbe the way to go.

You can see the results here.

This worked fine, I could pick up the phone when it rang by hitting a button on the PC and I didn't have a cable wrapped around my neck all the time. However, what I really wanted was a means of answering the phone or making calls without having to use the PC keyboard, I didn't mind that the computer would need to be on, I just wanted to be able to use the phones keypad to control things.

The local shops are now selling basic desk phones (where the keyboard is part of the base unit) for only a few pounds more than the simple handsets - the prices being forced down by the cheaper DECT phones.

It is possible to remove the phone PCB of one of these units leaving you with a shell, keypad and a hook switch - just the thing for building your own PC/VOIP audio phone.

The PIC Processor helps us by monitoring the keypad and hook switch and sending the relevant codes to the PC via the RS232. On the PC end, a small program designed to read bar code scanners does the job of controlling the VOIP software.

The first task (after removing the redundant phone pcb) is to map the keypad. It is possible - with the phone I am using to see where the keypad pcb tracks go, so mapping involves following each track and noting the keys that it connects with.

I ended up with a list like this:-

KB Group A
1 STORE EM3 EM2 EM1
2 MEM RECALL REDIAL/PAUSE
3 7 6 9 #
4 2 5 8 0
5 1 4 7 *
Group B
6 EM3 1 2 3
7 EM2 RECALL 6 5 4
8 EM1 MEM 7 8 9
9 REDIAL/PAUSE STORE # 0 *
Led
10 LED
11 LED

From the above, we can see that when button '7' is pressed, the lines 3 and 8 will be connected together.

In order to detect this using our PIC, we must assign each group to a set of port pins using one group(b) output a 0 on the first line we are interested in, keeping the others at 1. Read the port connected to the other group(a), the internal pull ups of the input port will keep any unconnected lines at 1, if any of the buttons on the first line is pressed, there should be a corresponding 0 on the input port line.

We can store any button presses or take action, but we should then proceed to read all of the other lines on the keypad.

We will also need to take steps to allow the buttons to settle, otherwise, we will find that instead of getting 1 digit, we get several as the contacts close or open (key bounce)

Before anything, we have to pick our ports and get the keypad hooked up so that we can test the keypad

I have decided to use the upper 4 bits of port b as outputs on group b and the lower 5 bits of port c as inputs from group a.

With a short ribbon cable from the keyboard to a 25 pin plug, I can connect the keyboard to the TestRig and try out some software.

Continue to VoipDeskPhone2-Software

Experimenting with Microchip PIC 16F876, 16F628 and other Processors

Introduction
About the PIC Processor
Programing the PIC
Building Blocks
PIC Test Rig

Connecting an LCD
VoipDeskPhone
VoipDeskPhone the Software
VoipDeskPhone3 Changes for use as an Asterisk Console Phone

Cheap PIC Keypad PoundShop Clock / Alarm = Cheap Keypad

3 State LEDs

Add DRAM to a PIC
PIC Links


Google
 
Web picprojects.247n.com

Electronics and Internet Sites at www.247n.com