IpsonLab User manual (version 1.5; Date: 17 juli 2006)


Building the IpSonLab


Connecting the IpSonlab for the first time


Extra modifications:  check this out!


Testing the IpSonLab


Relayboard  connection and example


Connecting 2 relay boards (64 out)


Max/Msp IpSonLab Patch Explained


Connecting the greycode switches


IpsonLab pin-out


IpSonLab circuits


Building the IpSonLab

This short manual explains how to build the ipsonlab yourself. The “IpSonLab building pack” comes together with a Printed Circuit Board (PCB), manual and two RISC-processors(2x)PIC16F873. These processors are fully programmed and ready to go. The only thing you have to do is to assemble the PCB, and mount it into a cabinet of your choice. It is quite easy to build and complete the PCB. Just double-check everything you do before soldering the components onto the PCB.  If you are NOT sure, do NOT solder, but first check again. It's a nasty job to remove soldered components!

 ipson opbouw kast front 37p

Soldering the Printed Circuit Board
For finding the right location of the components, go to the download section and select the IpSonLab_pcb_layout.
 ipson 1


R1 100k
R2 27k
R3 27k
RA 22E/1W Don't place this resistor direct to the PCB; keep some space between the body and the PCB; it will be very hot!
RE Check

out the extra modifications

Jumper 0E extra

resistor 0E (jumper)


U1, U2 HEF4067 or MC14067
U3 74HCT14
U4, U5 PIC16F873 (place chip in a socket!)
U6 7805
U7 Xport
D1, D2 1N4001 or 1N4002


C1, C2, C3, C4 33pF
C5, CA1 10 uF (polarity!)
C6, C7, C13 3,3 uF (Polarity!)
C8, C9, C10, C11, C12 100nF


H1, H2, H3, H4 8 pins header 32 analog inputs
H8, H9, H12** 8 pins header extra processor in/out connections**
H13, H14, H15** 16  pins header extra processor in/out connections**
H5, H6, H10, H11** 4 pins header extra processor in/out connections**
H5, H6, H10, H11** 4 pins header extra processor in/out connections**
J7** 3 pins header extra gnd connection**
J2, j3   Power Ground (0) connection
J1   Power +12V Connection
J4, J5 3 pins header +5V (vcc) connection
SW1 2 pins header reset button connection
X1, X2 18,432 MHz Crystal  
H8, H9, H12    

** Optional. Not really necessary to solder the pins on that location. This layout and connections can be used with
future software update  an/or add-on's


Testing the Ipsonlab for the first time


If all components are placed and soldered on the right position, the powersupply can be connected. Be sure to have checked all the components not only in on the right location, but also in the right position (polarity!). Some checkpoints:
- Are all the IC's (integrated Circuits) placed wit the pin 1 on the right position?
- Did you place all capacitors with the plus on the right side?
- Are all diodes pointing the right direction?

Before connecting the power, I'll advise you to keep the processors (U4 and U5) out of the circuit, untill you
checked the powersupply. Connect the power supply of +12V (J1) and 0 (ground) to J2. Look out for the resistor RA. This resistor will get very hot!
ipson power detail

Measure the voltage on the location of J4 and J5. 
This should be +5V exactly. If a higher voltage is measured, turn off the power immediately!

Check the little LED's on the Xport. When no ethernet cable is connected, the red LEd should light up blinking every 10-15 seconds. When the ethernet cable is connected, both the led's (the led's do have two colours!) should light up green; one blinking, showing the traffic on the net, the other one continue, telling you the Xport is happy with the connection. Shut down the power for a while. Place both the porcessors U4 and U5 in their socket.
Attention for pin 1!

Turn the power back on.
If you do have an oscilloscope, you can check the signals on pin 3 - pin 7 of U4; you should see a rectangle wave shape with increasing frequency (pin 7 low f - pin 3 high f).Having checked all that, the hardware part of your IpSonLab is working.






Connecting the IpSonlab  for the first time


There are een few inportant things to configure. All communication between IpSonLab and computer is realised with a webserver, the Xport. This Xport, together with two dedicated processors, create the heart of the IpSonLab. When you need more detailed information about the Xport, you can go to the download section.

The onboard server can be configured with a normal web browser or with telnet (terminal software). What is there to be configured? The IpSonlab needs to know which IP-address the remote computer (=the IP-address of your computer) has and which port on that IP-address will be available. As soon as this has been configured, the IpSonlab can exchange data with the remote computer (is your computer).

At the Electronical Workshop of the Royal Conservatory, we already initialized the IpSonLab, so it has a default IP-address and a default local port. The ip-address of the IpSonLab is written on the PCB (Printed Circuit Board). The local port will be 10001.


There are two ways to connect the IpSonLab to your computer:
- Direct connection between the IpSonlab and your computer; this means you have to work with a cross ethernet cable.
- Through a switch or ethernet-hub with a normal ethernet-cable. Remark: If you send lots of data through your ethernet connection, it is preferred you make a direct connection between your computer and the IpSonLab. In that way nobody else on the network will notice the amount of bandwith you use.   Configure the IpSonLab with a webbrowser Start a web browser (Firefox, Netscape, Explorer, Safari) and fill in the ip-address of the IpSonLab (Xport). If the login window pops up, just hit enter. You can protect your xport by setting a password. Default the name and password are empty. The loading of the pages will take a short while, so be patient. It will load a Java applet. Select port properties and fill in your IP-address at ‘ Dedicated connection, and remote Ip-address and remote-port. When the changes are made, make sure you save the new settings, with ‘ update settings’.

Make sure the IpSonLab is connected and the power is on. Open the terminal on your computer (both Mac and PC) and type telnet at the prompt:
telnet <enter> Then open the connection with the IpSonLab (example ip-address
Open 9999 <enter>
The number 9999 is the port number. Within five seconds you have to hit enter again. At this time you are connected with the IpSonLab and you are able to configure all kind of settings. Be aware that the general settings are already made and the only thing that has to be changed is the remote IP-address and the remote port number (default on 10001). The next screen will show:



0 Server configuration
1 Channel 1 configuration
3 E-mail settings
5 Expert settings
6 Security
7 Factory defaults
8 Exit without save
9 Save and exit
Your choice?

Select an option on the menu by entering the number of the option in the Your
choice ? field and pressing Enter.
To enter a value for a parameter, type the value and press Enter, or to confirm a
current value, just press Enter.
When you are finished, save the new configurations (option 9). The unit reboots.

Message Value remark


115200 For HS version 115200 baud; for US version: 230400 baud
I/ F Mode (value)? 4C  

Flow (value)?


Port no (10001) ?

10001 Fill in a port number you like
Connect mode (c0) ? CC  
Datagram type? 01  
Remote Ip address? x.x.x.x Fill in the IP address of your computer (x.x.x.x)
Remote port (10001)?   Fill in the port number of your computer (ea 8000)**
Pack Cntrl (00)? 00  
SendChar1 (FF)? FF  
SendChar2 (FF)? FF  


** You can choose your own port number (number between 1000-10000). Be aware of the fact that some numbers are already in use (for example port number 80 for http, port number 23 for telnet)
When you are sure the values are right, press 9 to save the new settings and exit or press 8 if you are not sure you filled it in the right way. Your IpSonLab is ready to go!



Max/Msp IpSonLab Patch explained


Now your IpSonLab is connected to your computer and able to exchange data, you can start with Max/Msp (or any other software that can exchange Open Sound Control packages, ea SuperCollider). Within Max/Msp you can read the data from, and send data to the IpSonlab with the ‘udp-read’ and udp-write objects for PC and ‘otudp read’ and ‘otudp write’ objects for Macintosh. For further information about these objects I refer to this website: http://www.cnmat.berkeley.edu/OpenSoundControl/Max

Important: Within the ‘osc-route’ object at the receiving part, you have to fill in the /ipson route for sensor info or /sw for rotary switch info. All packages sent by the IpSonLab do have, so called, header information. You can download an example Max/Msp patch for both Macintosh and PC.

As explained in the software versions, the data communication between IpSonLab and Max/Msp, is quiet a lot of data. We are bussy to reduce and finetune these settings, so more speed can be achieved and the resolution will be high (10-12 bit). (see the dev.log page)

Max/Msp is receiving:
The first version of the IpSonLab (ipson1SHS) sends out lot's of OSC data per changes on the input. There's no data reduction of any kind. This means that within the osc-route object, the data can be read out directly (with the unpack-object)
The next version of the IpSonLab (ipson2SHS) sends out less OSC data; for 32 sensor inputs, it sends 8 times 32 bits integers. This means the data is 'compressed, or stuffed'' by the IpSonLab and that the 'de-compression, or unstuffing,  has to be done by Max/Msp

An example of the "unstuff" patch (written by Johan van Kreij):

In this case the unstuffing is actually bit-shifting (place the bits in the right position).

Max/Msp is sending:
When data is send from Max/Msp to the IpsonLab, for example to drive 64 relays, the same process takes place, only inverted. In case of the 64 outputs, only 2 time 32 bit integers are send; so in total 64 bits. Every bit is an output. example of the patch:
An example of the "stuff" patch (written by Johan van Kreij):
stuff2 In this patch 8 times 8 bit inputs (64 in total) are routed to two 32 bit integers and send out through opensoundcontrol and otudpwrite.

(back to the top)



Relay / Led - board Connections

In the figure below the layout of the IpSonLab output board. The board respresents one 32 bit OSC integer, send by Max/Msp. In the patch given in the download section, two integers are being send; this means 64 outputs in total can be driven. If 64 outputs were needed, two of these boards can be used in series.
 board klein knip   H11 connect the external power for the relays or led's.

H12 is an extra ground connection

H14 is the direct output of the processor port driving the logic on the board. When extra boards have to be connected,, these outputs can be used.

The two grey blocks represent the headers (pins) on which the board is connected to the IpSonLab. Not all pins are connected.



Relay connection example:
When connecting a relay to the relayboard, make sure to connect it according to the figure below:

relay coil explained

1. connect the external power also to the relayboard (H11); this is to connect the onboard safety 
diode parallel to the coil of the relay.
2. connect the gnd (ground, or zero) of the external power source to the gnd connection of the relay-board(H12).
3. The onboard relay drivers (the uln2803) can drive 500mA max
Make sure you do not exceed this value! 

H14 is used to connect an extra relayboard; the amount of outputs can be extended to 64.

Connecting 2 relayboards

Connecting 2 relayboards, creating 64 outputs.
If you want to make 64 relay outputs, you will have to connect two relay-boards. The outputs are realised with shiftregisters (74595) and darlington array's (2803). One pcb (print 1) receives the driver signals from the processor. The serial output of the first pcb (print 1) should be connected to the serial input of the second pcb (print 2). The other two driver signals (Storage clock and Shift clock) can be connected parallel (see figure below).


2x relais board



IpSonLab connector pin-out

If you build your own IpSonLab, the connections given below are not a MUST. You can connect the inputs to the Sub D connectors as you like. It is of course convenient if you connect it the same way, so you can exchange IpSonLab's if nessecary; the versions build on the Conservatory do have the pinout given below.
Note 1: Pin 1 of the 37p Sub D connector (Sensor input) is connected to sensor input number one. The first sensor input number is 0. This input is connected to pin 32.


Connections 37-pins connector
(Sensor input)
Connections 37-pins connector 
(Relay output)
Pin Sensor Number Pin Name Pin Name
1 1 1 A0, 0 21 A2, 4
2 2 2 A0, 1 22 A2, 5
3 3 3 A0, 2 23 A2, 6
.. .. 4 A0, 3 24 A2, 7
30 30 5 A0, 4 25 A3, 0
31 31 6 A0, 5 26 A3, 1
32 0 7 A0, 6 27 A3, 2
33 nc 8 A0, 7 28 A3, 3
34 Ext. adapter (+9V) 9 A1, 0 29 A3, 4
35 Ground 10 A1, 1 30 A3, 5
36 Ground 11 A1, 2 31 A3, 6
37 +5V / VCC 12 A1, 3 32 A3, 7
    13 A1, 4 33 EXT Vin
    14 A1, 5 34 nc
    15 A1, 6 35 GND
    16 A1, 7 36 GND
    17 A2, 0 37 +5V
    18 A2, 1    
    19 A2, 2    
    20 A2, 3    


Extra modifications:

Place extra resistor (jumper) 0E.

This jumper is connected between pin 18 of U4 and pin 18 of U5. Now incoming data from the Xport is also offered to U4;  U4 and U5 can now be configured with Max/Msp.
 ipson pcb top
RE: 10k
Place this resistor between pin 6 [U4] and the +5V bottom side pcb. Check out figure:
ipson pullup


IpSonLab Circuit

The cicuit of the IpSonLab is straight forward. The Xport sends and receives all UDP packages to and from the network, translating it to RS232 serial in en out. One processor handling all incoming traffic (U5) and the other processor handling all outgoing traffiic (U4).
U4 is connected to two miltiplex IC's (HEF4067) and is checking the inputs for voltage (read sensor) change. If no change is decteced, the processor will not exchange data to the Xport. U5 is checking the incoming traffic and translating this to whatever kind of output proces (this depends fully of the processor) is selected (pwm, servo, dc, relay, ...).

The Xport is running on 3,3V and needs around 200mA of current. The serial output of the Xport is converted to 5V (ttl) data with two 74HCT14 inverting Schmitt trigger ports.

ipson 3
Circuit IpSonLab

The powersupply of the IpSonLab consists of two regulators: the 7805 for making +5V DC and the LF33CV for making the 3.3V DC for the Xport. The DC input is protected with two diodes to avoid damage when the external adapter is connected the wrong way. The extra resistor RA is dissapating power for the LF33CV; otherwise this 3.3V regulator would be too hot to handle.

ipson 4
PowerSupply IpSonLab

Connecting two rotary switches to the IpSonLab

Two rotary switches can be connected to the processor (U4) like the figure below. In total two of these switches can be connected; one to pin 28 and pin 27 (like the figure below) and the second one, the same way, to the pins 26 and 25. 
A rotary switch generates 2 bit gray code; You can use this to count up/down within your software. The Ipsonlab sends numbers counting up/down and is sending a one, when going up and a zero, when counting down.
rotary switch greycode aansl