AC Sensorizer v0.4

Description

AC Sensorizer sensorizes up to 8 sensors and interpolates its AIN-readings.
The main target of this application are sensory devices delivering not exactly
0 - 5 V, like pressure-, distance-, resistor-based sensors or softPots.

These two videos show the ACSensorizer 0.2 which is using an outdated HUI, but nevertheless the concept of the Sensorizer is demonstrated quite well:

This software is released under a GNU License. You are not allowed to use this software or parts of it in closed-source projects! Please notice that due to the licenses for MBHP and MIOS you may only use the Hard- and Software for private purposes. Non-commercial use only!

It is possible to use the sensorizer with only one Core Module. For these purposes a MAC OS X program is included to simulate encoders and buttons. You can easily test the application with one core module!

The application can be recompiled with a variety of strictly separated #define-
options. For example setting SENSORIZER_INTERFACE_HUI to 0 compiles the application
without hardware input controls and therefore reduces the file- and application space.
Compiling without HUI, BANKSTICK, NRPN-Config and LCD generates code with approx. 3 or 4 pages; compiling with all options will result in an application file of 19 pages.

HUI-Controllable Parameters

The Sensorizer provides:

one 2×16 LCD

four Encoders

four Buttons

Front Side

Top

Left Encoder

current sensor selector (1..8)

Right Encoder

Menu Selection Wheel

Bottom

White Button

PANIC

Green Button

LOAD PATCH

Red Button

STORE PATCH

Left Encoder

Value setter for selected menu item / parameter 1

Right Encoder

Value setter for selected menu item / parameter 2

Black Button

PEDAL (2nd pedal connector at the rear)

Back Side

Left

8 6-pin Mini-DIN connectors

For up to 8 Sensors

Connector Type can be changed!

Middle

5-pin DIN connectors

Midi-In and Midi-Out

Middle Center

6.5mm Jack

External Foot-Pedal

A pedal is highly recommended!

Right Top

Switch

ON/OFF Switch

Right Bottom

DC Connector

+9V DC Power Supply

Connector Type can be changed!

Manual: Interface

The Interface is clearly structured; the encoders control the values on the screen next to them. A minimum set of additional buttons allow loading and saving of patches, sending PANIC! and an alternative pedal knob (it is recommended to add a second pedal on the backside. MIDI pedals (like Sustenuto or Pedal are of course also supported.

Manual: LCD-Menu

The following picture contains an overview of the onscreen LCD-menu structure. Click to view larger version:

MIDI Implementation Charts

See below which MIDI messages are recognized and sent by ACSensorizer:

Message Type

Received

Sent

Notes

NOTE ON

x

x

Harmonized

NOTE OFF

x

x

Harmonized

POLY AFTERTOUCH

-

-

CC

x

x

See CC Message Table

PROGRAM CHANGE

G

G

Global Channel only

CHANNEL AFTERTOUCH

-

-

PITCH WHEEL

-

-

Table A: MIDI Messages Implementation Chart

CC

Name

Received

Sent

Notes

0-127

see below

x

0

Bank Select

G

G

Global Channel only!

6

Data MSB

x

x

See NRPN Table D

38

Data LSB

x

x

See NRPN Table D

64

Pedal

x

x

Pedal

66

Sostenuto

x

x

Pedal

67

SoftPedal

x

x

Pedal

80

Harmony Base

x

x

Harmony (ACMidiProtocol)

81

Harmony Scale

x

x

0..20

82

Harmony Base Listen

x

x

<> 63

83

Harmony Scale Previous

x

x

> 63

84

Harmony Scale Next

x

x

> 63

85

Harmony Random

x

x

> 63

87

Quantize BPM

x

x

BPM = [0..127] + 60

98

NRPN LSB

x

x

See NRPN Table C

99

NRPN MSB

x

x

See NRPN Table C

Table B: Controller Change Implementation Chart

x YES– NOG Global Channel only

The channel numbers that are counted from 1 to 16 appear as 0 to 15 in code!

For more information on ACMidiProtocol supporting interchangeable notifications on BPM, Harmony and Scale changes, see ACMidiProtocol.h!

NRPN Controls

All Sensorizer parameters can be controlled and set by sending NRPN messages by MIDI:

Follow the instructions at http://www.ucapps.de/mbhp_bankstick.html. I'm using the Bankstick PCB supporting up to 8 Banksticks; maybe one Bankstick is sufficient for you (1 BS provides two banks with 127 patches each = 256 patches per Bankstick).

6. AIN “Breakout Board”

I use to solder extra 3-pin connectors on a seperate PCB. These pins allow quick grounding with a jumper or to switch the sensors easily to check for hardware errors. And it's a lot smarter to assemble the case without having to desolder all connections ;)

7. AIN Cables

I'm using 6-pin Mini-DIN connectors. In theory, a three-pin connection would be sufficient, but with a 6-pin cable, I can use 2 pins for an external voltage supply or additional DIN/DOUT lines.

8. Encoders and Buttons

9. DIN Connections

Connect the Encoders and Buttons as shown on the following table. The DIN module has to be connected to J9 of core module (see din_module for connection diagram with SmashTV Core modules.

(optional) Connect the Dout Pin #1 to a LED that sits in Sensor #1 (#2 to #2, #3 to #3 and so on…).

11. Upload MIOS

I'm running it with MIOS8 (PIC) 1.9e, but it should work with any newer 8-bit version. An update to the new app-structure is planned. See Downloads… and MIOS8 Upload for Newbies

12. Upload ACSensorizer

Upload “ACSensorizer.hex” /-OR-/ “ACSensorizer.syx” (depending on the method you are using… ⇒ see “Uploading an Application” at MIOS8 Upload for Newbies)

13. Sensor Calibration

Connect your sensors

Disable all sensors but the first one (Menu: ENA ⇒ OFF)

“from” should be “0” and “to” should be “127”

Try Autocalibration first:

Menu: AUT → MIN ⇒ Trigger the minimum value of the sensor, then press the pedal. Release the pedal once you have the right minimum value.

Menu: AUT → MAX ⇒ Trigger the maximum value of the sensor, then press the pedal. Release the pedal once you have the right maximum value.

Menu: AUT → OFF

Repeat these steps for the remaining sensors.

If the automatic calculations aren't satisfying, which may be the case if you're using sensors with a “jumpy” behavior like IR Distance sensors, you can set the sensing MIN/MAX values by hand. Do not mix up with the Scale from/to values these are just to interpolate the final signal:

Measure the electrical min/max values or take them from the datasheet ( Example: 0.2V min to 2.5V max )