Brandon Roots
  • INTERACTIVE
  • FILM
  • ABOUT
  • CONTACT
February 24, 2022

Week 4 – Marquee Letter PCB Fab

broots Homemade Hardware, ITP

Over the last week I took my PCB design from Eagle to Bantam Tools for PCB milling.

I ended up having to mill the board twice. My first attempt had a short that I wasn’t able to locate. Milling on my second attempt went much better!

Next I moved on to SMD soldering with solder paste and heat gun.

To program my board I ended up using an SOIC8 test clip I ordered from Amazon that fit nicely into the programming jig we made in class.

Since my board includes a piezo buzzer my intention was for it to generate sound in response to registering a touch from the capacitive sensor. Taking inspiration from Rick and Morty the buzzer plays “Human Music” when touched.

Here is my Arduino sketch:

/*
  Marquee Assigment
  by Brandon Roots
  
  Homemade Hardware
  ITP Spring 2022
*/

#include <CapacitiveSensor.h>

CapacitiveSensor   cs_4_3 = CapacitiveSensor(3,4); 
const int buzzer = 2; //buzzer to ATTINY85 pin 2
long touchCounter = 0;

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(0, OUTPUT);
  cs_4_3.set_CS_AutocaL_Millis(0xFFFFFFFF);     // turn off autocalibrate on channel 1 - just as an example
}

// the loop function runs over and over again forever
void loop() {

  long total1 =  cs_4_3.capacitiveSensor(30);

  if(total1 > 100){
    if(touchCounter == 0){
      touchCounter = millis();
    }
    digitalWrite(0, HIGH);   // turn the LED on (HIGH is the voltage level)
    humanMusic();
  }
  else {
    //digitalWrite(0, LOW);    // turn the LED off by making the voltage LOW
    pulseLight();
    noTone(buzzer);     // Stop sound...
    if(touchCounter > 0){
      touchCounter = 0;
    }
  }              
}

void humanMusic(){
  int tempo = 120;
  int millisTempo = 60000/tempo;
  int beat = millis() - touchCounter;

  if(beat%(millisTempo*4) < (millisTempo * 0.25)){
    tone(buzzer, 523); // Send signal... (523,  587, 523)
  }
  else if(beat%(millisTempo*4) > (millisTempo * 1) && beat%(millisTempo*4) < (millisTempo * 1.25)){
    tone(buzzer, 587); // Send signal... (523,  587, 523)
  }
  else if(beat%(millisTempo*4) > (millisTempo * 2) && beat%(millisTempo*4) < (millisTempo * 2.25)){
    tone(buzzer, 523); // Send signal... (523,  587, 523)
  }
  else{
    noTone(buzzer);
  } 
}

void pulseLight(){
  int brightness = millis()%2000;
  int mappedBrightness = 0;
  if(brightness < 1000){
    mappedBrightness = int(map(brightness, 0, 1000, 1, 50));
  } else {
    mappedBrightness = int(map(brightness, 1000, 2000, 50, 1));
  }
  analogWrite(0, mappedBrightness);
}
Week 3 – Marquee Letter PCB Design Midterm – “Handling”

Related Posts

Fractal Plant – Foiled by  Registers

Homemade Hardware, ITP, Solar Plant

Fractal Plant – Foiled by Registers

Since receiving the PCBs and successfully soldering the board together I have been trying to rewrite code for the I2C port expander. This has been immensely difficult! The Inkplate Arduino Library makes considerable use of an “Mcp” class, which is written to work with the MCP23017 GPIO expander IC. These chips are quite difficult to […]

“Handling” Playtest Week

Handling, ITP

“Handling” Playtest Week

Last week we attended “Playtest Thursday” on the second floor of 370 Jay St with our games. I came away from the experience with some very specific feedback. Seeing a number of people play the game showed me things I didn’t anticipate. Some folks approached the cabinet and immediately treated it as a touch screen. […]

Fractal Plant – Beta Build

Homemade Hardware, ITP, Solar Plant

Fractal Plant – Beta Build

The boards arrived! Amazingly within an hour of one another. Based on the experience I think that JLCPCB is a better value. With shipping OSHPark was $55.50 for 3 boards. JLCPCB was $26.36 for 10 boards. Aside from a higher cost OSHPark also left sharp bits of tabs around the edges of the boards which […]

Recent Posts

  • Fractal Plant – Foiled by  RegistersFractal Plant – Foiled by Registers
    May 9, 2022
  • “Handling” Playtest Week“Handling” Playtest Week
    May 5, 2022
  • Fractal Plant – Beta BuildFractal Plant – Beta Build
    April 24, 2022
Brandon Roots