Week 05 ~ Electronics Production
Milling the board
Milling the outline of the board design from week04 on the Roland SRM-20. The workflow:
export separate .svg
s from KiCAD for the traces and edge-cuts > import into Illustrator and export as .png
s
> import into mods. For some reason illustrator includes a tiny white outline on the .png
s when you export
- I noticed this too late so both the traces and edge-cuts started off with a U-shaped outline being cut..
I used the following code to test the potentiometer and some of the pins I had broken out by connecting some LEDs I had lying around:
/*
Niklas Hagemann, HTMAA 2023 - PCB milling week test
Adapted from the Arduino AnalogInput example (https://www.arduino.cc/en/Tutorial/BuiltInExamples/AnalogInput)
*/
const int sensorPin = D2;
const int ledPin = 25;
const int yellow_led = D7;
const int blue_led = D3;
int sensorValue = 0;
int led_state = LOW;
void setup() {
Serial.begin(9600);
pinMode(ledPin, OUTPUT);
pinMode(yellow_led, OUTPUT);
pinMode(blue_led, OUTPUT);
}
void loop() {
sensorValue = analogRead(sensorPin);
digitalWrite(ledPin, HIGH);
delay(sensorValue);
digitalWrite(ledPin, LOW);
delay(sensorValue);
// if (sensorValue > 500) {
// Serial.print("Reading: ");
// Serial.println(sensorValue);
// led_state = HIGH;
// }
// else {
// led_state = LOW;
// }
digitalWrite(yellow_led, led_state);
digitalWrite(blue_led, !led_state);
// to make it swap colors, delay depends on pot value
delay(sensorValue);
led_state = !led_state;
}
Blinking LEDs ...
Attaching a vibration motor ...
The main takeaways from this week for me were about header placement: as Anthony had pointed out, soldering 2-pin headers with an offset footprint is hard as there's no way
for the header to stand on the board by itself. Furthermore, I tore off the copper pads in two locations as I applied too much force attaching jumper cables - I would assume that larger headers could also help with,
as the force would be distributed across a larger area. In future it would also be helpful to break out more ground pins and place them closer to the other breakout pins; all
of which suggests going for larger headers next time ...
Files: see week 04