verzameling oude spullen
This commit is contained in:
commit
7ed9544283
119 changed files with 1288059 additions and 0 deletions
47
arduino/SafetyBoard
Normal file
47
arduino/SafetyBoard
Normal file
|
@ -0,0 +1,47 @@
|
|||
|
||||
|
||||
void pulseCounter(); //
|
||||
void setupFlowMeter(); //
|
||||
void checkFlow() ;
|
||||
|
||||
void getInfo(); //here we get info like temp etc
|
||||
|
||||
void checkMenu();
|
||||
void pwdKeypadEvent();
|
||||
void menuKeypadEvent();
|
||||
|
||||
int laserEnablePin = 50;
|
||||
int waterCoolerPin = 51;
|
||||
int airAssistPin = 52;
|
||||
int ventilationPin = 53;
|
||||
int lichtPin = 49;
|
||||
//int lichtPin = 48; spare
|
||||
int testEnablePin = 47;
|
||||
int potMeterEnable = 46;
|
||||
|
||||
|
||||
LiquidCrystal lcd(12, 11, 7, 6, 5, 4);
|
||||
int passwordCorrect = false;
|
||||
Password password = Password( "123456" );
|
||||
const byte ROWS = 4; // Four rows
|
||||
const byte COLS = 3; // Three columns
|
||||
|
||||
char keys[ROWS][COLS] = { // Define the Keymap
|
||||
{ '1','2','3' } ,
|
||||
{ '4','5','6' } ,
|
||||
{ '7','8','9' } ,
|
||||
{ '*','0','#' } };
|
||||
|
||||
byte rowPins[ROWS] = { 15, 20, 17, 19 }; // Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
|
||||
byte colPins[COLS] = { 18, 14, 16 }; // Connect keypad COL0, COL1 and COL2 to these Arduino pins.
|
||||
Keypad kpd = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); // Create the Keypad
|
||||
float tempIn;
|
||||
float tempOut;
|
||||
int tempPinIn = 0;
|
||||
int tempPinOut = 0;
|
||||
volatile int pulseCount; //measuring the rising edges of the signal
|
||||
int Calc;
|
||||
int hallsensor = 2; //The pin location of the sensor
|
||||
unsigned long loopTime;
|
||||
|
||||
|
BIN
arduino/SafetyBoard20140216.zip
Normal file
BIN
arduino/SafetyBoard20140216.zip
Normal file
Binary file not shown.
41
arduino/SafetyBoard3/SafetyBoardFinal.ino
Normal file
41
arduino/SafetyBoard3/SafetyBoardFinal.ino
Normal file
|
@ -0,0 +1,41 @@
|
|||
|
||||
#include <LiquidCrystal.h>
|
||||
#include <Keypad.h>
|
||||
#include <Password.h>
|
||||
#include "safetyboard.h";
|
||||
|
||||
void setup() {
|
||||
pinMode(airAssistPin, OUTPUT); // sets the digital pin as output
|
||||
pinMode(ventilationPin, OUTPUT); // sets the digital pin as output
|
||||
pinMode(waterCoolerPin, OUTPUT); // sets the digital pin as output
|
||||
pinMode(laserEnablePin, OUTPUT); // sets the digital pin as output
|
||||
pinMode(lichtPin, OUTPUT); // sets the digital pin as output
|
||||
pinMode(testEnablePin, OUTPUT); // sets the digital pin as output
|
||||
pinMode(potMeterEnable, OUTPUT); // sets the digital pin as output
|
||||
digitalWrite(airAssistPin, LOW); // sets the airAssist on
|
||||
digitalWrite(ventilationPin, LOW); // sets the air ventilation on
|
||||
digitalWrite(waterCoolerPin, LOW); // sets the watercooler on
|
||||
digitalWrite(laserEnablePin, LOW); // sets the laserEnable on
|
||||
digitalWrite(lichtPin, HIGH); // sets the licht pin (inverted) on
|
||||
digitalWrite(testEnablePin, LOW); // sets the test enable pin ()
|
||||
digitalWrite(potMeterEnable, LOW); // sets the watercooler fans on
|
||||
Serial.begin(9600);
|
||||
lcd.begin(16, 4); // set up the LCD's number of columns and rows:
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print("Bitlair lasercutter"); // Print a message to the LCD.
|
||||
lcd.setCursor(0, 1);
|
||||
lcd.print("Password?");
|
||||
lcd.setCursor(0, 2);
|
||||
lcd.print("Press * to confirm");
|
||||
kpd.addEventListener(pwdKeypadEvent); //add an event listener for this keypad
|
||||
}
|
||||
void loop() {
|
||||
if (passwordCorrect) {
|
||||
checkMenu();
|
||||
checkFlow();
|
||||
} else {
|
||||
kpd.getKey();
|
||||
}
|
||||
}
|
||||
|
||||
|
30
arduino/SafetyBoard3/flowMeter.ino
Normal file
30
arduino/SafetyBoard3/flowMeter.ino
Normal file
|
@ -0,0 +1,30 @@
|
|||
//*******************************************************
|
||||
// FlowMeter
|
||||
//*******************************************************
|
||||
void setupFlowMeter() {
|
||||
pinMode(hallsensor, INPUT); //initializes digital pin 2 as an input
|
||||
attachInterrupt(0, pulseCounter, RISING); //and the interrupt is attached
|
||||
loopTime = millis();
|
||||
sei(); //enable interupts
|
||||
}
|
||||
void pulseCounter() { //This is the function that the interupt calls
|
||||
pulseCount++; //This function measures the rising and falling edge of the hall effect sensors signal
|
||||
}
|
||||
void checkFlow() {
|
||||
if(millis() >= (loopTime + 2000)){
|
||||
Calc = (pulseCount * 60 / (7.5 * 2)); //(Pulse frequency x 60) / 7.5Q, = flow rate in L/hour
|
||||
Serial.print (Calc, DEC); //Prints the number calculated above
|
||||
Serial.print (" L/hour\r\n"); //Prints "L/hour" and returns a new line
|
||||
lcd.setCursor(18, 3);
|
||||
lcd.print(" "); //Prints the number calculated above
|
||||
//lcd.setCursor(15, 1);
|
||||
//lcd.print(millis()/1000);
|
||||
lcd.setCursor(11, 3);
|
||||
lcd.print(Calc, DEC); //Prints the number calculated above
|
||||
lcd.print (" L/h "); //Prints "L/hour" a
|
||||
//lcd.print(pulseCount);
|
||||
//lcd.print (" "); //Prints "L/hour" a
|
||||
pulseCount = 0;
|
||||
loopTime = millis();; // Updates loopTime
|
||||
}
|
||||
}
|
78
arduino/SafetyBoard3/menu.ino
Normal file
78
arduino/SafetyBoard3/menu.ino
Normal file
|
@ -0,0 +1,78 @@
|
|||
//******************************************************
|
||||
// M
|
||||
//******************************************************
|
||||
void getInfo() {
|
||||
//HERE WE WILL GET THE INFO LIKE TEMP etc
|
||||
}
|
||||
void checkMenu() {
|
||||
lcd.setCursor(0,0);
|
||||
lcd.print("press * for info ");
|
||||
lcd.setCursor(0,1);
|
||||
lcd.print("1 air-assist 2 vent");
|
||||
lcd.setCursor(0,2);
|
||||
lcd.print("3 watercool 4 laser");
|
||||
lcd.setCursor(0,3);
|
||||
lcd.print("0 off 9 on");
|
||||
|
||||
char key = kpd.getKey();
|
||||
}
|
||||
void menuKeypadEvent(KeypadEvent eKey) {
|
||||
switch (kpd.getState()){
|
||||
case PRESSED:
|
||||
switch (eKey){
|
||||
case '*':
|
||||
getInfo();
|
||||
break;
|
||||
case '#':
|
||||
password.reset();
|
||||
break;
|
||||
case '0':
|
||||
digitalWrite(airAssistPin, LOW);
|
||||
digitalWrite(ventilationPin, LOW);
|
||||
digitalWrite(waterCoolerPin, LOW);
|
||||
digitalWrite(laserEnablePin, LOW);
|
||||
digitalWrite(lichtPin, HIGH); // sets the licht pin (inverted) on
|
||||
digitalWrite(testEnablePin, LOW); // sets the test enable pin ()
|
||||
digitalWrite(potMeterEnable, LOW); // sets the watercooler fans on
|
||||
break;
|
||||
case '9':
|
||||
digitalWrite(airAssistPin, HIGH);
|
||||
digitalWrite(ventilationPin, HIGH);
|
||||
digitalWrite(waterCoolerPin, HIGH);
|
||||
digitalWrite(laserEnablePin, HIGH);
|
||||
digitalWrite(lichtPin, LOW); // sets the licht pin (inverted) on
|
||||
// digitalWrite(testEnablePin, LOW); // sets the test enable pin ()
|
||||
// digitalWrite(potMeterEnable, LOW); // sets the watercooler fans on
|
||||
|
||||
break;
|
||||
case '1':
|
||||
digitalWrite(airAssistPin, !digitalRead(airAssistPin));
|
||||
break;
|
||||
case '2':
|
||||
digitalWrite(ventilationPin, !digitalRead(ventilationPin));
|
||||
break;
|
||||
case '3':
|
||||
digitalWrite(waterCoolerPin, !digitalRead(waterCoolerPin));
|
||||
break;
|
||||
case '4':
|
||||
digitalWrite(laserEnablePin, !digitalRead(laserEnablePin));
|
||||
break;
|
||||
case '5':
|
||||
digitalWrite(lichtPin, !digitalRead(lichtPin));
|
||||
break;
|
||||
case '6':
|
||||
digitalWrite(testEnablePin, !digitalRead(testEnablePin));
|
||||
break;
|
||||
case '7':
|
||||
digitalWrite(potMeterEnable, !digitalRead(potMeterEnable));
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
password.append(eKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
1
arduino/SafetyBoard3/password.h
Normal file
1
arduino/SafetyBoard3/password.h
Normal file
|
@ -0,0 +1 @@
|
|||
//
|
47
arduino/SafetyBoard3/password.ino
Normal file
47
arduino/SafetyBoard3/password.ino
Normal file
|
@ -0,0 +1,47 @@
|
|||
//#include "safetyboard.h";
|
||||
//******************************************************
|
||||
// Password related stuff
|
||||
//******************************************************
|
||||
//take care of some special events
|
||||
void pwdKeypadEvent(KeypadEvent eKey) {
|
||||
switch (kpd.getState()){
|
||||
case PRESSED:
|
||||
Serial.print("Pressed: ");
|
||||
Serial.println(eKey);
|
||||
lcd.setCursor(0, 4);
|
||||
lcd.print(" "); //empty "Wrong"
|
||||
switch (eKey){
|
||||
case '*':
|
||||
checkPassword();
|
||||
break;
|
||||
case '#':
|
||||
password.reset();
|
||||
break;
|
||||
default:
|
||||
password.append(eKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
void checkPassword() {
|
||||
if (password.evaluate()) {
|
||||
Serial.println("Success");
|
||||
passwordCorrect = true;
|
||||
lcd.clear();
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print("Menu"); // Print a message to the LCD.
|
||||
setupFlowMeter();
|
||||
digitalWrite(airAssistPin, HIGH); // sets the airAssist on
|
||||
digitalWrite(ventilationPin, HIGH); // sets the air ventilation on
|
||||
digitalWrite(waterCoolerPin, HIGH); // sets the watercooler fans on
|
||||
digitalWrite(laserEnablePin, HIGH); // sets the watercooler fans on
|
||||
|
||||
|
||||
|
||||
kpd.addEventListener(menuKeypadEvent); //add an event listener for this keypad
|
||||
} else {
|
||||
Serial.println("Wrong");
|
||||
password.reset();
|
||||
lcd.setCursor(0, 4);
|
||||
lcd.print("Wrong");
|
||||
}
|
||||
}
|
47
arduino/SafetyBoard3/safetyboard.h
Normal file
47
arduino/SafetyBoard3/safetyboard.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
|
||||
|
||||
void pulseCounter(); //
|
||||
void setupFlowMeter(); //
|
||||
void checkFlow() ;
|
||||
|
||||
void getInfo(); //here we get info like temp etc
|
||||
|
||||
void checkMenu();
|
||||
void pwdKeypadEvent();
|
||||
void menuKeypadEvent();
|
||||
|
||||
int laserEnablePin = 50;
|
||||
int waterCoolerPin = 51;
|
||||
int airAssistPin = 52;
|
||||
int ventilationPin = 53;
|
||||
int lichtPin = 49;
|
||||
//int lichtPin = 48; spare
|
||||
int testEnablePin = 47;
|
||||
int potMeterEnable = 46;
|
||||
|
||||
|
||||
LiquidCrystal lcd(12, 11, 7, 6, 5, 4);
|
||||
int passwordCorrect = false;
|
||||
Password password = Password( "123456" );
|
||||
const byte ROWS = 4; // Four rows
|
||||
const byte COLS = 3; // Three columns
|
||||
|
||||
char keys[ROWS][COLS] = { // Define the Keymap
|
||||
{ '1','2','3' } ,
|
||||
{ '4','5','6' } ,
|
||||
{ '7','8','9' } ,
|
||||
{ '*','0','#' } };
|
||||
|
||||
byte rowPins[ROWS] = { 15, 20, 17, 19 }; // Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
|
||||
byte colPins[COLS] = { 18, 14, 16 }; // Connect keypad COL0, COL1 and COL2 to these Arduino pins.
|
||||
Keypad kpd = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); // Create the Keypad
|
||||
float tempIn;
|
||||
float tempOut;
|
||||
int tempPinIn = 0;
|
||||
int tempPinOut = 0;
|
||||
volatile int pulseCount; //measuring the rising edges of the signal
|
||||
int Calc;
|
||||
int hallsensor = 2; //The pin location of the sensor
|
||||
unsigned long loopTime;
|
||||
|
||||
|
BIN
arduino/SafetyBoard4/.DS_Store
vendored
Normal file
BIN
arduino/SafetyBoard4/.DS_Store
vendored
Normal file
Binary file not shown.
20
arduino/SafetyBoard4/flowMeter.ino
Normal file
20
arduino/SafetyBoard4/flowMeter.ino
Normal file
|
@ -0,0 +1,20 @@
|
|||
//*******************************************************
|
||||
// FlowMeter
|
||||
//*******************************************************
|
||||
void setupFlowMeter() {
|
||||
pinMode(hallsensor, INPUT); //initializes digital pin 2 as an input
|
||||
attachInterrupt(0, pulseCounter, RISING); //and the interrupt is attached
|
||||
loopTime = millis();
|
||||
sei(); //enable interupts
|
||||
}
|
||||
void pulseCounter() { //This is the function that the interupt calls
|
||||
pulseCount++; //This function measures the rising and falling edge of the hall effect sensors signal
|
||||
}
|
||||
void checkFlow() {
|
||||
if(millis() >= (loopTime + 2000)){
|
||||
Calc = (pulseCount * 60 / (7.5 * 2)); //(Pulse frequency x 60) / 7.5Q, = flow rate in L/hour
|
||||
flowMenu();
|
||||
pulseCount = 0;
|
||||
loopTime = millis();; // Updates loopTime
|
||||
}
|
||||
}
|
BIN
arduino/SafetyBoard4/keypad.zip
Normal file
BIN
arduino/SafetyBoard4/keypad.zip
Normal file
Binary file not shown.
106
arduino/SafetyBoard4/menu.ino
Normal file
106
arduino/SafetyBoard4/menu.ino
Normal file
|
@ -0,0 +1,106 @@
|
|||
void firstMenu() {
|
||||
lcd.begin(20, 4); // set up the LCD's number of columns and rows:
|
||||
lcd.clear();
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print("Manfreds lasercutter"); // Print a message to the LCD.
|
||||
lcd.setCursor(0, 1);
|
||||
lcd.print("Password?");
|
||||
lcd.setCursor(0, 2);
|
||||
lcd.print("Press * to confirm");
|
||||
}
|
||||
void menuPasswordReset(){
|
||||
lcd.setCursor(0, 4);
|
||||
lcd.print(" "); //empty "Wrong"
|
||||
}
|
||||
void menuPasswordWrong(){
|
||||
lcd.setCursor(0, 3);
|
||||
lcd.print("Wrong");
|
||||
}
|
||||
void checkMenu() {
|
||||
if (menuType==1) {
|
||||
lcd.setCursor(0,0);
|
||||
lcd.print("Manfreds lasercutter");
|
||||
lcd.setCursor(0,1);
|
||||
lcd.print("press * for choices ");
|
||||
} else {
|
||||
lcd.setCursor(0,0);
|
||||
lcd.print("press * for back ");
|
||||
lcd.setCursor(0,1);
|
||||
lcd.print("1 air-assist 2 vent ");
|
||||
lcd.setCursor(0,2);
|
||||
lcd.print("3 watercool 4 laser ");
|
||||
lcd.setCursor(0,3);
|
||||
lcd.print("6 testmode 0 off 9 on ");
|
||||
}
|
||||
char key = kpd.getKey();
|
||||
}
|
||||
void flowMenu(){
|
||||
if (menuType==1) {
|
||||
lcd.setCursor(0, 3);
|
||||
lcd.print(" Water");
|
||||
lcd.setCursor(11, 3);
|
||||
lcd.print(Calc, DEC); //Prints the number calculated abov
|
||||
lcd.print (" L/h "); //Prints "L/hour" a
|
||||
}
|
||||
}
|
||||
void menuKeypadEvent(KeypadEvent eKey) {
|
||||
switch (kpd.getState()){
|
||||
case PRESSED:
|
||||
switch (eKey){
|
||||
case '*':
|
||||
if (menuType==1) {
|
||||
menuType=2;
|
||||
lcd.clear();
|
||||
} else {
|
||||
menuType = 1;
|
||||
lcd.clear();
|
||||
}
|
||||
break;
|
||||
case '#':
|
||||
password.reset();
|
||||
break;
|
||||
case '9':
|
||||
digitalWrite(airAssistPin, LOW);
|
||||
digitalWrite(ventilationPin, LOW);
|
||||
digitalWrite(waterCoolerPin, LOW);
|
||||
digitalWrite(laserEnablePin, LOW);
|
||||
digitalWrite(lichtPin, LOW); // sets the licht pin (inverted) on
|
||||
digitalWrite(testEnablePin, HIGH); // sets the test enable pin ()
|
||||
digitalWrite(potMeterEnable, HIGH); // sets the watercooler fans on
|
||||
break;
|
||||
case '0':
|
||||
digitalWrite(airAssistPin, HIGH);
|
||||
digitalWrite(ventilationPin, HIGH);
|
||||
digitalWrite(waterCoolerPin, HIGH);
|
||||
digitalWrite(laserEnablePin, HIGH);
|
||||
digitalWrite(lichtPin, HIGH); // sets the licht pin (inverted) on
|
||||
digitalWrite(testEnablePin, HIGH); // sets the test enable pin ()
|
||||
digitalWrite(potMeterEnable, HIGH); // sets the watercooler fans off
|
||||
|
||||
break;
|
||||
case '1':
|
||||
digitalWrite(airAssistPin, !digitalRead(airAssistPin));
|
||||
break;
|
||||
case '2':
|
||||
digitalWrite(ventilationPin, !digitalRead(ventilationPin));
|
||||
break;
|
||||
case '3':
|
||||
digitalWrite(waterCoolerPin, !digitalRead(waterCoolerPin));
|
||||
break;
|
||||
case '4':
|
||||
digitalWrite(laserEnablePin, !digitalRead(laserEnablePin));
|
||||
break;
|
||||
case '5':
|
||||
digitalWrite(lichtPin, !digitalRead(lichtPin));
|
||||
break;
|
||||
case '6':
|
||||
digitalWrite(testEnablePin, !digitalRead(testEnablePin));
|
||||
digitalWrite(potMeterEnable, !digitalRead(potMeterEnable));
|
||||
break;
|
||||
case '7':
|
||||
break;
|
||||
default:
|
||||
password.append(eKey);
|
||||
}
|
||||
}
|
||||
}
|
41
arduino/SafetyBoard4/password.ino
Normal file
41
arduino/SafetyBoard4/password.ino
Normal file
|
@ -0,0 +1,41 @@
|
|||
//#include "safetyboard.h";
|
||||
//******************************************************
|
||||
// Password related stuff
|
||||
//******************************************************
|
||||
//take care of some special events
|
||||
void pwdKeypadEvent(KeypadEvent eKey) {
|
||||
switch (kpd.getState()){
|
||||
case PRESSED:
|
||||
menuPasswordReset();
|
||||
switch (eKey){
|
||||
case '*':
|
||||
checkPassword();
|
||||
break;
|
||||
case '#':
|
||||
password.reset();
|
||||
break;
|
||||
default:
|
||||
password.append(eKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
void checkPassword() {
|
||||
if (password.evaluate()) {
|
||||
Serial.println("Success");
|
||||
lcd.clear();
|
||||
passwordCorrect = true;
|
||||
setupFlowMeter();
|
||||
digitalWrite(airAssistPin, LOW); // sets the airAssist on
|
||||
digitalWrite(ventilationPin, LOW); // sets the air ventilation on
|
||||
digitalWrite(waterCoolerPin, LOW); // sets the watercooler fans on
|
||||
digitalWrite(laserEnablePin, LOW); // sets the watercooler fans on
|
||||
digitalWrite(lichtPin, LOW); // sets the licht pin (inverted) on
|
||||
digitalWrite(powerWH, LOW); // sets the waterpump and high voltage on
|
||||
menuType = 1; // inportant information
|
||||
kpd.addEventListener(menuKeypadEvent); //add an event listener for this keypad
|
||||
} else {
|
||||
Serial.println("Wrong");
|
||||
password.reset();
|
||||
menuPasswordWrong();
|
||||
}
|
||||
}
|
46
arduino/SafetyBoard4/safetyboard.h
Normal file
46
arduino/SafetyBoard4/safetyboard.h
Normal file
|
@ -0,0 +1,46 @@
|
|||
void pulseCounter(); //
|
||||
void setupFlowMeter(); //
|
||||
void checkFlow() ;
|
||||
void flowMenu();
|
||||
void getInfo(); //here we get info like temp etc
|
||||
void checkMenu();
|
||||
void firstMenu();
|
||||
void pwdKeypadEvent();
|
||||
void menuKeypadEvent();
|
||||
void choiceMenu() ;
|
||||
int menuType = 0;
|
||||
|
||||
int potMeterEnable = 46;
|
||||
int testEnablePin = 47;
|
||||
int lichtPin = 49;
|
||||
int laserEnablePin = 50;
|
||||
int waterCoolerPin = 51;
|
||||
int airAssistPin = 52;
|
||||
int ventilationPin = 53;
|
||||
int powerWH = 48;
|
||||
|
||||
LiquidCrystal lcd(12, 11, 7, 6, 5, 4);
|
||||
int passwordCorrect = false;
|
||||
Password password = Password( "123456" );
|
||||
const byte ROWS = 4; // Four rows
|
||||
const byte COLS = 3; // Three columns
|
||||
|
||||
char keys[ROWS][COLS] = { // Define the Keymap
|
||||
{ '1','2','3' } ,
|
||||
{ '4','5','6' } ,
|
||||
{ '7','8','9' } ,
|
||||
{ '*','0','#' } };
|
||||
|
||||
byte rowPins[ROWS] = { 15, 20, 17, 19 }; // Connect keypad ROW0, ROW1, ROW2 and ROW3 to these Arduino pins.
|
||||
byte colPins[COLS] = { 18, 14, 16 }; // Connect keypad COL0, COL1 and COL2 to these Arduino pins.
|
||||
Keypad kpd = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS ); // Create the Keypad
|
||||
float tempIn;
|
||||
float tempOut;
|
||||
int tempPinIn = 0;
|
||||
int tempPinOut = 0;
|
||||
volatile int pulseCount; //measuring the rising edges of the signal
|
||||
int Calc;
|
||||
int hallsensor = 2; //The pin location of the sensor
|
||||
unsigned long loopTime;
|
||||
|
||||
|
36
arduino/SafetyBoard4/safetyboard.ino
Normal file
36
arduino/SafetyBoard4/safetyboard.ino
Normal file
|
@ -0,0 +1,36 @@
|
|||
|
||||
#include <LiquidCrystal.h>
|
||||
#include <Keypad.h>
|
||||
#include <Password.h>
|
||||
#include "safetyboard.h"
|
||||
|
||||
void setup() {
|
||||
pinMode(airAssistPin, OUTPUT); // sets the digital pin as output
|
||||
pinMode(ventilationPin, OUTPUT); // sets the digital pin as output
|
||||
pinMode(waterCoolerPin, OUTPUT); // sets the digital pin as output
|
||||
pinMode(laserEnablePin, OUTPUT); // sets the digital pin as output
|
||||
pinMode(lichtPin, OUTPUT); // sets the digital pin as output
|
||||
pinMode(testEnablePin, OUTPUT); // sets the digital pin as output
|
||||
pinMode(potMeterEnable, OUTPUT); // sets the digital pin as output
|
||||
pinMode(powerWH, OUTPUT); // sets the digital pin as output
|
||||
|
||||
digitalWrite(airAssistPin, HIGH); // sets the airAssist off
|
||||
digitalWrite(ventilationPin, HIGH); // sets the air ventilation off
|
||||
digitalWrite(waterCoolerPin, HIGH); // sets the watercooler off
|
||||
digitalWrite(laserEnablePin, HIGH); // sets the laserEnable off
|
||||
digitalWrite(lichtPin, HIGH); // sets the licht pin (inverted) off
|
||||
digitalWrite(testEnablePin, HIGH); // sets the test enable pin () off
|
||||
digitalWrite(potMeterEnable, HIGH); // sets the watercooler fans off
|
||||
digitalWrite(powerWH, HIGH); // sets the waterpump and high voltage off
|
||||
Serial.begin(9600);
|
||||
firstMenu();
|
||||
kpd.addEventListener(pwdKeypadEvent); //add an event listener for this keypad
|
||||
}
|
||||
void loop() {
|
||||
if (passwordCorrect) {
|
||||
checkMenu();
|
||||
checkFlow();
|
||||
} else {
|
||||
kpd.getKey();
|
||||
}
|
||||
}
|
BIN
arduino/SafetyBoardFinal.zip
Normal file
BIN
arduino/SafetyBoardFinal.zip
Normal file
Binary file not shown.
BIN
arduino/Safetyboard2/safetyboard2.fzz
Normal file
BIN
arduino/Safetyboard2/safetyboard2.fzz
Normal file
Binary file not shown.
BIN
arduino/safety/Keypad.zip
Normal file
BIN
arduino/safety/Keypad.zip
Normal file
Binary file not shown.
BIN
arduino/safety/Password.zip
Normal file
BIN
arduino/safety/Password.zip
Normal file
Binary file not shown.
1996
arduino/safety/klepsafetyswitchplaat.dxf
Normal file
1996
arduino/safety/klepsafetyswitchplaat.dxf
Normal file
File diff suppressed because it is too large
Load diff
104
arduino/safety/menu.txt
Normal file
104
arduino/safety/menu.txt
Normal file
|
@ -0,0 +1,104 @@
|
|||
password
|
||||
password set = false
|
||||
msg "Bitlair Lasercutter"
|
||||
msg "Bitlair Lasercutter"
|
||||
information page
|
||||
* for menu
|
||||
Ready to burn? status
|
||||
watertemp
|
||||
tube in
|
||||
tube out
|
||||
|
||||
menu
|
||||
manual control
|
||||
details
|
||||
waterflow
|
||||
high voltage power status
|
||||
airflow status
|
||||
status laser enable (emergency button)
|
||||
watertemp in tank
|
||||
high voltage power
|
||||
off/on (default on)
|
||||
airflow
|
||||
off/on (default on)
|
||||
|
||||
checks -
|
||||
waterflow
|
||||
watertemp-tube-in > 50° => warning
|
||||
watertemp-tube-in > 60° => turn off
|
||||
|
||||
|
||||
|
||||
pins (renumber to better pins)
|
||||
D05 lcd data1
|
||||
D04 lcd data2
|
||||
D03 lcd data3
|
||||
D02 lcd data4
|
||||
D11 lcd Register Select (RS). RS=0: Command, RS=1: Data
|
||||
D12 lcd Clock (Enable). Falling edge triggered
|
||||
VCC lcd Vcc
|
||||
GND lcd gnd
|
||||
d15 keyb row 1
|
||||
d20 keyb row 2
|
||||
d19 keyb row 3
|
||||
d17 keyb row 4
|
||||
d16 keyb col 1
|
||||
d14 keyb col 2
|
||||
d18 keyb col 3
|
||||
A01 watertemp-tube-in
|
||||
A02 watertemp-tube-in
|
||||
|
||||
/*****************************************/
|
||||
float temp;
|
||||
int tempPin = 0;
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(9600);
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
temp = analogRead(tempPin);
|
||||
temp = temp * 0.48828125;
|
||||
Serial.print("TEMPRATURE = ");
|
||||
Serial.print(temp);
|
||||
Serial.print("*C");
|
||||
Serial.println();
|
||||
delay(1000);
|
||||
}
|
||||
/*******************************************/
|
||||
// reading liquid flow rate using Seeeduino and Water Flow Sensor from Seeedstudio.com
|
||||
// Code adapted by Charles Gantt from PC Fan RPM code written by Crenn @thebestcasescenario.com
|
||||
// http:/themakersworkbench.com http://thebestcasescenario.com http://seeedstudio.com
|
||||
|
||||
volatile int NbTopsFan; //measuring the rising edges of the signal
|
||||
int Calc;
|
||||
int hallsensor = 2; //The pin location of the sensor
|
||||
|
||||
void rpm () //This is the function that the interupt calls
|
||||
{
|
||||
NbTopsFan++; //This function measures the rising and falling edge of the hall effect sensors signal
|
||||
}
|
||||
// The setup() method runs once, when the sketch starts
|
||||
void setup() //
|
||||
{
|
||||
pinMode(hallsensor, INPUT); //initializes digital pin 2 as an input
|
||||
Serial.begin(9600); //This is the setup function where the serial port is
|
||||
|
||||
initialised,
|
||||
attachInterrupt(0, rpm, RISING); //and the interrupt is attached
|
||||
}
|
||||
// the loop() method runs over and over again,
|
||||
// as long as the Arduino has power
|
||||
void loop ()
|
||||
{
|
||||
NbTopsFan = 0; //Set NbTops to 0 ready for calculations
|
||||
sei(); //Enables interrupts
|
||||
delay (1000); //Wait 1 second
|
||||
cli(); //Disable interrupts
|
||||
Calc = (NbTopsFan * 60 / 7.5); //(Pulse frequency x 60) / 7.5Q, = flow rate in L/hour
|
||||
Serial.print (Calc, DEC); //Prints the number calculated above
|
||||
Serial.print (" L/hour\r\n"); //Prints "L/hour" and returns a new line
|
||||
}
|
||||
|
BIN
arduino/safety/now.mjpg
Normal file
BIN
arduino/safety/now.mjpg
Normal file
Binary file not shown.
1970
arduino/safety/scharnierafstandplaat.dxf
Normal file
1970
arduino/safety/scharnierafstandplaat.dxf
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue