Posts tagged ‘Hack’

Retro insane asylum telephone

I recently bought an oldskool rotary phone. I saw it at an auction and it looked nice, but its history was even more fascinating. In its youth it was doing service at the local insane asylum.

insane asylum

image from the museum.

From the leaflet: “Welcome as a patient to the Psychiatric Hospital”
About the Psychiatric Hospital

The highly regarded Copenhagen architect, Gotlieb Bindsboll, built the Jyske Asylum in the middle of the 19th Century. The inspiration for the building, with its crow step gables and many beautiful courtrooms, was taken from the typical Danish manor houses. Its position, with views over the Ã…rhus bay was in keeping with the contemporary view of the healing benefits of beauty. The hospital became known as a model institution for the treatment of the mentally ill, also on a European scale. The first part of the hospital was completed in 1852 and it was extended several times over the next fifty years.

kirk phone

The phone is from 1951 1955 and the “electronics” looks aged but in surprisingly good condition. My first plan for it were to gut it, and put a more modern telephone inside, so I could use it for voip. But when I saw that it were in good condition, I thought it would be a shame to kill it entirely.

So I wanted to see whether it would be possible to use it as it is.

For the voip connection i have a PAP2T linksys adaptor (pap), its quite simple to work with. Plug in power and ethernet cable and configure it with a voip service-provider. Initially I used a normal phone to make sure that i had a working setup, before trying to get the rotary phone to work. The normal phone were quite easy to setup and it “just works”.

For the rotary phone there is still some difficulties. But i have managed to get something to work, and I am working on the rest.

First of all i had to change to paps power output to maximum, else it wouldn’t ring the bells. I am still in the process of fiddling with settings for impedance and/or input gain. The problem is that the microphone volume is very low, and if I just turn the input gain up it turns up for the noise as well. It isn’t a problem for me as i have a crisp and clear sound, but apparently it’s a pain to whomever I am talking to. So something has to be done.

Then there is the dialing. A rotary phone dials by using pulse dialing, which in essence means that it disconnects/hangs up, in short intervals as a method of counting the numbers. But any modern voip-adaptor (at least a cheap one) can only function using DTMF. That’s were sending different tones means different numbers. Which basically means that it is enough to send the correct sequence of tones into the microphone in order to dial a number.

I had seen some applets for dialling they did work with the modern telephone, but the rotary phone with its microphone troubles had to get something more. I had success using “DTMF-dial” (from the ubuntu repositories), because it was possible to tweak the duration of tones and pauses.

Next step, as holding the phone to the PC-speaker every time i need to make a phone call, is not an option, were to make a midlet, that’s a mobile applet. A java program for the mobile. Using the mobile as a dialer may seem awkward, but it already holds all my contacts and the voip is a great deal cheaper. I have a midlet at the moment that is at the proof of concept stage. It can dial and I am able to take a number from my address-book dial it using DTMF. It still needs a bit of polishing, but its mostly cosmetic, maybe a list of recent calls would be a nice feature to implement.

soon to come:

  • Nice pictures of the phone, and the electronics.
  • Some software for DTMF dialing on the mobile and a bit about devolping a simple mobile application in netbeans.

Sound Sequencing Mouse

I saw this cool sound sequencer ( arduino punk console ). I don’t much about sound and that kind of stuff, but i thought it was quite nifty. And I had just gotten a ps2-mouse to work with the arduino. And hmmm, I had to use it for something. So why not try to make a sound sequencer with it ?

So I started hacking away. Unfortunately I don’t have any nice video or sound clip, but then again its more like a noisemaker and its just a mess of wires. I’ll try to get something up soon.

But it does work, you have to take my word for it or download the sourcecode and wire up your arduino and try it out.

How does it work ?

There a two modes of operation “play mode” or “sequencing mode”, and it shift between modes by clicking the middelbutton (mousewheel button) and it starts out in sequence mode.

sequencing mode

  • moving the mouse changes the frequency of the sound. It’s very simple the more you move, the more it changes (just by (X + Y) *magic_number)
  • pressing the right mouse button reduces the duration of the sound
  • pressing the left mouse button increases the duration
  • turning the mousewheel selects a tone in the sequence, either an existing or adds a new one to the sequence.

play mode

  • it plays the sequence of tones you’ve recorded.
  • the mouse wheel changes the playback speed.

So it keeps track of both a duration and a frequency, it uses a queue and its possible to add sounds to both ends. I haven’t yet hit a maximum but since its in a int array my guess is that it should be able to hold a lot 100 or 1000 of tones. And it should be possible to do some bytepacking to reduce the memory requirements, but since you have to enter each sound manually and there are no persistent storage you really don’t need that to hold a lot of tones.

Sound Sequencing Mouse sourcecode

Arduino ps2 mouse

arduino mouse and anoying encoder
I have been tinkering a bit with the arduino the last couple of days. Mostly small experiments with some of the junk had around, after some frustrations with a circuit for a rotary encoder, i “gave up” and tried hooking up a ps2 mouse. There are a nice tutorial at the arduino playground. It seemed complicated to interface with a mouse this way. But it proved to be so much easier than trying to build a circuit. The software coding is so much easier than the electrical circuits.

It was a matter of connecting 4 wires and uploading the code to get it running. But then i found out that there wasn’t support for the mouse-wheel, so i googled the datasheet for the IC, and started hacking. I ended up getting the mousewheel to function and getting output for the buttons. Along the way I refactored some of code, in order to better understand what was happening.

I still haven’t figured out what I should use the mouse for, but it was a fun hack.

Here is the sourcecode, if you want to try something with it : ps2mouse for arduino

I tried to make nice comments so it should be very straightforward to work with. As mentioned a haven’t made most of the code, just some additions and refactoring.

The mouse and the annoying encoder i couldn’t build a circuit for. It can be attached to a motor where there are a slotted wheel.

(21 nov updated code)