Sunday, March 01, 2015

Psi-Plantae Hardware and Software Description

This project was completed in conjunction with Darren Curtis / Sacred Resonance, consisting of an exhibition and a concert under the banner Psi-Plantae

The reaction of plants can be measured via skin response sensors and circuits, much like a lie detector. In essence, these circuits measure minute changes in resistance by using a wheatstone bridge and an op amp.

The data from the plants is sent over an xbee network to a central co-ordinator. A Max patch then takes the data from each plant, averages the data stream and uses delta change amount to generate notes, and longer frame averaging to generate octave changes. This then drives five channels of synthesised audio in Live Suite. This audio is then sent to three amps, and each plant has its own speaker.

The circuit was based on a wheatstone op-amp design found here:
http://www.1010.co.uk/org/biologic.html. The output of the op-amp was fed into a Teensy.



The code for the Teensy is written in Arduino and is relatively simple, as the Xbees are setup in transparent mode. Xtung was used to set the co-ordinator and router X.



The pan ID and DH and DL are setup as expected - the Xbees are kept in transparent mode, with the co-ordinator in broadcast, and the routers / end points having the DH and DL set to the SH and SL of the co-ordinator. This creates a simple star-type network.





The Arduino code for the router simply reads the analog input, takes the modulo 32, adds a 3-bit ID value, and sends a byte to the co-ordinator. The hardware UART of the Teensy is used to commicate to the RX and TX pins of the Xbee.



The co-ordinator takes each byte that has been sent to it from the five routers / end points and then deconstructs the three bit ID and the five bit data value. Even though five bits only yields a data range of 0 - 31, there is enough there to use as a method for generating music data.



This data is then sent as a control change value to Max 7, where the data is then averaged over a variable number of points, and then delta values are measured. If the amount of change is larger than a user-set threshold, then a note event is generated. The octave is determined by an averaging of the average data - the more change over a given window, the higher the octave. The pitch value is determined by the absolute data value. 






The music data that is generated is then routed to Live for sound generation. Sounds were made using Omnisphere and Sampler.








0 comments: