The Pi doesn't like being suddenly disconnected from the power, this is a full Linux distro and therefore likes to be shutdown properly before being powered off.
If you dial a 6 on the phone, wait until it ring through, it will shut down the Pi. Now the power can be shut off by switching off the power.
On the back one connection if obviously the receiver, the other is used for the USB plug to the LiPo battery. Nice and neat!
Tuesday, 25 March 2014
Battery power...
Up to now I have been using 6AA 2000mAh rechargeable batteries to power the RPi, this gives an uptime of about 3.5 hours estimated current draw of 575mAh. Obviously not that good for a modern phone. I have now purchased a 12000mAh LiPo rechargeable "phone extender" type battery. Unfortunately this measures 10.5x10.5x2.5cm and won't fit in the phone casing, but should give (12000/575) 20 hours of operation.
On the LiPo there are 2 USB outputs - one 5.0V @ 2.1A for iPad type devices and one for phones. The Pi plugs directly into the 5v 2.1A output and works a treat. The other output is 5.5V @ 1A and is labelled as being for phones - it even comes with a Nokia 2mm adapter. Great this can power and recharge both Pi and Nokia. Unfortunately, although the Nokia initially appeared to charge form the LiPo, it keeps displaying "Charger not supported" and stops charging. Not sure whether this is the 5.5V not being enough (the original Nokia charger outputs 7V) or something else.
I am going to fit a usb to Nokia charger then expose a USB socket on the side of the phone so at least the nokia can be charged without dismantling the whole thing. Having said that the Nokia standby seems to be about 5 days!
The battery won't fit in the case so I have decided to put it under the phone. I put 4 small plastic feet on the bottom so the phone now sits on the battery - not ideal but not much choice.
On the LiPo there are 2 USB outputs - one 5.0V @ 2.1A for iPad type devices and one for phones. The Pi plugs directly into the 5v 2.1A output and works a treat. The other output is 5.5V @ 1A and is labelled as being for phones - it even comes with a Nokia 2mm adapter. Great this can power and recharge both Pi and Nokia. Unfortunately, although the Nokia initially appeared to charge form the LiPo, it keeps displaying "Charger not supported" and stops charging. Not sure whether this is the 5.5V not being enough (the original Nokia charger outputs 7V) or something else.
I am going to fit a usb to Nokia charger then expose a USB socket on the side of the phone so at least the nokia can be charged without dismantling the whole thing. Having said that the Nokia standby seems to be about 5 days!
The battery won't fit in the case so I have decided to put it under the phone. I put 4 small plastic feet on the bottom so the phone now sits on the battery - not ideal but not much choice.
Using the orginal hand-set microphone and speaker...
Up to now I have used the Nokia hands free kit, plugged into the phone then concealed in the old phone handset, bit of a cheat!I then began to wonder if the original hand set mic/ear would work.
I purchased a 2.5mm ear/mic jack plug from ebay, soldered 4 wires to it - which was very fiddly (this is for a stereo connection which wont be needed) connected it to one of the other old handsets I had, plugged it into the Nokia and bingo! Made a call. The 40 year old speaker was deafeningly loud, which surprised me.
Nokia hands-free cheat
Check this reference!
http://www.samhallas.co.uk/collection/bits_hs3.htm
This brown hand-set is form the 70s, the cream phone I have used is from the 80s, one of the differences being that the internal microphone is different. When I connected the 80s handset the Nokia would not recognise as a "hands-free" kit which it needs to in order to work. So I swapped the mic from the older phone to the newer one and it worked fine. So either the new version of the mic is faulty or there is something about the older mic that is recognised by the Nokia. I will take some impedance measurements, or look on Wikipedia and see if I can find out.
I purchased a 2.5mm ear/mic jack plug from ebay, soldered 4 wires to it - which was very fiddly (this is for a stereo connection which wont be needed) connected it to one of the other old handsets I had, plugged it into the Nokia and bingo! Made a call. The 40 year old speaker was deafeningly loud, which surprised me.
Nokia hands-free cheat
The old hand set wired up to the Nokia jack plug.
http://www.samhallas.co.uk/collection/bits_hs3.htm
This brown hand-set is form the 70s, the cream phone I have used is from the 80s, one of the differences being that the internal microphone is different. When I connected the 80s handset the Nokia would not recognise as a "hands-free" kit which it needs to in order to work. So I swapped the mic from the older phone to the newer one and it worked fine. So either the new version of the mic is faulty or there is something about the older mic that is recognised by the Nokia. I will take some impedance measurements, or look on Wikipedia and see if I can find out.
Thursday, 20 March 2014
RPi Phone schematic
This is the schematic for the Pi Phone. Note the use of the 3.3V and 5V, apparently you have to be careful not to cross the beams or you can blow stuff up.
Note also that I have chosen the simplest (i.e. cheapest) LCD display, they are available in all colours. These are not the ones that can handle a serial connection, these are £20 each, the ones I bought were £3.
I produced the above schematic using TinyCAD and very well supported and simple to use piece of software - only available for Windows though. I also used VCAD - not for this simple circuit, but for the ringer that I built some time ago - which will transform the "net" exported from TinyCAD to a Veroboard design.
1) When using TinyCAD make sure you are using the components from the VeeCAD libraries
2) In TinyCAD: Special -> Create PCB Net List, export as Protel.
3) For the extra components you'll have to create a component in VeeCAD
Note also that I have chosen the simplest (i.e. cheapest) LCD display, they are available in all colours. These are not the ones that can handle a serial connection, these are £20 each, the ones I bought were £3.
I produced the above schematic using TinyCAD and very well supported and simple to use piece of software - only available for Windows though. I also used VCAD - not for this simple circuit, but for the ringer that I built some time ago - which will transform the "net" exported from TinyCAD to a Veroboard design.
1) When using TinyCAD make sure you are using the components from the VeeCAD libraries
2) In TinyCAD: Special -> Create PCB Net List, export as Protel.
3) For the extra components you'll have to create a component in VeeCAD
Saturday, 15 March 2014
Massive progress....
I have been using the Raspberry Pi with the GPIO & Python to read the pulse dials from the phone, this is fairly straight forward (it's strange that when something doesn't involve "C" it becomes straight forward!!!).
I decided that the phone should have a display, this is a 16x2 line LCD, powered from the RPi. All of the dialling logic is handled by the RPi + Python, the phone is simply receiving an ATD modem command with the dialled number.
Likewise for an incoming call the ringing is detected by listening for the incoming call command then answered when the BT phone is picked up. I should have mentioned at this point that the two actions that are read from the phone are the rotary dial and the on/off hook switch. Much of the logic is exactly the same as the PIC version,which goes something like this:
I have discovered a new toy....a crimper for making connectors, the kind you fit to jumpers. Anyway this makes prototyping a lot quicker, once you've made the wires, and my production hardware also uses these jumpers.
The downside to the jumpers is that they use a bit more space, the obvious alternative is to just solder directly to the veroboard.
On to the phone, I have, unfortunately, had to remove the ringer solenoids and the bells because I broke my ringer circuit AND there isn't room in the phone for the PRi and the Nokia and the ringer circuit. One of the biggest space consumers is the USB cables. I am awaiting for some 90deg ones to arrive from China.
I have put the two circuits - each consisting of 2 resistors, on a small piece of veroboard, along with the 10K pot for the LCD display.
I used a pair of dividers, like a pair of compasses for drawing a circle but with 2 spikes, to measure the overlap of the underside of the LCD display. Once marked with the dividers, I then drilled through with a 0.5mm drill bit then used a Stanley Knife to cut the rectangle out.
I decided that the phone should have a display, this is a 16x2 line LCD, powered from the RPi. All of the dialling logic is handled by the RPi + Python, the phone is simply receiving an ATD modem command with the dialled number.
Likewise for an incoming call the ringing is detected by listening for the incoming call command then answered when the BT phone is picked up. I should have mentioned at this point that the two actions that are read from the phone are the rotary dial and the on/off hook switch. Much of the logic is exactly the same as the PIC version,which goes something like this:
makeCall(number):
write("ATD"+number+";\r\n)
endCall():
closeSerial()
answerCall():
while(1):
openComms()
write("ATA\r\n")
inCall():
while(1):
if(OnHook):
endCall()
waitingForCall():
while(1)
val=readSerial()
if (val == "R"):
return 1
getNumberGPIO():
while(1):
if(pulseDetected):
# throw away first pulse as this is the anti-clockwise dial
num=num+1
if(pause > 0.5):
numStr=NumStr+str(num)
num=0
while(1):
if (offHook):
num=getNumber()
makeCall(num)
inCall()
if (onHook)
answer=waitForCall()
if(answer == 1)
inc=answerCall()
if(inc == 1)
inCall()I have discovered a new toy....a crimper for making connectors, the kind you fit to jumpers. Anyway this makes prototyping a lot quicker, once you've made the wires, and my production hardware also uses these jumpers.
The downside to the jumpers is that they use a bit more space, the obvious alternative is to just solder directly to the veroboard.
On to the phone, I have, unfortunately, had to remove the ringer solenoids and the bells because I broke my ringer circuit AND there isn't room in the phone for the PRi and the Nokia and the ringer circuit. One of the biggest space consumers is the USB cables. I am awaiting for some 90deg ones to arrive from China.
The RPi circuit design
As you can probably see this is as expected. Only joking, I will post the circuit diagrams when I have drawn them up, basically it's a couple of pull-down resistors, one for the pulse detection of the rotary dial, and one for the on/off hook.I have put the two circuits - each consisting of 2 resistors, on a small piece of veroboard, along with the 10K pot for the LCD display.
Fitting the LCD display, tastefully, to the BT phone casing.
I used a pair of dividers, like a pair of compasses for drawing a circle but with 2 spikes, to measure the overlap of the underside of the LCD display. Once marked with the dividers, I then drilled through with a 0.5mm drill bit then used a Stanley Knife to cut the rectangle out.
Ringing
Having had to remove the solenoids and bells from the phone I am using a Nokia ring tone that sounds like a.....phone!! Works fairly well and sounds reasonably authentic.Sunday, 23 February 2014
Raspberry Pi
I was finding the UART to USB a bit of a problem from PIC to Nikia 6301. I have decided to use a Raspberry Pi, this has a USB interface built in and can send AT commands using "cu". So the current plan is to get the pulse dial detected on the GPIO of the Pi and send the AT command from there. This should be a lot simpler than using a PIC.
There will still need to be a bit circuitry to actually ring the phone, I should be able to drive the boost converter etc from the GPIO.
Additional battery power will be needed to drive the Pi, apparently 4 AA batteries is sufficient as the Pi requires about 750ma.
This will all be done with Python scripts.
There will still need to be a bit circuitry to actually ring the phone, I should be able to drive the boost converter etc from the GPIO.
Additional battery power will be needed to drive the Pi, apparently 4 AA batteries is sufficient as the Pi requires about 750ma.
This will all be done with Python scripts.
Sunday, 23 June 2013
Realterm setup...
Subscribe to:
Posts (Atom)







