Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MarlinKimbra
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
MarlinKimbra
Commits
cbd83075
Commit
cbd83075
authored
May 13, 2016
by
Franco (nextime) Lanza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add configurations for flowmeter
parent
c8f7db18
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
112 additions
and
2 deletions
+112
-2
Configuration_Feature.h
...mentation/Laser/K40_ramps_configs/Configuration_Feature.h
+20
-0
Configuration_Feature.h
MK/Configuration_Feature.h
+23
-0
Configuration_Pins.h
MK/Configuration_Pins.h
+4
-0
flowmeter.cpp
MK/module/flowmeter/flowmeter.cpp
+27
-2
flowmeter.h
MK/module/flowmeter/flowmeter.h
+34
-0
sanitycheck.h
MK/module/sanitycheck.h
+4
-0
No files found.
Documentation/Laser/K40_ramps_configs/Configuration_Feature.h
View file @
cbd83075
...
@@ -1061,6 +1061,26 @@
...
@@ -1061,6 +1061,26 @@
#define FILAMENT_RUNOUT_SCRIPT "M600" // Script execute when filament run out
#define FILAMENT_RUNOUT_SCRIPT "M600" // Script execute when filament run out
/**********************************************************************************/
/**********************************************************************************/
/**************************************************************************
****************************** Flow sensor *******************************
**************************************************************************
* *
* Flow sensors for water circulators, usefull in case of coolers using *
* water or other liquid as heat vector *
* *
* Uncomment FLOWMETER_SENSOR to enable this feature *
* You also need to set FLOWMETER_PIN in Configurations_pins.h *
* *
**************************************************************************/
#define FLOMETER_SENSOR
#define FLOWMETER_MAXFLOW 6 // Liters per minute max
#define FLOWMETER_MAXFREQ 55 // frequency of pulses at max flow
// uncomment this to kill print job under the min flow rate, in liters/minute
#define MINFLOW_PROTECTION 4
/**************************************************************************
/**************************************************************************
*********************** Power consumption sensor *************************
*********************** Power consumption sensor *************************
...
...
MK/Configuration_Feature.h
View file @
cbd83075
...
@@ -115,6 +115,7 @@
...
@@ -115,6 +115,7 @@
***********************************************************************/
***********************************************************************/
//#define HOTEND_WATTS (12.0*12.0/6.7) // P=I^2/R
//#define HOTEND_WATTS (12.0*12.0/6.7) // P=I^2/R
//#define BED_WATTS (12.0*12.0/1.1) // P=I^2/R
//#define BED_WATTS (12.0*12.0/1.1) // P=I^2/R
//#define COOLER_WATTS 52 // Commonly available TEC wattage
/***********************************************************************/
/***********************************************************************/
...
@@ -1062,6 +1063,28 @@
...
@@ -1062,6 +1063,28 @@
/**********************************************************************************/
/**********************************************************************************/
/**************************************************************************
****************************** Flow sensor *******************************
**************************************************************************
* *
* Flow sensors for water circulators, usefull in case of coolers using *
* water or other liquid as heat vector *
* *
* Uncomment FLOWMETER_SENSOR to enable this feature *
* You also need to set FLOWMETER_PIN in Configurations_pins.h *
* *
**************************************************************************/
//#define FLOMETER_SENSOR
#define FLOWMETER_MAXFLOW 6.0 // Liters per minute max
#define FLOWMETER_MAXFREQ 55 // frequency of pulses at max flow
// uncomment this to kill print job under the min flow rate, in liters/minute
//#define MINFLOW_PROTECTION 4
/**************************************************************************
/**************************************************************************
*********************** Power consumption sensor *************************
*********************** Power consumption sensor *************************
**************************************************************************
**************************************************************************
...
...
MK/Configuration_Pins.h
View file @
cbd83075
...
@@ -140,6 +140,10 @@
...
@@ -140,6 +140,10 @@
#define FILWIDTH_PIN -1
#define FILWIDTH_PIN -1
#endif
#endif
#if ENABLED(FLOWMETER_SENSOR)
#define FLOWMETER_PIN -1
#endif
#if ENABLED(POWER_CONSUMPTION)
#if ENABLED(POWER_CONSUMPTION)
#define POWER_CONSUMPTION_PIN -1
#define POWER_CONSUMPTION_PIN -1
#endif
#endif
...
...
MK/module/flowmeter/flowmeter.cpp
View file @
cbd83075
/*
flowmeter.cpp - Flowmeter control library for Arduino - Version 1
Copyright (c) 2016 Franco (nextime) Lanza. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "../../base.h"
#include <Arduino.h>
#if ENABLED(FLOWMETER_SENSOR)
volatile
byte
flowrate_pulsecount
;
volatile
byte
flowrate_pulsecount
;
float
flowrate
;
float
flowrate
;
unsigned
int
flowml
;
unsigned
int
flowml
;
...
@@ -24,7 +49,7 @@ void flowrate_manage() {
...
@@ -24,7 +49,7 @@ void flowrate_manage() {
flowml
=
(
flowrate
/
60
)
*
1000
;
flowml
=
(
flowrate
/
60
)
*
1000
;
pulseCount
=
0
;
pulseCount
=
0
;
attachInterrupt
(
FLOWMETER_INTERRUPT
,
flowrate_pulsecounter
,
,
FALLING
);
attachInterrupt
(
FLOWMETER_INTERRUPT
,
flowrate_pulsecounter
,
FALLING
);
}
}
}
}
...
@@ -35,5 +60,5 @@ void flowrate_pulsecounter()
...
@@ -35,5 +60,5 @@ void flowrate_pulsecounter()
flowrate_pulsecount
++
;
flowrate_pulsecount
++
;
}
}
#endif // FLOWMETER_SENSOR
MK/module/flowmeter/flowmeter.h
View file @
cbd83075
/*
flowmeter.h - Flowmeter control library for Arduino - Version 1
Copyright (c) 2016 Franco (nextime) Lanza. All right reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef FLOWMETER_H
#define FLOWMETER_H
#include <inttypes.h>
#include "../../base.h"
#define FLOWMETER_CALIBRATION (FLOWMETER_MAXFREQ/FLOWETER_MAXFLOW)
#if ENABLED(FLOWMETER_SENSOR)
void
flowrate_manage
();
#endif // FLOWMETER_SENSOR
#endif // FLOWMETER_H
MK/module/sanitycheck.h
View file @
cbd83075
...
@@ -1844,6 +1844,10 @@
...
@@ -1844,6 +1844,10 @@
#error DEPENDENCY ERROR: You have to set FILWIDTH_PIN to a valid pin if you enable FILAMENT_SENSOR
#error DEPENDENCY ERROR: You have to set FILWIDTH_PIN to a valid pin if you enable FILAMENT_SENSOR
#endif
#endif
#if ENABLED(FILAMENT_SENSOR) && !PIN_EXISTS(FLOWMETER)
#error DEPENDENCY ERROR: You have to set FLOWMETER_PIN to a valid pin if you enable FLOWMETER_SENSOR
#endif
#if ENABLED(POWER_CONSUMPTION) && !PIN_EXISTS(POWER_CONSUMPTION)
#if ENABLED(POWER_CONSUMPTION) && !PIN_EXISTS(POWER_CONSUMPTION)
#error DEPENDENCY ERROR: You have to set POWER_CONSUMPTION_PIN to a valid pin if you enable POWER_CONSUMPTION
#error DEPENDENCY ERROR: You have to set POWER_CONSUMPTION_PIN to a valid pin if you enable POWER_CONSUMPTION
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment