PIC Mapping for : for wiring details, refer to schematics on the website. ------------------------------------------------------- Version 1.0 - preliminary - 09.10.2006 version 2.0 - after wiring - 09.12.2006 version 3.0 - with sharp distance sensor 11.12.2006 version 3.1 - logic expressed more explicitly 13.12.2006 wiring bug in schematics solved. version 3.2 - controller 70 extended. version 3.3 - some coding ideas added. 19.12.2006 version 3.4 - bugs reported 10.01.2007 version 3.5 - 13.03.2007 - bug: front lite no longer working. Midi channel: 7 PIC0: On MidiHub board - X17.1: GND - X17.2: PIC pin 12 PWM analog output CW motor movement (0-10V) - X17.3: PIC pin 13 PWM analog output CWW motor movement (0-10V) - X17.4: +10V (generated on midi hub board) Note: Both outputs should be zero if no note ON was received. Only notes 24-57 should set the note-on bit. Wind pressure control mapped on midi ctrl 7 (volume) - X16.1: PIC pin 7 AN4 grey - input for reading fault condition from servo amp. Fa - X16.2: PIC pin 6 RA4 pink - motor inhibit. Should be enabled with midi ctrl 66 (logic output from PIC) - X16.3: PIC pin 5 AN3 purple/brown microswitch lower limit (input to PIC and motor servo) Sl Wanneer de PIC hier 0 leest kan de motor niet verder CWW draaien en is de microswitch gesloten. Wanneer de PIC hier 1 leest, is CWW draaien mogelijk. - X16.4: PIC pin 4 AN2 orange/green-yellow microswitch higher limit (input to PIC and motor servo) Sh Wanneer de PIC hier 0 leest kan de motor niet meer CW draaien en is de microswitch gesloten. Wanneer de PIC hier 1 leest, is CW draaien mogelijk. De besturingssoftware moet gebruik maken van een toggle funktie die telkens omslaat wanneer een van beide sensoren een 0 uitleest. bvb.: IF isfalse INP(X16.3) then CW = %True IF isfalse INP(X16.4) then cw = %False - X16.5: PIC pin 3 AN1 red - Sharp distance sensor input. Dl= low position, Dh = high position kallibratie kan in software als: if isfalse INP(X16.3) THEN Dl = ADCINP(X16.5) + veiligheidsmarge.low if isfalse INP(X16.4) THEN Dh = ADCINP(X16.5) - veiligheidsmarge.high De draairichting kan nu verder bepaald worden met: if ADCINP(X15.5) <= Dl then CW = %True IF ADCINP(X15.5) >= Dh then CW = %False - X16.6: PIC pin 2 AN0 white -Freescale pressure sensor (0-5V, 2.5V= zero pressure) analog input to PIC PIC software should read the value from the pressure transducer and adjust the value to the required value by appropriate action of the bellow motor. If D >= Dh OR Sh = %False THEN ' in dit geval moet de draairichting omgekeerd worden output X17.2, %False output X17.3, value = ctrl(7) * faktor ' suction wind call PID procedure to make Abs(P) = ctrl(7) * faktor elseif D <= Dl OR Sl = %False THEN output X17.2, value = ctrl(7) * faktor ' pressure wind output X17.3, %False call PID procedure to make P = ctrl(7) * faktor endif Opmerking: de faktor is niet dezelfde bij zuigen als bij blazen! lights: (Note ON/OFF) - X11.2: PIC pin 16 Midi note 10 Halogen 12V/5W front - white 35mm - X11.3: PIC pin 15 Midi note 11 base lite - 4x blue LED on 12V 5 mm - X12.2: PIC pin 21 Midi note 12 frontal LED spot Left - white 50mm - X12.3: PIC pin 22 Midi mote 13 frontal LED spot right - white 50mm - X15.2: PIC pin 14 Midi note 14 backlite LED spot left - red 50mm - X15.3: PIC pin 11 Midi note 15 backlite LED spot right - red 50mm Additional controllers: controller 20: force blowing wind if 1, in as far as possible according to switches and sensors force suction wind if 2, in as far as possible according to switches and sensors with any other value, motor direction should be automatic. controller 123: all notes off, motor off controller 70: move bellows slowly to a given position: 0 = bellow fully closed ( CW rotation till end of up sensor) 64 = center position 127 = bellows fully opened (CWW rotation till end of down sensor) NOTE: the PIC should track whether any note is playing or not. In case no notes are playing, the motor should always be switched OFF. ****************************************************************************** Note+ Velo PIC boards: PIC 1: 16 - 23: lights (note on/off only) 24 - 29: note + velo PIC 2: 30 - 43: note + velo PIC 3: 44 - 57: note + velo lights: midi notes 16-23, PIC 1 20,21,22,23: lampjes op keyboard paneel 16,17,18,19: voor latere expansie. optional: channel pressure in PWM of hold-signal. (4 bits is enough) on PIC's 1,2,3 [Midi command: &HD0 + 7, value] ----> decimaal + kanaal: 215, databyte Controller 69: channel pressure on or off (switch) midi out: bellow position, linearized 0-127 may be output as controller 70 or 12.