Build your own MIDI circuits
Frequently Asked Questions.
MIDI & Music
MIDI and Music Information
Passive Infrared (PIR) to MIDI


Passive Infrared (PIR) to MIDI

This design uses a Passive Infrared  (PIR) sensor to detect the presence of somebody approaching the PIR sensor which will trigger a MIDI Note On command. This command is preset to Middle C (MIDI Note 60).


 The Passive Infrared (PIR) to MIDI unit can operate on any MIDI channel (1-16) depending on the 4-way DIP switch settings.


*Click to Enlarge*




PRICE:  €45.00




NOTE: This price does NOT   include the PIR sensor.



The Passive Infrared (PIR) to MIDI unit utilizes:

  • An assembled, built and tested Arduino board including a suitable pre-programmed Atmega168,
  • A 2.1mm power socket, and associated LED, 
  • A MIDI detection LED,
  • A 4-way DIP switch, which selects the MIDI channel at power-on, shown in table 1
  • A 150mm wired MIDI 5-pin DIN input socket,
  • A 150mm wired MIDI 5-pin DIN output socket, 
  • The complete circuit schematic is available,
  • The MIDI IN/OUT circuit schematic is also available.
  • The PIR to Arduino Wiring.



The Passive Infrared (PIR) to MIDI requires:

  • An external 12 volt DC power supply,
  • An external Passive Infrared (PIR) sensor.






     *Click to Enlarge*

The MIDI IN and OUT connectors use  5-Pin 180 degree DIN sockets. Note that the MIDI IN/OUT wiring is polarised and the correct pins should be used.





The unit detects  somebody approaching the PIR and can use the MIDI Note On command to trigger a MIDI Sampler which can produce a Greeting, Warning, Music etc. The relay contacts in the PIR are Normally Closed (NC) until a person triggers the PIR and then the contacts are Open Circuit. The 0 Volt (GND) connection is looped through the PIR relay contacts.


Power Supply:

The  Arduino/Freeduino etc. Diecimila must be powered via an external 12 volt DC power supply.


External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power jack. Leads from the Gnd, Vin  and A0 pin headers are connected to the PIR connector.


Most PIR units can operate on an external supply of 10 to 14 volts.  The recommended voltage is 12 volts.


The power source is selected by the PWR_SEL jumper.

Note that with the Arduino Duemilanove or Mega the power input selection (USB/EXT.) is automatically selected.



MIDI Channel Selection:


DIP Switch Selections



4 3 2 1
on on on on 1
on on on off 2
on  on  off on 3
on on off off 4
on off on on 5
on off on off 6
on off off on 7
on off off off 8
off on on on 9
off on on off 10
off on  off on 11
off on off off 12
off off on on 13
off off on off 14
off off off on 15
off off off off 16

Table 1 MIDI Channel