Jump to content

FantomXR

Members
  • Posts

    1,035
  • Joined

  • Last visited

  • Days Won

    22

Posts posted by FantomXR

  1. Hey people,

    I was looking for cheap buttons that have an integrated RGB-LED. I was searching the internet but couldn't find anything affordable. So I looked for alternatives. I found Sparklefuns Button-Pads. They look great, but for me they are too big (15x15mm). So Adafruit has similar soft-buttons called "Trellis". They are smaller (10x10mm). 

    I downloaded their eagle-library and adapted it to my needs. The layout was made for 3mm single-color LEDs. You can find videos of it. They look already great. But wouldn't it be even more fun if we could add RGB LED? So I did.

    I  added WS2812 LEDs underneath each button in 3535 footprint. I needed to change the pad-layout a bit to make them fit. 

    To make it short: I made a layout, that has a HC165 on Board. The PCB is made for 4x4 Adafruit Elastomer but you could split it to get two single Boards with 4x2 each. You'd just have to set the correct solder-jumpers to make it work.

    Here is a picture of the layout:

    Trellis.thumb.png.6d310cbae007348b21e3c8

    So if you want to use the upper 8 and the lower eight you have to bridge J1A and J2A and leave J1B and J2B open. If you want to break it and connect another of those boards to the right, you have to bridge J1B and J2B and leave the other two open.  I just noticed it misses one jumper. If you want to add a board to the right, you now need to manually solder a wire from the input of J1B at the top to the output of J1B at the bottom. This needs to be changed in the next revision.

    It was necessary to use SMD parts for the whole design to make it fit. The connection of the boards is made through edge-SMD-pads like in the original design. To make it more stable there are not only connectors for the digital signals on the bottom, but also some bigger pads on the top. This should give it enough strength. 

    I also made a adapter board, to connect to my core.

    Trellis-Adapter.png.0b18ba174eb20c60099a

    Of course I could design another adapter board to fit the midibox connector-pinout.

    So I've just ordered that. I hope to received it in two weeks or so.

    SMT placement of the LEDs is done by the factory. The SMD parts on the back have to be placed by oneself. It's not a big deal since I used 0805 parts which can be perfectly soldered by hand. Also the HC165 is SOIC-16, which is also not that hard to solder with a good soldering iron.

    In case everything is working well I'd set up a bulk order if you are interested in those boards. 

    So, if you are in, just let me know. I'll keep you posted.

    Stay healthy!

    Best,
    Chris

     

    • Like 1
  2. I think I'll try to add capacitors to pins A and B since this is the fastest fix I could do. 

    In the long run I'll change the layout, adding caps to ground and two 10k resistors as in the datasheet + 74HC14 to create nice and sharp results. 

  3. 33 minutes ago, Hawkeye said:

    Take a look in mios32/common/mios32_enc.c - the "state machine" code is in MIOS32_ENC_UpdateStates(), there you should find the logic.
    You could also try to swap around pins 2 and 3 of the encoder, had to do this a while back for smaller 12mm ALPS encoders to work properly, otherwise would observe random jumps, back then the wiring was incorrect, as i installed 12mm Alps STEC encoders in 16mm encoder slots :).

    Have a good weekend!
    Peter

    Well that is due to a different pinout if STEC12 and 16. On 12 the C terminal is in the middle while it's on the outside on 16 iirc. 

    I'll check again and report back. 

  4. I just see that MIOS Studio gives me an error message:

    [1416035.046] [MBNG_FILE_C:303] ERROR: invalid pins for ENC n=9 ... pins=5
    [1416035.046] [MBNG_FILE_C:303]        (expecting 0:1, 1:0, 2:3, 3:2, 4:5, 5:4, 6:7 or 7:6)

    I thought that this isn't relevant. So it seems I need to change the wiring :-(

    btw.: @TK. I can not find the code for the different detented-types in the firmware. In which file are they defined? 

    I ask because it seems that my encoders don't work properly. I use PEC11L from Bourns:
    https://www.bourns.com/PDFs/pec11l.pdf

    I use them in relative mode. CW 1, CCW 127. When turning fast CW I also get 127 from now to then. So it seems to bounce... 

  5. Hey people,

    I have a strange problem. I have a PCB with 9 encoders. This PCB is connected to another PCB with 27 switches. In total there are 8 SR. 4 on the button-PCB and 4 on the encoder PCB. Everything works fine except the very last encoder. The encoder is connected to pin4 and pin5 of the HC165. MIOS Studio shows fine that it toggles input 62 and 63 and depending on the direction the encoder is moved, either 62 or 63 will get triggered first. So this seems to be correct. In the NGC I wrote

    ENC n=9 sr=8 pins=6:5 type=detented1

    But for some reason NG doesn't take those events as encoder events. This is the output of the terminal:

    [1406781.497] MBNG_DIN_NotifyToggle(62, 1)
    [1406781.497] No event assigned to BUTTON hw_id=62
    [1406781.503] MBNG_DIN_NotifyToggle(63, 1)
    [1406781.503] No event assigned to BUTTON hw_id=63
    [1406781.654] MBNG_DIN_NotifyToggle(62, 0)
    [1406781.654] No event assigned to BUTTON hw_id=62
    [1406781.662] MBNG_DIN_NotifyToggle(63, 0)
    [1406781.662] No event assigned to BUTTON hw_id=63

    But it should like this (just with another id though):

    [1406866.814] MBNG_ENC_NotifyChange(7, 1)
    [1406866.814] No event assigned to ENC hw_id=7
    [1406867.121] MBNG_ENC_NotifyChange(7, 1)
    [1406867.121] No event assigned to ENC hw_id=7
    [1406867.446] MBNG_ENC_NotifyChange(7, 1)
    [1406867.446] No event assigned to ENC hw_id=7
    [1406867.747] MBNG_ENC_NotifyChange(7, 1)
    [1406867.747] No event assigned to ENC hw_id=7

    Any ideas? I use the stock NG-firmware for this test. I've also tested to set pins=6:5 to all another combination like 4:5, 6:7, etc. But none of them works.

    Thank you very much!

    Best,
    Chris

  6. On 10.2.2020 at 5:02 PM, macsaif said:

    Is there any way to integrate the 8xLED ring+Encoder card to some DAW (In my case Gig Performer)? I want to connect the Midibox NG to the computer by USB and I need a complete interation in DAW, it means If I change the values in the computer, the Midibox NG will receive the values, and the LED rings will show the actual value in DAW. Also I want to make some buttons with the same functionality.

    Any idea!

     

    Frank

    Totally possible. I do the same with Cantabile. 

  7. Thanks for the reply. I think I've tested this already but for some reason it was not working. But I'll give this a new try early next week and report back!

    Edit: I remember. The reason why it wasn't working was I don't receive "values" from the DAW but ASCII / text strings instead. And it seems such strings can't be stored...

  8. Hey people,

    my DAW sends a bunch of sysex strings at once to my midibox. The content of the sysex strings I'd like to display on my OLEDs. 

    In my DAW there is a mixer. The DAW sends the values of the faders via sysex. I have one OLED that should show those value. So if I select channel 1 on my midibox it shows the first value, channel 2 the second. This is not working at the moment because the DAW sends those values of all channels at once and if I switch on my midibox from one channel to another I need to again dump the sysex strings to the midibox to receive the correct value. 

    So I'd need to somehow save those received values inside the midibox and recall them. 

    Any idea?

    Thanks,

    Chris

     

  9. Hey people,

    I had a strange behavior last night. My MIDIbox was in the car over night. It was cold, maybe -2°C. The next day I connected it to my computer and realized, that the EEPROM was reset and all settings were gone (it was a MIDIbox running MB_KB). 

    Is there a chance to prevent it from doing that? I had another MIDIbox in the car which runs MB_NG. This was booting fine, but it uses an SD-card instead of the internal EEPROM....

    Thanks,
    Chris

  10. Alright... I've got a solution that works great for me. I thought I share it with you.

    I now tried WS2811 driver ICs. They are cheap and only need one data-line which goes from one IC to the next. Each IC can drive three LEDs. Of course you are not really capable to control them individually with standard NG code. So I've added a meta command.

    Add this to mbng_event.c (row 2968 and following):
     

      case MBNG_EVENT_META_TYPE_RGB_LED_SET_SINGLE:      return "RgbLedSetSingle";

    row 3055 and following:

      if( strcasecmp(meta_type, "RgbLedSetSingle") == 0 )       return MBNG_EVENT_META_TYPE_RGB_LED_SET_SINGLE;

    row 3142 and following:

      case MBNG_EVENT_META_TYPE_RGB_LED_SET_SINGLE:     return 3;

    row 3376 and following:

    
        case MBNG_EVENT_META_TYPE_RGB_LED_SET_SINGLE: {
          u16 led;
          if( (led=meta_values[0]) ) {
    	led -= 1;
    	WS2812_LED_SetRGB(led, meta_values[1], meta_values[2]);
          }
        } break;

     

    in mbng_event.h add this line 163 and following:

      MBNG_EVENT_META_TYPE_RGB_LED_SET_SINGLE,

     

    Done! Now you can call the meta RGBLEDSETSINGLE from NG. Here is a quick example. I had no buttons connected to that midibox. So I've worked with receivers and senders:

    EVENT_RECEIVER id=1 type=cc cc=2 if_equal=127 fwd_id=SENDER:1
    EVENT_RECEIVER id=1 type=cc cc=2 if_equal=0   fwd_id=SENDER:2
    
    EVENT_SENDER id=1 type=meta meta=rgbledsetsingle:1:1:255
    EVENT_SENDER id=2 type=meta meta=rgbledsetsingle:1:1:0

    This switches on the second LED of the first IC on if CC2 with a value of 127 is received. It switches off when 0 is received. 

    So you can control each LED individually without overwriting the other :-)
     

×
×
  • Create New...