Jump to content

Phatline

Members
  • Posts

    1,283
  • Joined

  • Last visited

  • Days Won

    71

Everything posted by Phatline

  1. Hei I have some SPI problems here... A AINSER slows down the SD-Card Access - so the programm is not usable anymore. I already optimized the Ainser-Side (see below), but that is not enough, I dont know if it is the prescaler Factor, that also changes SD-Card in a way (since booth are SPI...) I save a lot off informations on the SD-Card, so each percent off performance makes seconds off less waiting time. Is there something like a prescaler that can be set for the SD-Card?= How give the SD-Card more priority? I know how to give prioritys for RTOS Task that i created, but i dont know how to do that with SD-Card (on rootlevel) thx for any info! I have 2 AINSER8 moduels connected to a STM32F4(disconver), not multiplexed - i have 16 faders connected directly to them. as soon i scan the AINSER: static void TASK_AINSER_Scan(void *pvParameters){ // This task scans AINSER pins and checks for updates portTickType xLastExecutionTime; xLastExecutionTime = xTaskGetTickCount(); while( 1 ) { vTaskDelayUntil(&xLastExecutionTime, 10 / portTICK_RATE_MS); // 202 orginally 1ms // scan pins AINSER_Handler(APP_AINSER_NotifyChange); } } The Write or Read on the SD-Card goes up from 1seconds to 14seconds (in my case) so i copied the ainser.c to my project, and made some edits, the most significant emprovement was to change the prescaler from 64 to 8: // init SPI port for fast frequency access MIOS32_SPI_TransferModeInit(2, MIOS32_SPI_MODE_CLK0_PHASE0, MIOS32_SPI_PRESCALER_8); // Initialisierung des SPI-Ports i also tryd other values, but on some values the Ainser didnt react at all, or i got random values. When i remove this Prescaler LINE, the AINSER gives no output to my code, what makes me a bit wondering since in MIOS-FUNCTIONS there is statet: So my expirience - the Prescale may not have a effect on SPI2, but on SPI0 (where my SD-Card is connected). I also changed to get this Prescaler8 working, The driver from MIOS32_SPI_PIN_DRIVER_STRONG to MIOS32_SPI_PIN_DRIVER_WEAK (which is i know not recommented): // pins in push-poll mode (3.3V output voltage) MIOS32_SPI_IO_Init(2, MIOS32_SPI_PIN_DRIVER_WEAK); // 2: Ainser_SPI - J19 i then tryed to remove the Multiplexer Code, and fixed the modules to a count off 2, At the end i have 4 seconds Access Time to my SD Card which was without AINSerial 1second And without my modifications 14 seconds I already set the priority off Tasks like this: // TASK - PRIORITYS #define PRIORITY_TASK_SEQ ( tskIDLE_PRIORITY + 5 ) // higher priority than MIDI receive task! #define PRIORITY_SD ( tskIDLE_PRIORITY + 3 ) #define PRIORITY_LOPRIO ( tskIDLE_PRIORITY + 2 ) #define PRIORITY_LCD ( tskIDLE_PRIORITY + 0 ) // idle #define PRIORITY_PAD ( tskIDLE_PRIORITY + 0 ) // idle #define PRIORITY_TASK_AINSER_SCAN ( tskIDLE_PRIORITY + 0 ) // orginal this was 3 So the SD-Task (where i write things on the SD-Card with mutexes and stuff...) is already High priority > off course the SEQuencer is higher... the whole Ainser.c code then looked like this: #include <mios32.h> #include "ainser.h" #include <string.h> ///////////////////////////////////////////////////////////////////////////// // Local variables ///////////////////////////////////////////////////////////////////////////// static u8 ainser_enable_mask; static u8 ainser_muxed_mask; static u16 ain_pin_values[16]; //2 Modules 8 pins static u16 previous_ain_pin_value; const u8 pin_lookup[8] = {7,6,5,4,3,2,1,0}; ///////////////////////////////////////////////////////////////////////////// // Local Prototypes ///////////////////////////////////////////////////////////////////////////// static s32 AINSER_SetCs(u8 module, u8 value); ///////////////////////////////////////////////////////////////////////////// //! Initializes AINSER driver //! Should be called from Init() during startup ///////////////////////////////////////////////////////////////////////////// s32 AINSER_Init(u32 mode){ // pins in push-poll mode (3.3V output voltage) MIOS32_SPI_IO_Init(2, MIOS32_SPI_PIN_DRIVER_WEAK); // 2: Ainser_SPI - J19 // orginal this was MIOS32_SPI_PIN_DRIVER_STRONG MIOS32_SPI_PIN_DRIVER_WEAK // ensure that CS is deactivated AINSER_SetCs(0, 1); // CS für Module 0 AINSER_SetCs(1, 1); // CS für Module 1 // Dont use Muxes ainser_muxed_mask &= ~3; // Sets the enable mask for modules which should be scanned ainser_enable_mask |= 3; // clear all values memset(ain_pin_values, 0, sizeof(ain_pin_values)); previous_ain_pin_value = 0; return 0; } ///////////////////////////////////////////////////////////////////////////// //! This function should be periodically called to scan AIN pin changes. //! A scan of a single multiplexer selection takes ca. 50 uS on a LPC1769 with MIOS32_SPI_PRESCALER_8 ///////////////////////////////////////////////////////////////////////////// s32 AINSER_Handler(void (*_callback)(u32 module, u32 pin, u32 value)) { static u8 first_scan_done = 0; // Variable zur Verfolgung des ersten Scans // init SPI port for fast frequency access MIOS32_SPI_TransferModeInit(2, MIOS32_SPI_MODE_CLK0_PHASE0, MIOS32_SPI_PRESCALER_8); // Initialisierung des SPI-Ports // loop over connected modules int module; int chn; for (module=0; module<2; ++module){ // Schleife über die angeschlossenen Module for (chn = 0; chn < 8; ++chn) { // Schleife über die Kanäle AINSER_SetCs(module, 0); // Setzen des Chip-Select-Pins auf LOW MIOS32_SPI_TransferByte(2, 0x06 | (chn >> 2)); u8 b1 = MIOS32_SPI_TransferByte(2, chn << 6); // Übertragung der Datenbytes über SPI u8 b2 = MIOS32_SPI_TransferByte(2, 0); AINSER_SetCs(module, 1); // Setzen des Chip-Select-Pins auf HIGH u8 pin = pin_lookup[chn]; // Berechnung des Pin-Index u16 value = (b2 | (b1 << 8)) & 0xFFF; // Kombination der Datenbytes zu einem Wert previous_ain_pin_value = ain_pin_values[module * 8 + pin]; // Speichern des vorherigen Pin-Werts int diff = value - previous_ain_pin_value; // Berechnung der Differenz zum vorherigen Wert int abs_diff = (diff > 0) ? diff : -diff; // Berechnung des absoluten Werts der Differenz // Überprüfung, ob der Pin-Wert sich ausreichend geändert hat if (!first_scan_done || abs_diff > 31) { ain_pin_values[module * 8 + pin] = value; // Speichern des neuen Pin-Werts if (first_scan_done && _callback && pin < 8) _callback(module, pin, value); // Aufruf der Callback-Funktion } } } if (first_scan_done == 0) first_scan_done = 1; // Setzen der Flag, dass der erste Scan abgeschlossen ist return 0; } ///////////////////////////////////////////////////////////////////////////// // Internal function to set CS line depending on module ///////////////////////////////////////////////////////////////////////////// static s32 AINSER_SetCs(u8 module, u8 value){ switch( module ){ case 0: return MIOS32_SPI_RC_PinSet(2, 0, value); // spi, rc_pin, pin_value // 2: SPI - J19 case 1: return MIOS32_SPI_RC_PinSet(2, 1, value); // spi, rc_pin, pin_value // 2: SPI - J19 } return -1; } i use to write to SD-card directly with File.c, like this: // Speicherung der Daten auf der SD-Karte MUTEX_SDCARD_TAKE; FILE_WriteOpen ("0.p4", 8); FILE_WriteBuffer(buffer2, sizeof(buffer2)); FILE_WriteClose(); MUTEX_SDCARD_GIVE;
  2. @ Faderboard 1 & 2 Mounting holes labeling not necessery again. rest is ok. you may could label + and - beside the 2x5 shroudet Pinheaders, so there is no chance someone reverse it in a way... in generell... normally the Nose- says all, but someone could crimp the cable incorrect... so if he controll measure, this is a good hint then for him.
  3. @ pusbutton: the LEDs in the shematic are REVERSED for example look into: http://ucapps.de/mbhp/mbhp_doutx4_32leds.pdf but in the board itself the Silkscreen for the Diode is painted correct - so if somebody just solder the PCB without looking into the Shematic - all is good, when someone look into the shematic he may be confused a bit. what type off Switch are using here > type it on the silkscreen - like you did on the Potentiometerboard. because: i see in the footprint its a le mec > then there are different types, with different Switch contacts - like you see here: 5GTH9 + 5ETH9 will work, while 5GTH9 with inbuilt LED will not work off course... i for me find the correct switch matching to your PCBs Footprint-Pinout - a bit hard... so label the type.... the rest off the PCB looks ok.
  4. @ potentiometer: looking good, but labeling the Holes is not necessery (i think) :
  5. which do you think are completely finished? at Inverting - something like this: www.siglgut.at/temp/encoder-phatty.zip @ ULN2803... normally used to drive Ledrings - because off Currentlimitations off HC595ers... didnt see them on DINs normally?! @ lack off space > use 4 Layer PCBs.... dont use Thruholeparts like your 10K Resistor network - since it will steal space on all layers - better use SMD single resistors there (when you think in Multilayer), when handsolder then you can place them on top or back where you want... if pick and place then off course only on one side... Those 2x5 Pinheaders are also aviable as SMD Parts (and also on JLCPCB as Pick and Place Parts) ... Those Pinheaders in Action on a 4 Layerboard: http://wiki.midibox.org/lib/exe/fetch.php?w=600&tok=5fb4d9&media=phatline:display-driver-smd-3d-front.jpg thinking in this terms - there is plenty off space, and you could arrange then with this new space the Shiftregisters and its Datalines in a parallel manner (at least it will be easier)
  6. maybe by removing the pull-Hi resistor off the HC165 Circuit, and using a Inverter on its inputs for example: https://www.mouser.at/ProductDetail/Nexperia/74HCT1G14GW-Q100H?qs=SKY61BOKKY4Uv%2FaFLc8SsQ%3D%3D https://www.mouser.at/datasheet/2/916/74HC_HCT1G14_Q100-2937184.pdf (just a example maybe there are better parts for this porpuse, and i dont know how hard to solder this one is) that would reverse Lo and Hi, and you could use this bloddy 3 LEDs ( where i think thats not a good idea, the Encoder is expensive - and not really a standard part...) but for that quick idea i would prototype that first (order a inverter, order a Encoder, make wires without pcb) ... specially iff any pull hi or pull low resistors are needet elsewhere, i guess you need a 10K pull-low resistor (to ground) on pin 3 off your Encoder then: HC165 > Inverter > Pull-Low + Pin3 since i have not much time these times, and you have plenty off modules what module i should check next? i just had a look on your 4x2 Enc RGB SW Led ring Rgb render here... and i am not 100% sure that the inbuilt RGB LEDs that enlighten the Encodersshaft dont shine on the LED-Ring and make them hard too read (maybe need some lightshielding)... by the way hard too read, those Alps Knobs are a bit big for that small Ledring - can you still see the LEDs when looking from a angle that is not 100% from top?
  7. by RM you meen a Ringmodulator-coil? if you can provide some specifications, i can make special Program for Ringmodulator Coils (these have a center tip on the secondary? and no center tip on the Primary? what comes in my mind: what kind off Iron-Core?, many off windings, 1:1 or is this a 1:2 because off center-tip?, wire-diameter, a Center-Break in the Program? maybe this could be managed too moove the Feeder with max speed to get something like this: START winding |.......|.......|.......|.......|.......|.......|.......| First Layer: >||||||||||||||||||||||||||||||||||||||||||||||||||||||| Next Layer:<||||||||||||||||||||||||||||||||||||||||||||||||||||||| Next Layer:>||||||||||||||||||||||||||||||||||||||||||||||||||||||| Last Layer:<||||||||||||||||||||||||||||||||||||||||||||||||||||||| CENTER winding< |.......|.......|.......|.......|.......|.......|.......| Next Layer:>||||||||||||||||||||||||||||||||||||||||||||||||||||||| Next Layer:<||||||||||||||||||||||||||||||||||||||||||||||||||||||| Next Layer:>||||||||||||||||||||||||||||||||||||||||||||||||||||||| Last Layer:<||||||||||||||||||||||||||||||||||||||||||||||||||||||| END winding< |.......|.......|.......|.......|.......|.......|.......| at the end it will look like this: |.......|.......|.......|.......|.......|.......|.......| ||||||||||||||||||||||||||||||||||||||||||||||||||||||| then Paint the Coil and dry it out - except off the " |.......|.......|.......|.......|.......|.......|.......| " Part which can be unwindet by hand, so you have then there 3 Wires to solder to the PCB... without breaking the Program - and fiddle arround at all... (aka no tension problems...) @benuron > the V-groove Rolls-Array make enough tension > at least for Tesla, or low-ampere Audio-Coil-Stuff (aka small Diameter CopperWire). But i have some thougts about the Point were it Toggle the direction this is may be a critical point indeed...
  8. its not in the code yet, since tesla coil needs only one layer. but to add a new mode is not difficult... just toggle the direction pin when a ammount off turns are arrived - i can add this... tell me when and if you begin to.build a winder - or do i missunderstand and you just need some coils to be windet?
  9. Hei Code, BOM, Shemata, and some Pictures are documented here http://wiki.midibox.org/doku.php?id=coilwinder The rest is documentadet with this Video in ENGLISH: or GERMAN: - mike.
  10. no clue... since my knowledge is need to know (me also having a hard time to absorb mios...coming more from a musical background then from programming...learnd c while exploring mios...) but maybe it is a midi mutex thing? combined with a buffer?
  11. i dont have a generic midicontroller code for the blm... i run my project "triggermatrix" on it which is in first case a note processor, in 2nd a sequencer, in 3rd a midigroovebox(without audio). for the blm part i used the blm-scalarcode and stripped it down, and mooved it into the main.c. when the blm-pcb gets into its final revision (aka oneside is pick and place - and a bulk order is on its way) i can provide a skeleton project... i am a bit busy... so thiswill take a while
  12. an arp needs the seq.c .. at least i would use it. in the seq.c i would build a simple counter 1 2 3... 1 2 3.... which only starts when aFLAG is high (aka note was pressed) ... where the max is (3) is set by a global variable which itself is set in the main.cin your UI depending on your arp steps (up dow up...upup up down)....the counters output in seq.c i would send into your arp task to trigger events.... if donewith arp stuff/or released the keypress then i would set the FLAG low, so the seq is stopped putting out triggers. i dont want to release the triggermatrix code since noone but me can understand - and the only usecase then left is thata company pirates it
  13. hei i stripped down the BLM-Project (so it cant be cloned with out weeks off routing U B ;) ) BLM-how-to.zip and i wrote some explaination... basicly i made a Grid with a center-cross - so a single button-LED-Fottprint can be placed correct to the Rubber-Button-Grid... you may have to set a a new "zero position off the Kicad Grid" to this crosses when you place the Button-LED-Fottprint on them... this Grid also have the Holes for the PCB which are needet to hold the rubber in Position.. maybe you find a "Flip-Chip" Variant for your RGB-LED... it would be better... you should not place it on the TOP side off the PCB... because it will illuminate the Neightbar-Button-Rubbers... The Hole in the PCB where the LEDs shine thru, act as a Light-Shield... I too have to draw a RGB-LED board (for a other Task, to illuminate a Frontpanel...), since i dont have expierence with that RGB-LEDs... this will take a while... if you found a solution i would copy it from you.... At Kicad 7... didnt know there is a stable out... good to know... will update too (else i cant check your projects)
  14. yes i can share it... will take a while... do you want to use it in a button-led-matrix "scalar" way?
  15. the buttons have a scan matrix... - i dont know if i remember correct by debugging such devices > if a LED is dead then that scan off buttons is also bad... i sugess: check if all leds are lighting up correctly. By the way this tactil switches - dont last forever, they are the cheapest and badest parts ever (ok, i think so...) ... could be that they are end off live alreday. @ blank screen > do you mean it is blanked when connected to the Master-Core (the Core with ID0)? when this happend to me, it was bad solderpoints... on the Core-PCB This PCBs have some design errors - not in sense of routing - but in sense off Thermal-Distress, often and speciall on the Ground-Vias it sucks so much Heat away to the groundplane whille soldereing, so you you have a bad or no contact...., when resolder those Pins remove the ICs first > so they dont get an Heat-Death... then Solder very hot and long! (first on the pad then on the pin... use a good soldering iron) On the very oppiste on the LED: , they are very Heat sensitive... if you resolder a LED do it short and with less Heat.... and when you start to demage them its harcore to desolder and replace them without demage the PCB, this is also a weak point off these ReD-Pcbs often vias liften up or whole traces (bigger vias would be good so the desolder is easier) .... often its better to just order a new fronpanel pcb, order new encoders, switches and leds... specially if you have to desolder a lot off dead parts.... specially a lot off LEDs are very dimm already - and you want to replace them... then its take time to find out the correct color and Brightness for those replacements. @ 6581: isnt that a 12V Chip --- and the others are 9V >>> do they get the corret voltage? ... i already repaired 4 off them... and build some... I dont like to repair them... - mike.
  16. now the motorfaders are wired... next is to design RGB-LED-Boards, which should color the Fader-Frontplates - so they matches to the Ableton-Live-Tracks-Colors... this will take a while, meanwhile the Mixer comes in my studio....
  17. well, the prototype off the BLM is working... i havent tested the GAte-in-OUT-PCBs ----but the Rest is working.... now its time to spend some money on Panel-Fabrication...
  18. if you have an oscilloscope, measure the audio-out before the Buffer-Transistors...
  19. at RGB-Leds > i dont know, how many you will use? which coremodule you will use? is it eurorackbased > and eurorack powerd? Which RGB-LED you will use - and what is the Voltage it needs? and so on.... i looked into your files.... some notices: @BP: dont connect the mountingholes to ground, or any other potential, best would be to make a keep out-area (sperrfläche) arround it, like i did for example here: http://wiki.midibox.org/lib/exe/fetch.php?w=600&tok=f96292&media=phatline:daw-btn-3d-b.jpg since you can plastic and/or metall standoffs to mount that pcb to the panel, you would need at least 6mm or more keepout-area.... background: you want to avoid groundloops over the frontpanel, and the risk of a electrical shock is less.... The LEDs in the diagram are connected false, the tip off the arrow should always be connected to the ground. (you should turn them 180°) which buttons do you want to use? please check the pinout off them... for me it happend that i did not connect the correct pins, so double check this.... why you made those cuts on the 4 corners? its better to make them rectangular - background: if you panelize the pcb, you have to draw a V-Grove line, the machine can only Grove in 90°, the idea, is to put 2 off this boards on one 100x100 PCB so you can save money on FAB.... way more oversight you have if you use a Groundsymbol... instead off paint Lines to a ground inside your shematic... look into "control" to see what i mean...also it makes it easyier to work with groundplanes, since this needs a NET... @Control: please open this file:Control.zip the same like above, and, you dont need that vias next to PIN 2 off the switches > Pin 2 is a via itself.... - same for Pin 1 off P2, the Problem it did not fill without your Vias: because you dont used a Ground-Net.... Pin1 - which is labeld as VDD (+) was connect to all your buttons and the pot (which is a Encoder)... normaly we connect them to ground..... VSS is ground.... so i exchanged the whole thing.... i dont know iff this is then still correct in your big picture- wiring diagram.... how ever thats the way i would make it - at least iff the Pin-Labels off the IDC Connectors are right... you should put the 4 mounting holes in the shematic, so you dont loose them when updating the PCB Also dont label your Encoder with Pot or RV >>> this is not a Potentiometer... that confused me until i realized this is a Encoder.... also the google-Drive files are a bit corrupt - the footprints where not assigned to the Shematic symbols...... when you save the project and upload it somewhere - zip it inside Kicad with "Projektdaten archivieren" - dont know the french word for it. -please overwork also your BP like/or simular like i did.... @Fader 1/2.... please open this file: Fad_2.zip shematic: also better use GND and VDD Nets.... more oversight! if you dont use a Pin off your IDC-Header (P5), then "x" them out with the blue "x" on the right side off your editor.... For what are those outer Mounting holes? they are too near to the Faders...make the pcb bigger so there is space for a Spacer/standoff, or use only the 4 inner mounting holes... which i think is enough.... again better 90° corners.... fill out your Shematics "Circuit-Field" right down - dont know the englisch or french word for "Plankopf" ... by the way you can design your own "Plankopf", so you dont see there thing like "KiCAD E.D.,A kicad 6.0.10......" keep out for mounting holes again... (see PB) dont make outher planes on VDD(+) ... mostly there can happen problems when mounting the thing to a panels, better use Ground-Planes... When looking on your FAders Footprint, and on the DAtasheet for the RA6020F then i am not sure iff the pinout is correct (the datasheet is bullshit...) but i guess you imported the Symbol and Footprint from mouser or something....then i guess its oky.... also use the design-rule check function (in a shematic and PCB-Editor) i did not looked in the other kicad-projects... but i guess its the same - a bit overwork needet..
  20. you can dimm them ofcourse..... that depends on the core module... but standard lpc and stm32 core-modules have a dim poti on the pcb.
  21. looking good... have not tested all buttons (since i am waiting for Silicon-Pads, and 1N4148) - but i guess everthing is ok...
  22. after reading the stm32f407 features i found: True random number generator how do i use this feature in mios? thx 4 input
  23. thx
  24. hei i have those: SAON11M9-LIN10K I dont understand this touch feature... When my finger is the Ground/Touch, then there is still a plastic between the Fader and my finger, how does this work? (i have read till page 11 off this tread, but didnt found anyone questioned this...) do i need this (not in stock) chrome Fader-Lever? https://www.reichelt.de/at/de/faderknopf-gerippt-t-lever-chrome-knopf-18-5x1-5vc-p73957.html?&trstct=pol_14&nbc=1
×
×
  • Create New...