15. System Integration¶
This week’s Assignment¶
- Design and document the system integration for your final project
Learning outcomes¶
- Define and apply system integration to your final project
Have you answered these questions?¶
- implemented methods of packaging?
- designed your final project to look like a finished product?
- documented system integration of your final project?
- linked to your system integration documentation from your final project page?
What is System Integration?¶
I wasn’t sure the meaning of “System Integration”, I asked chatGPT and it answered.
System integration means: Making different parts of technology work together as one system.
How to Integrate my “SYSTEM”?¶
My system is not that complicated but it would likely be messed up with cables. Therefore I need to think how to classify and organize them.
Make First Prototype¶
So I first made rough prototype by cardboard and put most of parts on it.
Controller Board
Controller Box
I could imagine the wiring from parts and found display position should be changed
to center and micro controller would be better to put center on the bottom face.
Therefore I drew it in Fusion 360.
Solder all the possible parts¶
As making the prototype, I could roughly understand the position.
Next step is soldering all the possible parts and connect them into Raspberry Pi Pico in the prototype box.
Pin headers were put at the other side.
Make hinge¶
Hinge parts(connected control board and the box) information is gotten from the internet and 3D printed.
Hinge Stl file
Connect Check¶
Connect all of the parts into Raspberry Pi Pico(I used breadboard as a test and
I thought it would be clear to know how many ports are needed for all function)
After connecting all the buttons and slide potentiometers, I checked their connectivity by a simple code. I divided 2 codes, one for button and another for slide potentiometer, as it is easy to write and check.
1) Test code for button test
This code was that the LED on the Raspberry Pi Pico was turning on when each button(select and Big button) was pushed.
1) Test code for slide potentiometer
First I tried to make the code of changing the LED brightness by the value of slide potentiometer.
However, it didn’t work well.
I changed the code that when the value comes more than certain amount,
LED light comes on and off at certain point.
(Codes are as (1),(2) at Code
)
Light Connect Check¶
I got the NeoPixel ring light for the test and soldered it.
Tip
IN lines should be connected for turning on NeoPixel from microcontroller!
I soldered OUT lines at first but it wasn’t light on.
It is for sending data to another NeoPixel!
Then I tested it connecting with Xiao C3 and code was Arduino.
(Test code is below(3)).
Fusion¶
The main parts are prepared and 3D model has been created.
Most of the parts(Raspberry Pi Pico, ILI9341, tactile switch, button and slide potentiometers) are gotten from Internet
(GrabCAD).
Think about integrating¶
Then Classified for each function.
What I understood was..
-
Micro controller(Raspberry Pi Pico) should be at the center and edge, as power supply should be out from the box
-
The connection of Micro controller, I got an image of PCB(such as how many ports are made..).
-
ILI9341 is going to be put at cover and classified the cables.
-
Cables should be classified as
- Select button
- Big button
- slide potentiometer
I list how to create and classified the wiring as follows;
Name | part | Material | Note |
---|---|---|---|
Controller | Controller board | MDF 6mm | Cut by laser cutter |
Side plate | wood 15mm | Cut by CNC, make a slide for base plate, Holes for the tab, 3D curving(?) | |
Base Plate | MDF 6mm | Cut by laser cutter | |
Front plate | MDF 2.5 or 4mm(?) | Cut by laser cutter + living hinge(as a design?) tab to connect with side plate | |
Back plate | MDF 6mm | Cut by laser cutter, make hole for typeC cable, tab for connecting with side plate | |
PCB | Raspberry Pi Pico | Create the required number of sockets for each port | |
Select switch(tactile switch) | Make one big plate(PCB), and make holes for 4 tactile switchs on the PCB board | ||
Slide potentiometer | Create a single cable by VCC and GND cable each and collect the signal part of the cable | ||
Direct cable | ILI9341 | cables to Raspberry Pi Pico | |
Big button | cables to Raspberry Pi Pico | ||
Hinge | 3D printing | ||
Light | PCB | Xiao S3 | |
Direct Cable | Neo Pixel(?) |
System Diagram¶
I made system diagrams from the side of micro controller.
Schedule¶
This is a schedule chart
What I’ve learnt¶
This week, I could focus on the all connections for my final project and how to organize them. When I saw actually all the lines and parts, I could understand the problem about “integration” well. Though I’m sure there will be some problems and inconvenience while coding and assembling, I may think clearly the solution with real components than just imagination.
Useful Links¶
Code¶
(1) Test code for button test This code was that the LED on the Raspberry Pi Pico was keeping on when each button(select and Big button) was pushed.
/*
Operating Test Code
*/
const int LEDpin = 25;
/* Big Button */
const int BB1 = 4;
const int BB2 = 5;
/* Select Button */
const int SB1 = 6;
const int SB2 = 7;
const int SB3 = 8;
const int SB4 = 9;
/* Slider */
const int SL1 = 26;
const int SL2 = 27;
const int SL3 = 28;
const int SL4 = 13;
int buttonState = 0;
int anaval = 0;
int outval =0;
int digi_min = 0; // Digital min value
int ana_min = 0; // Analog min value
int digi_max = 255; // Digital max value
int ana_max = 1023; // Analog max value
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(LEDpin, OUTPUT);
pinMode(BB1, INPUT_PULLUP);
pinMode(BB2, INPUT_PULLUP);
pinMode(SB1, INPUT_PULLUP);
pinMode(SB2, INPUT_PULLUP);
pinMode(SB3, INPUT_PULLUP);
pinMode(SB4, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly:
//
buttonState = digitalRead(BB1);
// Serial.println(buttonState);
if (buttonState == 1){
digitalWrite(LED_BUILTIN, LOW);
} else if (buttonState == 0){
digitalWrite(LED_BUILTIN, HIGH);
}
buttonState = digitalRead(BB2);
// Serial.println(buttonState);
if (buttonState == 1){
digitalWrite(LED_BUILTIN, LOW);
} else if (buttonState == 0){
digitalWrite(LED_BUILTIN, HIGH);
}
buttonState = digitalRead(SB1);
// Serial.println(buttonState);
if (buttonState == 1){
digitalWrite(LED_BUILTIN, LOW);
} else if (buttonState == 0){
digitalWrite(LED_BUILTIN, HIGH);
}
buttonState = digitalRead(SB2);
//Serial.println(buttonState);
if (buttonState == 1){
digitalWrite(LED_BUILTIN, LOW);
} else if (buttonState == 0){
digitalWrite(LED_BUILTIN, HIGH);
}
buttonState = digitalRead(SB3);
//Serial.println(buttonState);
if (buttonState == 1){
digitalWrite(LED_BUILTIN, LOW);
} else if (buttonState == 0){
digitalWrite(LED_BUILTIN, HIGH);
}
buttonState = digitalRead(SB4);
//Serial.println(buttonState);
if (buttonState == 1){
digitalWrite(LED_BUILTIN, LOW);
} else if (buttonState == 0){
digitalWrite(LED_BUILTIN, HIGH);
}
}
(2) Slide potentiometer connecting Test
/*
Operating Test Code
*/
#include <hardware/pwm.h>
const int ledPin = 25;
/* Slider */
const int SL1 = 26;
const int SL2 = 27;
const int SL3 = 28;
const int SL4 = 13;
int buttonState = 0;
int anaval = 0;
int outval =0;
int digi_min = 0; // Digital min value
int ana_min = 0; // Analog min value
int digi_max = 255; // Digital max value
int ana_max = 1023; // Analog max value
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
// PWM 用にGPIO 25を初期化 by chatGPT
gpio_set_function(ledPin, GPIO_FUNC_PWM);
uint slice_num = pwm_gpio_to_slice_num(ledPin);
pwm_set_wrap(slice_num, 65535); // PWM分解能を最大に設定
pwm_set_enabled(slice_num, true);
/*
pinMode(SL1, INPUT_PULLUP);
pinMode(SL2, INPUT_PULLUP);
pinMode(SL3, INPUT_PULLUP);
pinMode(SL4, INPUT_PULLUP);
pinMode(LEDpin, OUTPUT);
*/
}
void loop() {
// Slider
anaval = analogRead(SL1);
Serial.print("SL1:");
Serial.println(anaval);
/*
outval = anaval;
outval = map(anaval, ana_min, ana_max, digi_min, digi_max);
uint slice_num = pwm_gpio_to_slice_num(ledPin);
pwm_set_gpio_level(ledPin, outval);
*/
if(anaval > 150){
digitalWrite(LED_BUILTIN, LOW);
}else{
digitalWrite(LED_BUILTIN, HIGH);
}
delay(10);
//analogWrite(LED_BUILTIN,outval);
// analogWrite(LEDpin,outval);
/*
}
#include <Adafruit_NeoPixel.h>
#define PIN A0
#define NUMPIXELS 12
Adafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800);
const int delayval = 50;
void setup() {
pixels.begin();
}
float th = 0;
void loop() {
pixels.clear();
for (int i = 0; i < NUMPIXELS; i++) {
pixels.setPixelColor(i, pixels.Color(cos(th)*128+128, 0, sin(th)*128+128));
// pixels.reainbow();
}
pixels.show();
th+=0.01;
delay(delayval);
}