Two Xbee Series 2 units are placed in a simple point-to-point two node network.The following settings seem to work okay:
ID=2005
DH=[SH value from opposite XBee]
DL=[SL value from opposite XBee]
NH=0
AR=0
BD=6 [57600]
RO=0
Note: be sure to use a baud rate of 57600 with any serial interface!
Showing posts with label xbee. Show all posts
Showing posts with label xbee. Show all posts
Wednesday, February 10, 2016
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.
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.
Friday, January 18, 2013
Teensy + XBee: Simple Native USB Wireless MIDI Controller
Overview
I want to make wireless controllers.
To this end, I have a few conditions:
Here is a simple solution and proof of concept that fulfills these conditions. The idea is that a USB 'dongle' is connected to the computer. Let's call this the base receiver. A second device reads data from a pot. Let's call this the node transmitter.
Wireless communication is handled by a par of XBee modules. This project is designed to run using XBee modules straight out of the packet - i.e. no configuration is necessary.
As it has been stated, this project is more of a proof-of-concept to show how easy and simply it is to set up something like this. Keep in mind that (1) many sensors etc can be attached to the node transmitter (2) more than one node transmitter can be used and (3) speeds can be increased via configuring the XBee modules.
Hardware
2 x Teensy 2.0 boards
2 x Xbee 1mW chip antenna modules
2 x Xbee explorer regulated boards
2 x mini breadboards or similar
1 x 10kΩ B-type pot or similar
1 x mini usb cable
1 x 4AA battery holder
4 x AA batteries
Assorted breadboard jumper leads
Base Receiver Setup
Node Transmitter Setup
Usage
As presented here, potentiometer data will be sent using MIDI channel 1 and controller 1. This data should appear on the Teensy USB MIDI device, which can interface directly with Ableton Live etc.
I want to make wireless controllers.
To this end, I have a few conditions:
- I want the wireless link to be easy to deal with
- I want the wireless link to appear as a native MIDI USB device
- I want the wireless link to be sturdy
- I want the wireless link to be made up of off-the-shelf components that can be sourced in Australia
Here is a simple solution and proof of concept that fulfills these conditions. The idea is that a USB 'dongle' is connected to the computer. Let's call this the base receiver. A second device reads data from a pot. Let's call this the node transmitter.
Wireless communication is handled by a par of XBee modules. This project is designed to run using XBee modules straight out of the packet - i.e. no configuration is necessary.
As it has been stated, this project is more of a proof-of-concept to show how easy and simply it is to set up something like this. Keep in mind that (1) many sensors etc can be attached to the node transmitter (2) more than one node transmitter can be used and (3) speeds can be increased via configuring the XBee modules.
Hardware
2 x Teensy 2.0 boards
2 x Xbee 1mW chip antenna modules
2 x Xbee explorer regulated boards
2 x mini breadboards or similar
1 x 10kΩ B-type pot or similar
1 x mini usb cable
1 x 4AA battery holder
4 x AA batteries
Assorted breadboard jumper leads
Base Receiver Setup
- Place the Teensy 2.0 board on the breadboard
- Place an XBee module onto an Xbee explorer regulated board
- Connect 0V ground on the Teensy 2.0 board to 0V ground on the XBee explorer regulated board
- Connect 5V VCC on the Teensy 2.0 board to 5V VCC on the XBee explorer regulated board
- Connect digital pin 7 on the Teensy 2.0 board to the DOUT pin on the XBee explorer regulated board
- Upload the XBee Base code to the Teensy board using the Arduino IDE and the Teensyduino add on.
Node Transmitter Setup
- Place the Teensy 2.0 board on the breadboard
- Place the potentiometer on the breadboard
- Place an XBee module onto an Xbee explorer regulated board
- Connect 0V ground on the Teensy 2.0 board to 0V ground on the XBee explorer regulated board
- Connect 5V VCC on the Teensy 2.0 board to 5V VCC on the XBee explorer regulated board
- Connect digital pin 8 on the Teensy 2.0 board to the DIN pin on the XBee explorer regulated board
- Connect 0V ground on the Teensy 2.0 board to an outside leg of the potentiometer
- Connect 5V VCC on the Teensy 2.0 board to the other outside leg of the potentiometer
- Connect 0V ground on the Teensy 2.0 board to the black terminal of the battery connector
- Connect 5V VCC on the Teensy 2.0 board to the red terminal of the battery connector
- Connect analog input pin 0 on the Teensy 2.0 board to the middle leg of the potentiometer
- Upload the XBee Node code to the Teensy board using the Arduino IDE and the Teensyduino add on.
Usage
As presented here, potentiometer data will be sent using MIDI channel 1 and controller 1. This data should appear on the Teensy USB MIDI device, which can interface directly with Ableton Live etc.
Labels:
physical control,
physical digital,
teensy,
xbee
Subscribe to:
Posts (Atom)



















