Monday, June 14, 2021

My weekend 6/13/2021

 Formatting takes time and I'm more of a stream of consciousness kind of person.  So this is going to be messy just a bunch of words typed out.

This weekend marked 12 years of marriage for me.  I've never done any thing for 12 years straight except maybe school.  I once told a friend congratulations on their anniversary and we ended up talking about how we celebrate birthdays far more than anniversaries.

We as human beings, animals in some ways, are programmed for survival, the number of folks who fail at suicide is staggering and it stems from our core belief that we should continue to survive.  So a birthday is the celebration of your birth, the congratulations that you've survived another year, that we're happy you're here for another trip around the sun.

But wedding anniversaries, those celebrate work, collaboration, to continue to continue to want to be married to someone and put in the effort to maintain that relationship.  That's an achievement worth celebrating.  So for 12 years now my wife and I have continued to make the effort to respect and love each other. It's pretty darn cool.

After a weekend at a B&B with just the 2 of us, wherein we celebrated by just being near each other in silence among other things.  We went and retrieved our children from Auntie's. We are blessed to have family that is willing to take our goblins for more than a few hours at a time. 

Then we got home and life came crashing back in.  The things that need to do, the things we want to do, chores, bills, and unexpected events.

So given the noise in my head, and the constant barrage of things requiring my attention, I have learned to cope by making lists.  Things that need doing, things that would be nice to get done but aren't a real priority.

With a weekend worth of time to disconnect from the constant barrage of stimuli I remembered many things that needed doing that I had forgotten, that hadn't made it onto a list.

Upon return to our house we discovered that Cayson's computer solid state drive had died.  Unlike a spindle drive which can slowly die and make clicking noises so you know it's going, a SSD apparently just dies, no warning, no indication just poof computer no longer recognizes that the drive is connected.  All his Minecraft worlds are gone with no way to get them back.  

So we took out the trash, we did laundry, we tidied the garage, we moved the hot tub back into the backyard and filled it back up

Friday, February 5, 2021

VMIX Compatible record light

  • Disclaimer: I'm not an electric engineer, nor am I a technical writer I share my experiences in order to help others but while what I've done works I don't know if I've managed to miss a detail I don't know about.

Not only is this my first attempt at making a circuit board, it's also my first attempt at writing a how-to document.  I apologize if it is hard to follow, I am open to feedback on how to improve my presentation of information.

Goal: Create a light that turns on automatically when the record button is pressed in VMIX

Method: Using the Teensy 4.0 board to create a midi receiver a MOSFET power board handles providing power to an LED light.

The Parts:

The Tools:
  • Soldering Iron
  • Solder
  • Tape
The Supplies:
  • Some wires
  • power connectors   
  • Micro USB cable for the Teensy

The Theory:
The Teensy can act as a midi interface which allows one to capture the midi command from VMIX.  It works like an Arduino which means it can put a logic signal to its pins.  The MOSFET allows one to switch on a circuit at a higher voltage than the 3.3V the teensy provides. (In my case this was a 12V LED Light).  To make it all work together the power supply needs to be connected to the Input pins on the MOSFET board, the LED needs to be connected to the Output pins on the MOSFET board and the MOSFET board needs to be connected to the signal or gate pin on the Teensy.

Part 1: Assemble the parts
This was the part that was scariest for me because I am a novice at soldering at the board level.  Wires don't bother me, but through hole soldering was new to me.
I took my Printed Circuit Board (PCB) and clamped them in the set of helping hands my wife got me for Christmas. QuadHands I've seen videos of people using board vises or clamps and those seem better but I used what I had.
Step 1: was mounting the Teensy to the board.  I had bought the teensy that was factory mounted to some pins so this part was just a matter of taping the Teensy to the PCB and then touching my soldering iron to each pin, and waiting for the solder to flow into the hole.
Step 2: was mounting a 4 pin header that worked with the MOSFET board I had, again taped the header in place and applied heat and solder
Step 3: Attach the MOSFET board to the header, this didn't work with tape because the header ended up pushing the MOSFET board away from the PCB, I ended up using sticky tack to hold it in place  and again solder the MOSFET board to the header.
Step 4: Attach wires to convey electricity from the Teensy to the MOSFET
    This one was tricky because I needed the wires to stay in the holes while I applied solder, but I also needed the wires to be small enough to go into the holes. After many false starts I ended up bending the wire into place on the back of my PCB and taping it in place so that it stayed while I applied solder.  I picked pin 6 as my signal pin so I ran a wire from Pin 6 on the teensy to the gate pin on the MOSFET board, and another from the ground pin on the Teensy to the ground pin on the MOSFET board.
Optional: I tried to make my life easier by soldering a 2.1X5.5 Barrel jack to board(this is the type of connector on the sample power supply I linked).  Then I ran a wire from the board to the screw terminals on the MOSFET board.  This is not necessary but I thought it would be a nice touch.
Given full control of the components I would have a board made with the MOSFET board incorporated onto the main board without it being a shield connected via header.  And I'd have the Power jacks at each end for connecting power in and out.
Final: Attached a pigtail 2.1X5.5 Barrel Male connector to plug into the LED light.

Part 2: Set up the Teensy
This part gets hard.  Before I took on this project I played with Arduino and the Arduino IDE so I already had that installed on my computer.  I had to install some drivers on my windows 10 computer to get it to work properly.  Sadly that part was long ago so I don't have the step by step for that, but I'll provide some links that got me going.
Assuming I get notified I will be happy to offer what help I can in the comments but I mostly just used a search engine and forums to solve my problems until I could load my code onto my teensy board.


I used the "blink" sample sketch to test if all my connections were working.  and they were.  The only change I made was to change the pin from 13 to 6.

To Make it respond to VMIX I used the following code adapter from one of the samples provided by Teensy.

/* Receive Incoming USB MIDI by reading data.  This approach
   gives you access to incoming MIDI message data, but requires
   more work to use that data.  For the simpler function-based
   approach, see InputFunctionsBasic and InputFunctionsComplete.

   Use the Arduino Serial Monitor to view the messages
   as Teensy receives them by USB MIDI

   You must select MIDI from the "Tools > USB Type" menu

   This example code is in the public domain.
*/
int ledPin=6;

void setup() {
  Serial.begin(115200);
  pinMode(ledPin, OUTPUT);
  digitalWrite(ledPin, HIGH);
  delay(400);                 // Blink LED once at startup
  digitalWrite(ledPin, LOW);
}

void loop() {
  // usbMIDI.read() needs to be called rapidly from loop().  When
  // each MIDI messages arrives, it return true.  The message must
  // be fully processed before usbMIDI.read() is called again.
  if (usbMIDI.read()) {
    processMIDI();
  }
}

void processMIDI(void) {
  byte type, channel, data1, data2, cable;

  // fetch the MIDI message, defined by these 5 numbers (except SysEX)
  //
  type = usbMIDI.getType();       // which MIDI message, 128-255
  channel = usbMIDI.getChannel(); // which MIDI channel, 1-16
  data1 = usbMIDI.getData1();     // first data byte of message, 0-127
  data2 = usbMIDI.getData2();     // second data byte of message, 0-127
  cable = usbMIDI.getCable();     // which virtual cable with MIDIx8, 0-7

  // uncomment if using multiple virtual cables
  //Serial.print("cable ");
  //Serial.print(cable, DEC);
  //Serial.print(": ");

  // print info about the message
  //
  switch (type) {
    case usbMIDI.NoteOff: // 0x80
    if (data1==0x3C){
       digitalWrite(ledPin, LOW);  // turns off LED
    }
      break;

    case usbMIDI.NoteOn: // 0x90
    if (data1==0x3C){
    digitalWrite(ledPin, HIGH); // turns on LED
    }
      break;

    case usbMIDI.AfterTouchPoly: // 0xA0
      Serial.print("AfterTouch Change, ch=");
      Serial.print(channel, DEC);
      Serial.print(", note=");
      Serial.print(data1, DEC);
      Serial.print(", velocity=");
      Serial.println(data2, DEC);
      break;

    case usbMIDI.ControlChange: // 0xB0
      Serial.print("Control Change, ch=");
      Serial.print(channel, DEC);
      Serial.print(", control=");
      Serial.print(data1, DEC);
      Serial.print(", value=");
      Serial.println(data2, DEC);
      break;

    case usbMIDI.ProgramChange: // 0xC0
      Serial.print("Program Change, ch=");
      Serial.print(channel, DEC);
      Serial.print(", program=");
      Serial.println(data1, DEC);
      break;

    case usbMIDI.AfterTouchChannel: // 0xD0
      Serial.print("After Touch, ch=");
      Serial.print(channel, DEC);
      Serial.print(", pressure=");
      Serial.println(data1, DEC);
      break;

    case usbMIDI.PitchBend: // 0xE0
      Serial.print("Pitch Change, ch=");
      Serial.print(channel, DEC);
      Serial.print(", pitch=");
      Serial.println(data1 + data2 * 128, DEC);
      break;

    case usbMIDI.SystemExclusive: // 0xF0
      // Messages larger than usbMIDI's internal buffer are truncated.
      // To receive large messages, you *must* use the 3-input function
      // handler.  See InputFunctionsComplete for details.
      Serial.print("SysEx Message: ");
      printBytes(usbMIDI.getSysExArray(), data1 + data2 * 256);
      Serial.println();
      break;

    case usbMIDI.TimeCodeQuarterFrame: // 0xF1
      Serial.print("TimeCode, index=");
      Serial.print(data1 >> 4, DEC);
      Serial.print(", digit=");
      Serial.println(data1 & 15, DEC);
      break;

    case usbMIDI.SongPosition: // 0xF2
      Serial.print("Song Position, beat=");
      Serial.println(data1 + data2 * 128);
      break;

    case usbMIDI.SongSelect: // 0xF3
      Serial.print("Sond Select, song=");
      Serial.println(data1, DEC);
      break;

    case usbMIDI.TuneRequest: // 0xF6
      Serial.println("Tune Request");
      break;

    case usbMIDI.Clock: // 0xF8
      Serial.println("Clock");
      break;

    case usbMIDI.Start: // 0xFA
      Serial.println("Start");
      break;

    case usbMIDI.Continue: // 0xFB
      Serial.println("Continue");
      break;

    case usbMIDI.Stop: // 0xFC
      Serial.println("Stop");
      break;

    case usbMIDI.ActiveSensing: // 0xFE
      Serial.println("Actvice Sensing");
      break;

    case usbMIDI.SystemReset: // 0xFF
      Serial.println("System Reset");
      break;

    default:
      Serial.println("Opps, an unknown MIDI message type!");
  }
}


void printBytes(const byte *data, unsigned int size) {
  while (size > 0) {
    byte b = *data++;
    if (b < 16) Serial.print('0');
    Serial.print(b, HEX);
    if (size > 1) Serial.print(' ');
    size = size - 1;
  }
}
The Final Step is to set up VMIX to send a signal when record is hit.
This  uses the Activators section of VMIX.  
Open VMIX and click on the settings button for the application.
Then Click down onto Activators
Make sure Teensy is enabled by clicking on the Enable Devices button
 

Then on the activators page hit "Add"

On this screen a Note number needs to be provided that matches what was programmed into the Teensy.
Then under event set it to recording.


The trick that caught me offguard is that I needed to represent the pin in the code with hex, so while I typed 60 in the note field in VMIX I needed to type in 0x3C in the arduino code.
Connect the power supply to the proper screw terminals on the MOSFET and then connect the proper cables from your LED light to the out terminals and then when you hit record the light should come on.

Tuesday, May 29, 2018

ColorSwatches

Pen Color Web Approximations Pen ID Pen Swatch Web Swatch Closest Web Color Color Family
IceBlue by David's Bridal Pen11 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Maya Blue
Ice Blue by Marker Supply Pen11 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Baby Blue Blue
Ice Green byColourLovers Pen13 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Mint Green
Ice Green Pen13 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Jade Green
Light Emerald Pen16 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Mint Green
Heliotrope Pen17 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 French Rose Pink
Purple Pen19 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Burgundy Red
Prussian Blue Pen22 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Space Blue
Lemon Yellow Pen24 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Yellow Yellow
Light Flesh Tone Pen26 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Pumpkin Orange
Pink Pen29 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Flamingo Pink
Pale Vermilion Pen30 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Orange Orange
Pale Vermilion From Stabilo.com Pen30 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Apricot Orange
Light Blue Pen31 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Olympic Blue
Ultramarine Pen32 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Egyptian Blue
Ultramarine from stabilo.com Pen32 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Yale Blue
Light Green Pen33 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Lime Green
Light Green from Stabilo.com Pen33 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Kelly Green
Green from Stabilo.com Pen36 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Sea Green
Green Pen36 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Forest Green
Sanguine Pen38 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Chili Red
Sanguine from Stabilo.com Pen38 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 US Flag Red
Light Red Pen40 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Candy Apple Red
Dark Blue Pen41 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Sapphire Blue
Leaf Green Pen43 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Kelly Green
Yellow Pen44 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Tuscany Yellow
Yellow from Stabilo.com Pen44 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Tuscany Yellow
Brown Pen45 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Caramel Brown
Brown from Stabilo.com Pen45 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Cinnamon Brown
Black Pen46 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Charcoal Grey
Black from Stabilo.com Pen46 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Charcoal Grey
Carmine Pen48 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Red Red
Carmine from Stabilo.com Pen48 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Persian Red
Dark Red Pen50 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Fire Brick Red
Turquoise Blue Pen51 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Pine Green
Turquoise Blue from Stabilo.com Pen51 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Turkish Blue
Turquoise Green Pen53 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Forest Green
Orange Pen54 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Apricot Orange
Violet Pen55 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Grape Violet
Rose Pen56 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Magenta Pink
Azure Pen57 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Baby Blue Blue
Lilac Pen58 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Lollipop Violet
Earth Green Pen63 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Hunter Green
Umber Pen65 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Caramel Brown
Sienna Pen75 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Amber_2 Orange
Light Ochre Pen88 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Apricot Orange
Dark Ochre Pen89 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Cider Orange
Light Cold Gray Pen94 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Pewter Grey
Med Cold Gray Pen95 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Seal Grey
Dark Gray Pen96 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Iron Grey
Deep Cold Gray Pen97 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Shadow Grey
Payne's Gray Pen98 krink_k_32_water_based_paint_marker_44 krink_k_32_water_based_paint_marker_44 Anchor Grey