When considering ideas for my final project, I had a couple of options in mind. The first idea that came to me was to design a smart container for fresh fish to help local fishermen preserve their catch for longer periods and reduce food waste. However, as I continued to brainstorm, I also came up with another idea of the Digital Suggestion Box (DsBOX) for Service Quality Assessment.
After careful consideration, I ultimately decided to pursue the DsBOX project, as I believe it has the potential to make a significant impact in my country by providing valuable data on citizen satisfaction and driving improvements in service delivery.
After the PCB is designed, the subsequent stage involves generating a visual representation that indicates the drill lines used for generating the g-code utilized by the milling machine.
Following the previous step, the subsequent task involves generating the necessary g-code for our SRM-20 milling machines. To achieve this, I utilized MODS software to generate the toolpath.
Here below I am adding the double sided tape to fix the board on the bed of Roland SRM-20
After fixing the board on the bed, I fixed the milling tool
Cutting process
Extracting the created PCB
Removing copper around boutons to prevent mistakes on short circuit around them
Here below is the made PCB for DsBOX:
Here below I am soldering and testing components
See here below the completed made PCB of DsBOX and its' electronic components
However, I encountered an unfortunate setback when the completed PCB of my project, the DsBOX, along with its electronic components, failed to function as intended. Faced with this challenge, I have made the decision to take a step back and redesign the PCB of the DsBOX from scratch. This decision was driven by my determination to overcome obstacles and create a fully functional and successful project.
Here below is the new circuit
Here below is the redesigned PCB for DsBOX:
Here below is the redesigned PCB after milling in Roland SRM-20:
After countless efforts and dedication, I am elated to announce the successful production of the here below PCB of DsBOX.
Here below I am soldering electronic components on the board
Here below I am testing the circuit board
Here below is the pictorial/illustration of DsBOX Input Buttons to allow users give their feedback (rating) on Question (Qn) Option
Here below is the DsBOX Flowchart Diagram
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
CREATE TABLE `feedback` (
`id` int(11) NOT NULL,
`Q1` int(11) DEFAULT NULL,
`Q2` int(11) DEFAULT NULL,
`Q3` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
ALTER TABLE `feedback`
ADD PRIMARY KEY (`id`);
ALTER TABLE `feedback`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "INSERT INTO feedback (Q1, Q2, Q3)
VALUES ('" . $Q1 . "', '" . $Q2 . "', '" . $Q3 . "')";
if ($conn->query($sql) === TRUE) {
echo "New record created successfully";
}
else {
echo "Error: " . $sql . "
" . $conn->error;
}
$conn->close();
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
#include
#include
const char* ssid = "I_Am_Blessed";
const char* password = "Innovate!";
#include []
#include
LiquidCrystal_I2C lcd(0x27,20,4);
// set pin numbers
const int Button1 = 15;
const int led = 26;
const int Button2 = 2;
const int Button3 = 4;
const int Button4 = 17;
const int Button5 = 16;
int buttonstate=0, prev=0;
String ServerName="192.168.137.191";
int Q1_response=0,Q2_response=0,Q3_response=0, common_value=0, stage=0;
void setup(){
Serial.begin(115200);
lcd.init();
lcd.backlight();
pinMode(led,OUTPUT);
pinMode(Button1,INPUT_PULLUP);
pinMode(Button2,INPUT_PULLUP);
pinMode(Button3,INPUT_PULLUP);
pinMode(Button4,INPUT_PULLUP);
pinMode(Button5,INPUT_PULLUP);
WiFi.begin(ssid, password);
Serial.println("Connecting");
while(WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
wifi_msg();
}
Serial.println("");
Serial.print("Connected to WiFi network with IP Address: ");
digitalWrite(led,HIGH);
Serial.println(WiFi.localIP());
wifi_connected();
delay(2000);
Serial.println("Timer set to 5 seconds (timerDelay variable), it will take 5 seconds before publishing the first reading.");
}
void loop(){
if(stage==0){
q1_screen();
}
delay(500);
}
////////////////////////////////////////////////////////////////////////////////////
/* getting response */
///////////////////////////////////////////////////////////////////////////////////////
int Responses()
{
int waiting=0;
while(waiting ==0){
if(digitalRead(Button1)== LOW || digitalRead(Button2) == LOW|| digitalRead(Button3)== LOW || digitalRead(Button4)== LOW ||digitalRead(Button5)== LOW){
buttonstate=1;
}
else{buttonstate=0;
prev=0;}
if (digitalRead(Button1) == LOW && buttonstate==1 && prev==0 ){
Serial.println("Excellent Button pressed");
common_value=100;
waiting=1;
prev=1;
}
if (digitalRead(Button2) == LOW && buttonstate==1 && prev==0 ){
Serial.println("very good Button pressed");
common_value=75;
waiting=1;
prev=1;
}
if (digitalRead(Button3) == LOW && buttonstate==1 && prev==0 ){
Serial.println("Good Button pressed");
common_value=50;
waiting=1;
prev=1;
}
if (digitalRead(Button4) == LOW && buttonstate==1 && prev==0 ){
Serial.println("Bad Button pressed");
common_value=25;
waiting=1;
prev=1;
}
if (digitalRead(Button5) == LOW && buttonstate==1 && prev==0 ){
Serial.println("Very Bad Button pressed");
common_value=0;
waiting=1;
prev=1;
}
}
return common_value;
}
////////////////////////////////////////////////////////////////////////////////////
/* Asking questions */
///////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////
/* sending feedback */
///////////////////////////////////////////////////////////////////////////////////////
void sendFeedback(String Q1,String Q2,String Q3) {
sending_screen();
Serial.println(Q1+" "+Q2+" "+Q3);
//Check WiFi connection status
if(WiFi.status()== WL_CONNECTED){
HTTPClient http;
String serverPath = "http://"+ServerName+"/eric/insert.php?Q1="+Q1+"&Q2="+Q2+"&Q3="+Q3;
// Your Domain name with URL path or IP address with path
http.begin(serverPath.c_str());
// If you need Node-RED/server authentication, insert user and password below
//http.setAuthorization("REPLACE_WITH_SERVER_USERNAME", "REPLACE_WITH_SERVER_PASSWORD");
// Send HTTP GET request
int httpResponseCode = http.GET();
if (httpResponseCode>0) {
Serial.print("HTTP Response code: ");
Serial.println(httpResponseCode);
String payload = http.getString();
Serial.println(payload);
digitalWrite(led,LOW);
delay(300);
digitalWrite(led,HIGH);
delay(300);
digitalWrite(led,LOW);
delay(300);
digitalWrite(led,HIGH);
delay(300);
//check for success server response
if(httpResponseCode == -1){
lcd.clear();
lcd.setCursor(2, 1);
lcd.print("DATA RECORDED");
lcd.setCursor(2, 2);
lcd.print("THANK YOU ");
}
delay(3000);
stage=0;
loop();
}
else {
Serial.print("Error code: ");
Serial.println(httpResponseCode);
if(httpResponseCode == -1){
lcd.clear();
lcd.setCursor(2, 1);
lcd.print("server error");
lcd.setCursor(2, 2);
lcd.print("Try again later.. ");
}
delay(3000);
loop();
}
delay(500);
// Free resources
http.end();
}
else {
Serial.println("WiFi Disconnected");
//error
lcd.clear();
lcd.setCursor(2, 1);
lcd.print("wifi");
lcd.setCursor(2, 2);
lcd.print("Disconnected");
delay(3000);
}
stage=0;
}
void q1_screen(){
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("How was Friendly and");
lcd.setCursor(0, 1);
lcd.print("helpful attitude of");
lcd.setCursor(0, 2);
lcd.print("Staff?");
Serial.print("");
Serial.print("How was Friendly and helpful attitude of Staff?");
Q1_response=Responses();
delay(1000);
q2_screen();
stage=1;
}
void q2_screen() {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("How was Quality of");
lcd.setCursor(0, 1);
lcd.print("received service ?");
Serial.println("");
Serial.print("How was Quality of received service ?");
Q2_response=Responses();
delay(1000);
q3_screen();
}
void q3_screen() {
lcd.clear();
lcd.setCursor(0, 0);
lcd.print("How was Timeliness");
lcd.setCursor(0, 1);
lcd.print("of the service");
lcd.setCursor(0, 2);
lcd.print("delivery?");
Serial.println("");
Serial.print("How was Timeliness of the service delivery?");
Q3_response=Responses();
delay(1000);
sending_screen();
sendFeedback(String(Q1_response),String(Q2_response),String(Q3_response));
stage=0;
Q1_response=0;
Q2_response=0;
Q3_response=0;
}
void sending_screen(){
lcd.clear();
lcd.setCursor(2, 1);
lcd.print("THANK YOU FOR");
lcd.setCursor(2, 2);
lcd.print("YOUR FEEDBACK");
}
void wifi_msg(){
lcd.clear();
lcd.setCursor(2, 1);
lcd.print("CONNECTING ");
lcd.setCursor(2, 2);
lcd.print("TO WIFI..");
}
void wifi_connected(){
lcd.clear();
lcd.setCursor(2, 1);
lcd.print("WIFI");
lcd.setCursor(2, 2);
lcd.print("CONNECTED");
}
Thank you!
Eric NDAYISHIMIYE, FabLab Rwanda.
© 2023 | Eric NDAYISHIMIYE | All Rights Reserved