Skip to content

Week 13, Molding and Casting

Group assignment:

Review the safety data sheets for each of your molding and casting materials

Make and compare test casts with each of them

Compare printing vs milling molds Individual assignment:

Design a mold around the process you’ll be using, produce it with a smooth surface finish that does not show the production process, and use it to cast parts.

Group Assignment

For the group assignment we casted 3 differnt types of materials using a variety of mold types.

Link the group page here

Design a Mold and Make Parts

I designed a mold and made a silicone flare hood for my camera to custom color and shape vignettes to support my final project, Cromira.

Finished working prototype of Cromira with silicone snoot.

This required overmolding LEDs that were bonded to a rigid 3D printed part with semi-transparent silicone. This allowed for the creation of custom color and shape vignetted photographs.

Sample photograph using the device that I created this week with a custom purple vignette.

Mold Design

I used SolidWorks to create the CAD for the part that I wanted to make as well as the mold to make it. I started by creating the silicone part and the substrate. I started with the lens hood CAD that I had created in Week 2for CAD week. This file recreated the flare hood that I reversed engineered from my camera and had the features to lock it onto the 50mm lens.

Starting point for the mold file. I used the geometry of the pink part on the right that interfaces with the camera.

First Iteration

Then I went ahead and created a flare reducer geometry that I though would work. Initially, my plan was to use side emmitting Neopixels, and pot them in the silocne. We have some in the lab and if I was able to get them to work, then I could bond a flex PCB of them on the perimetter of the device and them shine towards the end of the silicone.

So I finished the first round of CAD and made a rigid 3D print of it to test on my camera. For this test I cut slits in the hood in the CAD so I could flex it if I needed to.

First iteration of the CAD.

3D print of the initial CAD

When I 3D printed it, I put it on the camera to test. I found that you could see some vignetting on the corners of the frame, but overall it seemed like a workable concept.

3D print of the initial CAD installed on camera for testing.

Side Emitting PCB Design and PCB selection

Then I took some time to design a flex PCB for the side emitting LEDs. I used the Adafruit side emitting Neopixels as the LED. Then I used KiCAD to create a string of 12 of them on a strip that would fit around the circumference of the hood. I printed it on paper to see how it would look and to make sure it would fit.

Paper print of the PCB I designed for the side emitting LEDs

Then I tried to cut them out of adhesive backed copper sheet with the vinyl cutter in the lab. Unfortunately, I was not able to get a good cut that I thought would be workable in time for the molding project. So, I had to abandon this line of work. However, I may revisit this for my final project.

The best partial cut of my PCB that I was able to get with my vinyl cutter.

I still needed some LEDs for the project. Then I remembered that I bought some 2020 sized Neopixels strips back in Februrary from Amazon. They are vertical emitting, but the width of the strip is only 5mm wide total. So I thought that I could make a small radial wall on the rigid part of my hood and still overmold it as one piece.

These are what I took forward into the design.

Silicone Test

It then occurred to me that I had no idea if I could get lighte effectively through silicone, and I needed a way to test it. Fortunately, I had some silicone molds that I had purchased from mold kit a while ago. One is to create a cup and is close to the right size of my lens hood. So I took an Adafruit Circuit Playground chip that already had code on it to display different colors on its onboard Neopixels. I put them under the silicone mold and was pleased to see that the silicone glowed nicely.

Lighting up a silicone mold with Neopixels from a Circuit Playground.

The color did start to wash out in the thicker areas, so I knew to keep my design as thin as possible.

Updated CAD

I went back and updated my CAD with my findings. I increased the diameter of the flare hood, added a backboard for the Neopixels to adhere to, and shaped the silocone hood to smoothly transition to the end. I also made small holes at the end of the rigid part and cut the inside, so that the wall of the rigid part would be completely overmolded by the silicone. Then I added some ears for my dev board PCB to attach to to drive the LEDs.

Updated CAD based on lessons learned from the LEDs

Mold CAD

With a good shape for the lens hood, I started on the CAD for the mold. I opted to do a 3-part rigid mold that would be 3D printed. I created a barrel aroud the silicone snoot that woudld allow the rigid part of the hood to rest in a channel and be located precisesly. Then I added a section inside the snoot to create the geometry of the inside of the snoot. Then I created a locking flange to hold the rigid snoot in the mold and to seal it.

Fully assembled CAD for the mold and the part.

Exploded view of the CAD. Red is the inner diameter if the mold, white is the OD, and green is the locking flange.

I decided I would inject the silicone from the top through the inner diameter part of the mold. So I created 4 injection points for the syringe that could also be used for vents and a raised surface around its perimmeter to capture any stray mold material.

The mold pieces would be held together with M3 screws in threaded inserts installed in the center section of the mold. Pins and holes were created in the mold parts to accurately locate the top and bottom flanges to the center section of the mold.

STEP file of the mold

Creating Mold

Reynolds

Before creating the mold, I took a trip to Reynolds Advanced Material in Charlotte. I needed to get some clear silocone and wanted some advice on my design. My initial plan was to make the mold and the rigid part of my device on a Form 4 printer with resin based printing. However, after talking to the rep there, he mentioned that some resin printers will inhibit curing of silicones and its best to use FDM prints that are finished with clear coat.

My visit to Reynolds before creating my mold

While there I picked up a kit of Smooth-On Sorta Clear 12. From reviewing samples at the store, it seemed to have good durometer and importantly, it was less viscous than the harder durometer resins in the same series, so could be molded without using a pressure pot. It also seemed like it would transmit light just fine.

Creating the mold

I 3D printed the mold using PLA on my Bambu A1 printer. I used 15% infill and support material on all of the parts.

3D prints of the 3 parts of the mold and the rigid part of the hood.

Then I started the sanding and finishing process. I sanded the inside of the outer mold section and the outside of the inner mold section. The circular areas on these parts would be exposed to the user so needed to be rid of the layer lines from the 3D print. I started with 80 grit to knock down the big layer lines and smooth out the polygonal path of the printer. Then I used 120 grit and finally 300 grit wet sanding before painting the surfaces with primer. This smoothed out the molds nicely.

Sanding the center section of the mold. Note the striations from the 3D printers slightly polygonal path to make the circular inner shape.

Sanding surface of the interior part of the mold just before spraying with primer.

Then I switched focus to the rigid part of the hood while the paint was drying. I cut a string of 42 Neopixels and bonded it to the outer ring. Then I soldered wires to them and drilled a hole through the ring to get them out of the mold.

Adding LEDs to the hood.

Soldering the wires.

I did a quick neopixel test using code from Week 10 to make sure it worked before shooting the silicone. The RGB order for the string is different than the high power LEDs I was using and the same as the onboard Neopixel, but they worked. Then I bonded them in place with some Super Glue. Then I filled the hole with hot glue to plug it from stray silicone.

Confirming the LEDs on the strip work before molding.

Then I added the M3 threaded inserts to the center section of the mold and did a test fit of all the parts. I put some Vaseline on the dowel pins after chasing them with a drill bit to ensure a smooth fit. Then I test fit all of the pieces a final time. This is when I realized that I needed an escape route for the LED wires. So I used a Dremel to router out a space for them to go during molding.

The bottom of the mold after installing the wires and the hood.

The full mold assembled and ready to be shot.

Casting

Once the mold was finished the casting was straight forward. The Sorta Clear has a 1:1 mix ratio by volume, so we did not need a scale to mix it. From the CAD file, I knew it was about 55ml of materal that was necessary to fill the mold.

I had my daughter help out and she measured and mixed the resin and carefully mixed it together to yeild about 60-70ml of material. Then we poured it into a 60ml syringe.

Mixing the Sorta Clear resin.

Then we slowy pushed on the plunger and allowed the silocone to fill up the mold. After about 10ml we checked to see if there were any leaks. All looked good, so we continued to inject more.

Injecting the resin into the mold.

Eventually, the resin started to come out of the top of the vent holes in the mold. We paused injection and waited for the bubbles to pop. Then we injected a bit more until it overflowed. Then the mold was left to cure. As it has a 12 hour cure time, it was left overnight to harden.

The silicone overflowing the vents of the mold.

Demolding

The next morning I demolded the part to see how it came out and was pleased with the results. I started by taking out the screws. I tried to pull the mold halves apart, but they were pretty stuck. I used an exacto knife to pry between the center and the top half of the molds and was able to get a screwdriver between them. However, in the course of trying to pry them apart, the top part of the mold broke.

The upper part of the mold after it broke into two pieces.

Once it was broken, there was nothing to grab onto to pull it out anymore. So I opted to cut it out. I used sidecutters and pliers to chip, cut and pry it away.

Cutting away the interior of the top of the mold.

Eventually, I was able to get it out and saw for the first time that the surface was in good condition and everything seemed like it cured.

First look at the inside of the cast part.

The rest of the mold pulled apart fairly easily. The lower flange pulled away nicely and the part exposed itself. The LEDs had floated a bit inside the mold and it has a fair amount of bubbles. However, generally, it was a good first cast of this new design.

Testing

Then it was time to test and see if it would produce some good effects. I screwed my dev board onto the device and uploaded my code from Week 10 that would change the color of the LEDs via Bluetooth. Again, the RGB order was wrong and the code did not address the correct number of LEDs (3 instead of 43).

Incorrect RGB order between the onboard LED and the strip.

So, I updated the code to run all of the LEDs in the same RGB order and updated to the correct number. The updated code is below.

wk13_neo_snoot.ino
/*
    Video: https://www.youtube.com/watch?v=oCMOYS71NIU
    Based on Neil Kolban example for IDF: https://github.com/nkolban/esp32-snippets/blob/master/cpp_utils/tests/BLE%20Tests/SampleNotify.cpp
    Ported to Arduino ESP32 by Evandro Copercini

   Create a BLE server that, once we receive a connection, will send periodic notifications.
   The service advertises itself as: 6E400001-B5A3-F393-E0A9-E50E24DCCA9E
   Has a characteristic of: 6E400002-B5A3-F393-E0A9-E50E24DCCA9E - used for receiving data with "WRITE"
   Has a characteristic of: 6E400003-B5A3-F393-E0A9-E50E24DCCA9E - used to send data with  "NOTIFY"

   The design of creating the BLE server is:
   1. Create a BLE Server
   2. Create a BLE Service
   3. Create a BLE Characteristic on the Service
   4. Create a BLE Descriptor on the characteristic
   5. Start the service.
   6. Start advertising.

   In this example rxValue is the data received (only accessible inside that function).
   And txValue is the data to be sent, in this example just a byte incremented every second.
*/
#include <BLEDevice.h>
#include <BLEServer.h>
#include <BLEUtils.h>
#include <BLE2902.h>

#include <Adafruit_NeoPixel.h>

//Pre-setup for the OLED
#include <Arduino.h>
#include <U8g2lib.h>

#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif

U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);

#define LCDWidth  u8g2.getDisplayWidth()

BLEServer *pServer = NULL;
BLECharacteristic *pTxCharacteristic;
bool deviceConnected = false;
bool oldDeviceConnected = false;
uint8_t txValue = 0;

// See the following for generating UUIDs:
// https://www.uuidgenerator.net/

#define SERVICE_UUID           "6E400001-B5A3-F393-E0A9-E50E24DCCA9E"  // UART service UUID
#define CHARACTERISTIC_UUID_RX "6E400002-B5A3-F393-E0A9-E50E24DCCA9E"
#define CHARACTERISTIC_UUID_TX "6E400003-B5A3-F393-E0A9-E50E24DCCA9E"

int led= 20;
int LED_PIN= 10;
int LED_COUNT= 43;    //42 in the string and 1 on the board
int colorIndex = 0;   //looper for color and the name



char a;   //varaiable for button ID
char c;   //variable for button push or release ID

Adafruit_NeoPixel strip(LED_COUNT, LED_PIN, NEO_GRB + NEO_KHZ800);

// RGB color values (we'll handle GRB conversion manually for 2nd LED)
uint8_t colorTable[][3] = {
  {255, 0, 0},     // Red
  {255, 165, 0},   // Orange
  {255, 255, 0},   // Yellow
  {0, 255, 0},     // Green
  {0, 255, 255},   // Cyan
  {0, 0, 255},     // Blue
  {255, 0, 255},   // Magenta
  {128, 0, 128},   // Purple
  {255, 255, 255}, // White
  {0, 0, 0}        // Off
};

// Color names for OLED display
const char* colorNames[] = {
  "Red",
  "Orange",
  "Yellow",
  "Green",
  "Cyan",
  "Blue",
  "Magenta",
  "Purple",
  "White",
  "Off"
};

const int totalColors = sizeof(colorTable) / sizeof(colorTable[0]);
const char* intro = "Device Ready";

class MyServerCallbacks : public BLEServerCallbacks {
  void onConnect(BLEServer *pServer) {
    deviceConnected = true;
  };

  void onDisconnect(BLEServer *pServer) {
    deviceConnected = false;
  }
};

class MyCallbacks : public BLECharacteristicCallbacks {
  void onWrite(BLECharacteristic *pCharacteristic) {
    String rxValue = pCharacteristic->getValue();

    if (rxValue.length() > 0) {
      Serial.println("*********");
      Serial.print("Received Value: ");
      for (int i = 0; i < rxValue.length(); i++) {
        Serial.print(rxValue[i]);
        Serial.println("*********");
      }
      char a= rxValue[2];
      char c= rxValue[3];
      Serial.print("a= ");
      Serial.println(a);
      Serial.print("c= ");
      Serial.println(c);
      Serial.println();
      Serial.println("*********");


    // If the up button (#5) is pushed in Bluefruit app then increment the color table
    if (a=='5' and c=='1'){
      colorIndex = (colorIndex + 1) % (sizeof(colorTable) / sizeof(colorTable[0]));
      Serial.print("Color Index Increased to ");
      Serial.println(colorIndex);
    }

    // If the up button (#6) is pushed in Bluefruit app then decrement the color table
    if (a=='6' and c=='1'){
      colorIndex = (colorIndex - 1 + totalColors) % totalColors;
      //colorIndex = (colorIndex - 1) % (sizeof(colorTable) / sizeof(colorTable[0]));
      Serial.print("Color Index Increased to ");
      Serial.println(colorIndex);
    }

   // Get RGB values for current color
        uint8_t r = colorTable[colorIndex][0];
        uint8_t g = colorTable[colorIndex][1];
        uint8_t b = colorTable[colorIndex][2];

        for (int j = 0; j <= LED_COUNT; j++){

        // First LED is RGB (even though strip is NEO_GRB by default)
        strip.setPixelColor(j,r, g, b);
        strip.show();
        }

        // Send color text to the OLED
        u8g2.clearBuffer();          // clear the internal memory
        int len = strlen(colorNames[colorIndex]);
        int x = (LCDWidth - 6*len) / 2;
        //Serial.print(LCDWidth);
        //Serial.print(" ");
        //Serial.print(len);
        //Serial.print(" ");
        //Serial.println(len);
        Serial.println(len);
        u8g2.drawStr(x,10,colorNames[colorIndex]);  // write something to the internal memory
        u8g2.sendBuffer();          // transfer internal memory to the display
    }
  }
};

void setup() {

  Serial.begin(115200);

  // Setup for Display

  u8g2.begin();
  u8g2.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
  u8g2.setFlipMode(1);
  u8g2.drawStr(0,10,intro);


  // Create the BLE Device
  BLEDevice::init("Cromira");

  // Create the BLE Server
  pServer = BLEDevice::createServer();
  pServer->setCallbacks(new MyServerCallbacks());

  // Create the BLE Service
  BLEService *pService = pServer->createService(SERVICE_UUID);

  // Create a BLE Characteristic
  pTxCharacteristic = pService->createCharacteristic(CHARACTERISTIC_UUID_TX, BLECharacteristic::PROPERTY_NOTIFY);

  pTxCharacteristic->addDescriptor(new BLE2902());

  BLECharacteristic *pRxCharacteristic = pService->createCharacteristic(CHARACTERISTIC_UUID_RX, BLECharacteristic::PROPERTY_WRITE);

  pRxCharacteristic->setCallbacks(new MyCallbacks());

  // Start the service
  pService->start();

  // Start advertising
  pServer->getAdvertising()->start();
  Serial.println("Waiting a client connection to notify...");
}

void loop() {

  if (deviceConnected) {
    pTxCharacteristic->setValue(&txValue, 1);
    pTxCharacteristic->notify();
    txValue++;
    delay(10);  // bluetooth stack will go into congestion, if too many packets are sent
  }

  // disconnecting
  if (!deviceConnected && oldDeviceConnected) {
    delay(500);                   // give the bluetooth stack the chance to get things ready
    pServer->startAdvertising();  // restart advertising
    Serial.println("start advertising");
    oldDeviceConnected = deviceConnected;
  }
  // connecting
  if (deviceConnected && !oldDeviceConnected) {
    // do stuff here on connecting
    oldDeviceConnected = deviceConnected;
  }
}

With the code updated, the LEDs all lit up with the same color that could be cycled through via the Adafruit BLE Connect app using the up and down arrow buttons on the controller function.

LED ring code fixed and reacting properly to the app.

Sample Images

Then I used the device to take some sample shots. I had the device working for my oldest daughters water polo practice so I brought it with me. The first thing I did was to take a shot with just LEDs on without deflecting the sleeve. I found that there is still some vignetting in the corners.

Shot of a polo ball without deflecting the snoot. Note the purple areas in the corners of the frame.

Then I started to do test shots with custom vignetting. I was able to use my left hand to deflect the hood and create interesting vinette shapes to frame the ball.

Shot of the same ball with a custom vignette frame from squeezing the silicone hood.

Then I took some portraits of my daughter in the pool (seen at the top of the page) and got some good results.

Later I took some shots of my younger daughter outside on our back porch. I did notice that in higher light the color of the vignette starts to wash out and you can start to see the milky color of the silicone.

Shot outside of my daughter Ivy. Note the milky edges to the vignette from the higher light.

Generally, I am pleased with how this came out and will take this concept into my final project.