Dear viewer, these subtitles were generated by a machine via the service YouTube and therefore are (very) buggy. If you are capable, please help us to create good quality subtitles: https://c3subtitles.de/talk/3190 Thanks!
[Music]
okay it's a pleasure for me to uh
announce a talk about a topic that I'm
personally very interested in that's uh
uh how you um give life uh back to uh a
staple in telecommunication technology
the good old rotary phone and today we
have Hans Gil here he's a researcher for
embedded computer systems in Zurich and
he's going to tell us uh how to revive
these marvelous machines hun take it
away good
[Applause]
[Music]
[Applause]
afternoon thanks for inviting me I'm
very honest honored to be here and
honest also um yes let me start with a
personal story when I was like 16
years brought me uh two Old Post Office
phones in a relay switch and I was so
excited playing with those
phones um that this kept through all my
career even so I'm doing embedded
Computing now and then my father told me
this story about Philip rice he said you
know Philip Ry was the inventor of the
telephone even so some people think it's
Belle Alex the graen
bell and um let me tell you a bit about
this Philip rice when he
um when he demonstrated his telephone to
the audience he used two sentences the
first sentence was the horse doesn't eat
cucumber salad and the second was the
sun is out of copper and U then on the
let's look at how Philip Rice's
telephone looks like it's here and what
he used is he used a knitting n uh uh
needle and around the knitting needle he
wound a a wire a coil and then here he
had a battery and here he had a
microphone you have to know that at this
time microphones were not invented yet
there was no radio and his microphone
worked in a way um it had a contact on a
membrane and the contact touched the
membrane and it vibrated up and down so
basically his first transition was
digital because only current on current
off and you can imagine how well this
sounds through this knitting needle and
so he needed only certain people
couldn't understand so the first um uh
transmission the people that listen to
the transmission understood only the
horse eats instead of the horse eats eat
doesn't eat cucumber salad and the other
one they understood the sun is out of
sugar so you can imagine that is not a
commercial product and so he it was not
a commercial
success um but it got a lot of attention
so one day Graham Bell heard about it
and got a kit of this uh system and re
um re uh reim proved it and uh this was
also not a commercial success then he
but he was clever enough to patent it
and uh standard tell graph a telegraph
company in the United States bought the
patent and developed the microphone
improved the
microphone and then because it was a
telegraph company they didn't see a
commercial success either so Graham Bell
bought it back and the rest of the story
we
know uh going back to my father um this
is a my small telephone collection at
home I found these telephones my father
gave me in the basement when I cleaned
up and I thought huh it's really bad I
would like to do something with it but
maybe as you know even if you connect a
rotary phone to a Fritz box it's not
working anymore because the fritz box
sends strange signs pound and uh to to
connect so I had to invent something to
make that possible at the same time I'm
teaching uh Yoku Linux I prepared for a
Yoku Linux class with my uh Raspberry Pi
I thought why not building a telephone
Central switch with it and that then my
idea for this project was
born so what I want to do is first of
all let's go back um my telephone switch
the what I wanted to do was I wanted to
connect at least eight telephones and I
want to connect wanted to connect
through the outside lines through a
router so I could impress my friends
when they come with their mobile phones
I could call them on the mobile mobile
phones from my rotary tile phones and
vice Vera they could call my rotary tile
phones from their mobile phones so that
was
the uh uh the yeah this was my these
were my
goals and uh today I want to tell you in
order how to achieve that I want to
First give you a quick introduction in
analog phones how analog phones work
then uh the interface to the Raspberry
Pi and then what the softw implemented
on the Raspberry Pi so since uh 100
years the analog phones look about all
the same if it's us telephone or German
telephone they are all about the same
except some uh some uh parameters are a
bit different so what you have here is
you have here the Bell the Bell is just
a solenoid and it has a Clapper and the
solenoid is tuned to a frequency of 20
to 25 Hertz and it needs a very high
current in Germany it's not that high
it's maybe 75 volts in the US it's very
high it's about 100 volts so it's needs
about 100 volt
RMS and 25 20 to 25 Hertz so that it
works at
all and then there is
um a a hook switch this is when you lift
the receiver I always in my presentation
I always say off hook on on hook then
there's a carbon mic this is the m
microphone they improved at standard uh
standard Telegraph it's basically uh
charcoal and it's charcoal is compressed
and when it's compressed more the
resistance is is lower and if it's not
so much compressed the resistance higher
so it there's a uh AC and low frequency
voltage uh uh modulated on this
line so when the telephone is off hook
this hook switch is opened there's a a
voltage of 80 volt DC on the lines A and
B of the
phone and then when the hook switch is
closed a current is
flowing through a Transformer here
through our carbon mic and out
here and as you know through the
microphone here the NF voltage low
frequency voltage is modulated onto
here there's another circuit they found
out when you have the when people phone
then they hear themselves in the in the
ear and then the people start uh talking
uh lower with a lower voice so they
figured out if they stop that then
people talk louder so there's another
little circuit built in here and it's a
coil on the same bobbin as this
Transformer here and it's wound in the
other direction so the current from the
carbon microphone flows like in this
direction through this coil and in this
direction to this coil and then it
compensates so what happens what you
speak in here you don't here in here
it's called side tone
cancellation good and then there's
another
invention uh from an American
he had a mortgage a not mortgage a uh
Funeral Parlor and uh when the um
telephonist in the village changed when
she got pensioned all of a sudden he
didn't get contracts anymore and he
wondered why it's because the new
telephonist connected to the competition
Funeral Parlor so his idea was I we need
something that the people can dial their
own number and are not dependent on the
telephonist so this person developed the
rotary dial so there is another contact
and for example when you dial a
three then this Loop current here opens
and closes and opens and closes three
times and on the other hand is a
mechanical device that counts the pulses
and makes the
connections so I think we got now all
components of that
phone and then uh after breadboarding I
implemented this on the PCB and you see
a lot of wires there because it's still
experimental it didn't work I'm not very
good analog designer so it didn't work
the first shot the way I wanted but now
it works pretty
well and here's a block diagram or what
you what you find
here you have um a front end circuit and
the front end circuit is responsible for
the ringing so I have here a generator
that generates my 100 volt 25 htz
ringing
voltage and in the front end is a relay
that depending on which phone is ringing
the relay connects to the phone and if
the relay is not if the telephone is not
ringing if you're speaking the relay
connects to a circuit I call the
splitter then the splitter splits on on
the phone you have a full duplex signal
both directions for uh and it splits up
this full duplex uh signal in a receive
audio signal and a transmit audio
signal and then for the external line I
have a circuit here this you could for
example co connect to a Fritz box and
then you have here a receive the same
way a receive and transmit signal and
now I have to control how the uh phones
are connected to each other I have a
connection Matrix I build it out of J
fat transistors and I needed 32 for only
one level so it's not a good idea later
I found out there's a chip to do that
maybe in the next version I do with a
chip so for example if number six wants
to talk to number whatever seven if this
is seven then this the Jed connects this
uh lines here and it connects this lines
back here
so back there is the Raspberry Pi and
the Rasberry Pi controls this connection
Matrix and it
uh gets the loop signals if the the
receiver is off or on on hook it
controls which phone is going to ring
and there's another circuit I explain in
a moment it's called The Ring trip for
the external connections I have the ring
detector
which detects if someone calls from the
outside so let's look a bit closer into
this front end so the front end uh is
supplied with um 322 to 100 volt for the
ringing voltage and now I what would
happen if the phone rings you have a AC
on the phone line and you lift the
receiver then you would hear a very now
loud 25 htz sound and maybe damages your
phone so you want to avoid that so in
there is a circuit that detects this and
generates a signal that goes to the
Rasberry pie called ring trip the the
ring trip stops the
connection and the splitter provides the
loop voltage and it provides a signal to
the rasir P Loop closed that means if
you hang up the receiver it's open is on
and when you uh uh put the receiver on
the fork it's off and here are the audio
signal splitter in and splitter out so
this ringing signal looks like that
where you I generate the ring voltage it
took me I I not I didn't work on this
Pro I work for this on this project for
May five six years and I don't have all
the time to work on this project so for
about two week years I developed this uh
circuitry here to generate this 20 to 25
uh Hertz voltage and it's a actually in
the end I had a solution which is very
simple I'm using a bridge chip just like
people that build um uh more uh cars
with Raspberry Pi they need a bridge
chip to control the motors and it's
about the same thing but the output is
not high enough so I I had um little
Transformer manufactured that gets the
voltage up to 100 volt and here's my
ring trip circuit the one side is
connected to the DC voltage and if if
someone lifts the receiver there's a uh
current flowing through the ring trip
and the ring trip detects are someone
lifted the receiver and then kicks this
relay so that it's going the telephone
is connected to the splitter the
Splitters when you have a normal call by
the way this bridge is called to the
pulse connected to the pulse with
modelator output of the of the Rasberry
pie and how pvm works I think maybe most
people
know good then the splitter circuit so
that's basically U the uh part that uh
splits the full duplex audio signal into
two in receive and transmit the most
important is here it's the DC detector
it generates a signal called Loop closed
and IFI lift the receiver the loop
closed signal indicates that someone
lifts the receiver
and um everything that's coming in the
uh through the phone so if I speak in
the speaker of the phone it's coming out
here it splitter out and if I I want to
feed audio in the phone the audio that
feeds the phone goes in here and goes
here in the phone there's a problem with
that because if I drive a signal in here
it's also arriving here it's the same
problem that you have when you speak in
your microphone of your receiver you
hear yourself so I built here an
electronic circuit that cancels the
so-call side tone so I have here a
second pass that goes here to a
differentiator and the differentiator
subtracts the signal coming in here and
the signal from the phone both signals
going out of the from the microphone on
the phone and the result is uh on the
splitter out you have only the
um the signal that's going here in
through the phone so it splits these two
signals into
two good now let's let's talk about the
software um so uh this is an um
basically software that has to control
an analog system where a lot of things
are going on at the same time for
example a party is calling and a third
party is dialing in from the external
line or I have to generate I'm dialing a
number and I have to generate tone so
all these things are happening at the
same times so I divided the whole thing
in real-time tasks so I have lots of
tasks that are running at the same time
let's look and I'm using round robin
scheduling for
that so let's look at the Main Finance
day machine for each connection or each
phone you need one main finite State
machine I implemented right now only one
connection so my switch can make only
one connection because I didn't
implement the switch Matrix uh fully I
had 32 32 J feds so I calculated for all
four connection I needed like 256 J fats
and it's too much for demonstration so I
have only one main finite State
machine and the main finite State
machine monitors my Loop closed signal
and when you lift the receiver I send a
conditional signal to the rotary thread
so the rotary thread counts the pulses
of the rotary dial so that's actually
the most important thing is the rotary
thread that counts the pulses so I sent
uh signal and then the rotary waits for
the pulses and once all the pulses came
in it sends back to my main State
machine this is dial is
complete if I need to generate signals
for
example
um for the for the ringing tone or
whatever I have here a semaphor that
sends goes to a thread that's
responsible for chaing signals for
example the nice thing is like the
English sound I can try that so you have
like a ring
Cadence
what I didn't say before is that I
wanted to get the international feeling
of my phones you have seen on my
collection I have some phones from the
UK I have some us phones I have German
phones I have French phones and so on
and I wanted to have the look and
feeling of those phones when you lift
the English phone you get the dial tone
from the English phone and when you dial
the call someone on the English phone it
should ring like what you just heard so
this is done
[Music]
with so this is done with generate
signals and then I'm using gstreamer for
generating those sounds and one is for
example for the ringing tones and then
um I have to dial also outside so the
fritz box understands only DTMF signals
it doesn't understand pulses anymore so
with gstreamer I built the DTMF
generator and I can play special
announcements let's see if that works
for example a lot of Germans when they
are older they know
that so this all this is done with
gstreamer good what else do we
have yeah I have a another task for the
pulse with modulation of the Ring
signal good and the main State machine
so basically for each connection I need
a main State machine so when nobody
calls it's an idle and if someone gets
off hook the main State machine uh goes
into the off hook State and here it
waits for the dial pulses and I designed
it so I have two digit numbers after the
first number came in it waits for the
second number and when the rotary dial
responds uh it goes to State internal
ringing and then it depends also if you
for
example
um uh have uh uh want to connect to the
outside line so I have to when it once
it detects I dial the zero it uh goes to
the state outside line and it connects
to the outside to the fritz box or if
the number doesn't exist at all for
example 98 or something I don't have so
many phones
yet so uh it comes the unobtainable sign
so the lumber what you just heard is not
available or if someone is busy on the
phone gets engaged and on the external
side like for example if someone calls
from the external uh the system Waits uh
until someone responds and then the
external uh uh connection is
established so let's go in the important
things for example so how do I do this
how do I count Pulses from the rotary
dial
then my receiver is on the
hook there's no current no Loop current
so what I do here is I de detect the
loop current
here so there's um so the loop current
is zero now someone lifts the receiver
the loop current goes on and uh after a
while the person decides to dial a
number so for the amount of uh the rotal
runs the pulses go here up and down so
here I generate three pulses which is
equivalent to the number three once the
rotary dial is finished there you see
there's no more pulses coming so the
software is detecting that and sends a
signal to the main State machine dial
complete so a three was dialed dial is
complete and then if I hang
up I I'm completed with my phone call I
hang up the loop current goes low again
so how did I manage
this um I'm using the
select system of the
uh uh of the Linux so what you can do is
you can take a gpio signal and on the
gpio signal you can enable the
interrupts for example rising and
falling I enabled both edges rising and
falling and then uh you can set the file
C the scripture to your exception so
when a pulse comes on the GP an
exception is generated and you can also
set a uh time out so what this select
instruction does actually it if you
insert this in your C code it waits at
that time and it blocks your your threat
it Blocks Your threat until something
happens until a
condition uh happens for example an
exception and then the select function
Blocks Your
threat and
until uh for example there's a time out
so if you have a time out it's dangerous
to block a SE forever so if you have a
timeout it returns a
zero if uh if it's not if you don't have
a timeout if everything is okay so it it
uh returns something larger than zero
number larger Z than zero or if they
failure it returns a minus
one so I I built this in this uh uh
select functions inside and then I have
another little uh State machine
here that when nobody's stying it's in
idle and now I lift my receiver the
through a a conditional weight the state
machine is
started and it weights now for the
pulses and at the first select statement
I put the time out to 30 seconds so if
someone lift the receiver and doesn't do
anything after 30d seconds he gets a
message that he should dial or hang up
in the US it's very it's not very nice
in the in the US you hear like first
nice announcement and then you have a
real harsh sound to hang up the receiver
so that's actually I do with the select
and the timeout condition so let's
someone let's assume someone lifts the
receiver dials a number so one pulse is
about 100 milliseconds one PS after
about 80
milliseconds it um gets a time out if if
if the pulse is in lower for more than
80 millisecond gets a time out and the
state machine goes back in the idle mode
and said the use a hang up so it could
be that you lift the receiver and then
you hang up again so that it gets the
message who hang up but if everything is
okay then the state machine uh uh sets
number counted to one and then goes to
closed and while it goes to closed it
increments the number so while this
pulses come in the state machine flips
back and forth between these two states
and counts the number now finally the
number is
counted then the signal will stay the
loop current will stay high again and
then um this must uh the timeout will be
reached because it's longer than 80
milliseconds and then I go back to the
idle mode and I send a status style
complete and then I with style complete
I will read out the number and know how
many numbers I counted so I use the
select statements with timeout to figure
out what's going on and when the dial is
completed or if someone hang up after it
doesn't
die good so this is the counting for the
RO
pulses then um um I need to to
generate uh DTMF
pulses for connecting to the fritz box
so DTMF pulses maybe you know them I can
play
[Music]
it okay now I hope it stops
again um in the DTMF pulses
they use two frequencies so each button
is assigned to two different
frequencies and I'm using those DTMF
pulses with a software called uh or a
package called G streamer that I
installed on the
Yoko and gstreamer is a a
framework and
uh uh you can build uh up a pipeline
and uh out of components out of plugin
plugins for example there's plugins
available for
mp3
decoder then there's um file reader so
what you heard is coming from a file
that I recorded off the
internet and there's uh also outputs
syncs and sources so if I
uh uh send it out to the Raspberry Pi
I'm use I'm going here through an ala
sync and there's some tool to for
debugging and then also you can uh get
also complete video editors and things
like
that so to build up a
pipeline uh I used two sources I use the
audio test Source it's called audio test
source is the the source for the whole
thing and I'm using the adder to two to
mix the two sounds together so I'm using
here an adder and so that this works I
have to put it in a queue so I put both
audio signals into a queue and then I
have to attach a manual pad to get this
out and another pad to get it back into
the adder and to adapt to the sync I
have I'm B I'm using the analog audio
output of the rasbery p for that uh I
have also implemented which I have not
shown I I have also implemented a codec
for that but uh it's the easiest way is
to use the analog audio output so the
Ala sync is the analog audio output and
in order to get there I have to convert
my audio and resample it to this
sync and with those thingss I can
generate the DTMF pulses by the way what
is very interesting at first it didn't
work and I figured uh my my Fritz box
couldn't understand the DTMF pulses and
I looked with a scope I looked what it
came out and it's actually gstreamer the
frequency is slightly off it's not it's
not within the tolerance of the DTMF so
I by manually by hand I corrected the
gstreamer the audio frequency of the G
streamer so I use it for DTMF and I use
it also to generate the dial tones for
example in Germany it's 400 125
Hertz and uh in Germany it's easy all
engaged it's all the same frequency in
England you have kind of a mixture of
350 HZ and 450
HZ and in the US it's very similar to
that
good um yeah I'm pretty much Advanced
it's faster than I
thought um so after I built this project
uh by the way the software you can find
on the GitHub um my programing skills
maybe don't blame me for my programing
skills
please and uh I can if you want I can
load also the schematics on it but I
would be careful with some
caution so what I would improve is uh
right now I use Jed for the connection
Matrix and uh iare C to uh parallel out
uh iCare C expander
chip and um later I found out there's a
very convenient chip where you can do
that all in one and all you can also do
all connection you can all four phones
con talk to all the other four phones at
the same time that's I can't do right
now so I would use a chip to do
that um and then if you do that you have
to expand the main finite State machine
so it gets a bit complexer you have to
assign a state machine per connection or
per
phone and also what be would be very
interesting is to use a cheaper
Raspberry Pi um it would be interesting
to use a Raspberry Pi Nano and maybe
there are some people who want to
program it not in C but in
micropython and I I didn't try it out
but it should work it should be possible
to do thread programming with
micropython and also the Raspberry Pi
Nano also has a possibility to put audio
out via the uh I Square s interface or
even via the pulse with modulator so it
should be possible and it could be a
next expansion of this
project and then also the splitter
wasn't such an easy thing uh splitting
so what I do is the problem is on the
splitter I take um full duplex signal
and I split it into a receive and a
transmit signal and on the other side I
mix it again to a full duplex signal and
if the gain on this splitter is is very
high I get a oscillation I get a
feedback between the two Splitters by
the way this uh the damping or the
separation of receive and transmit is
very much dependent on the phone that's
connected on the other side and the
length of the wire or the the properties
of the wire so if this is not if these
uh splitter is not exactly adjusted you
can see on my splitter that there's an
or adjustment potential meter where you
can set this exactly to zero if this is
not precise you get like a feedback and
so the all system Swings with a very
high
frequency so there's other
possibilities uh which I have seen which
I could explore which would be maybe
even better or better good and then also
the power consumption is a problem I me
the Raspberry Pi gets very hot and also
my Transformer gets very I could improve
it put it like maybe a switched power
supply and also maybe uh turn off a few
CPUs on the Raspberry
Pi uh because for like I I wouldn't want
to have a system like that turned on 24
hours and consume a lot of power so it
should be possible to use it with with
uh
uh uh with a a smaller Raspberry Pi less
processors yeah so um I thank you for
listening and uh I could open yeah a
question answer session if you have some
questions to my
[Applause]
design thank you Hans for the
presentation and especially the work
that you put in there really fascinating
okay you can line up at the microphones
and I look at the signal AG first is
there a question from the
internet there are a lot of questions
from the internet and the internet was F
very nostalgic about the technology you
were presenting so there was a lot of
interaction one of the questions is did
you consider running a sip to analog
Gateway on the raspberry yeah I have
heard about that this is possible um
that would be a POS possibility I
haven't maybe no I haven't done it yet
but it's I this would be very elegant
solution
yes but I don't right now I'm more the
person that in is in the hardware but
and also my problem is sometimes like um
I have um maybe a few weeks to work on
it and then I'm teaching and I'm my time
is absorbed in teaching so I don't have
all the time to develop it I would
rather do that
actually okay microphone to please uh
yes regarding Hardware um it should be
possible to turn this phone into a
remote listening device by putting a
much higher RF frequency to the Bell
current and then you using the resonant
Circuit of the phone as a uh well you
you get RF current through the
microphone and then you modulate it uh
with your uh with your receiving circuit
and I think that should be possible with
just software changes to your Hardware
what is the uh advantage of doing that
why would you put uh well you can then
listen to the phone while the thing is
still on the
hook it's a very old hack but I think
with your Hardware it should be possible
to do that okay maybe we should talk
later about
it okay the internet do we have another
question yeah very electronical question
they asking if it's possible to power
the Raspberry Pi with a rotary will by
igniting uh peso Sparks uh with all the
power uh but to power an
SPI the Raspberry Pi yeah ah good idea
so to power the Rasberry Pi with the
power of the of the rotary phone yes but
then I of course I doubt that there is
enough power um um but the idea was also
to use a standard unlock phone of the
Shelf not to modify it so I suppose if
you want to power the whole thing you
need a generator in your in your rotary
phone right this is the idea I behind it
and uh so
you you can't do it with a standard
rotary phone okay but but but it's an
interesting question because it's one
professor at our Institute is exactly
doing things like that so it's doing
like light switches remote controls that
don't need batteries and things like
that maybe I should I will suggest it to
him when I'm back in TK
microphone 3
please um yeah you have shown the use of
the select function yeah um is it
something specific to
Yoko no uhuh that's General Linux the
select function okay thank you it's not
a Yoku thing Yoku is a normal Yoku is a
release system and so yok it's called
Yoko because it's a very very small
Linux but everything it's a standard
it's a standard Linux actually I'm using
and you can like the on Yoku you have to
add the packages as you need them while
for example if you have a Ubuntu Linux
you have like you load programs on the
Fly while your Ubuntu is uh installed on
Yoku you have to decide beforehand what
kind of packages you need to get it very
small it doesn't have also a graphical
user interface but you could add one if
you want okay Does this answer your
question
okay the
internet uh there are a lot of people
very interested in uh participating in
your project and uh working with you and
they're wondering if there is some kind
of mailing list or a forum or some place
to hang out uh yeah discuss this
technology I haven't thought about it
yet but uh could arrange that
yes I I give you my um my or I my email
or I published my email address so maybe
if uh the person who is interested could
mail me and then I will let him know if
I installed
that what what what for me is very
interesting also like the I Tred to
figure out how to do the analog circuit
and like I took for example a Fritz box
apart because something like that must
be built in the fritz box because on the
fritz box you can connect three analog
phones but I didn't find a schematic or
something and I'm also in a telephone
Club in Switzerland and there's there's
nobody who knows uh how something like
that works they all already they are
very old so they know about relay
technique and so on even older than I so
but I didn't find anyone who knows how
these input circuits work and maybe I
can find someone uh who knows how this
works or maybe can get me a schematic or
whatever yes thank you okay microphone
to please yeah thanks for the aome
awesome talk um I'm curious to see it an
action do you have any demonstration
video no unfortunately not uh I don't
have a
video um but again if this person sends
me an email I will prepare a video and
show it thank you okay quick question
from microphone one please yeah really
thanks for sharing your experiences I'm
wondering did you approach some
telecommunication museums with your
project I think it's deserving more than
just your local
Network did I approach some Museum some
telecommunication
exhibitions who can maybe use it for
their
phones no no it's it's for now it's uh a
completely private uh work and I always
also I only told it to friends of mine
and I didn't publish anything and
basically the idea to come here was from
another friend while we were jogging he
was saying oh the idea is some something
interesting for the C's computer
conference you should apply that's what
I did so it's it's not public yet
so okay since microphone 3 was very
eager to take the spot from microphone
one I allow one more question from
microphone one very quickly uh did you
ever um connect the Vintage modem dialog
modem oh not yet no uhuh but it should
work because um because it's the Vintage
it it's I uh it I should I designed it
as much as possible according to the
specifications of the postal office so a
vintage modem should work
yes okay great stuff that was the last
question that concludes this talk and
thanks again hunts for your presentation
and your work on Ro
[Applause]
reforms
la