-
This commit is contained in:
parent
4f355add20
commit
b17f299211
110
README.md
110
README.md
@ -2,22 +2,54 @@
|
||||
|
||||
## Overview
|
||||
|
||||
This is the Arduino sketch to build a double magnetic stirrer based on 2 fans, a 1602 LCD display, a KY-040 encoder and an Arduino (e.g. Uno, Nano, Leonardo, Pro Micro).
|
||||
This is the Arduino project to build a double magnetic stirrer based on 2 fans, a 1602 LCD display, a KY-040 encoder and an Arduino Nano and a special PCB designed in the Hobbybrauer-Forum.
|
||||
|
||||
V2 supports dual voltage for the fans which increases the speed range.
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/micworg/stir/blob/master/images/stir.jpg" width=500>
|
||||
<img src="https://github.com/micworg/stir2/blob/master/images/stir+pcb.jpg" width=700>
|
||||
</p>
|
||||
|
||||
In order to put the stirrer into operation you have to change the settings in stir.ino according to your setup.
|
||||
|
||||
|
||||
## Part List
|
||||
|
||||
1x PCB "Stir V2.0"
|
||||
1x Arduino Nano V3
|
||||
1x Voltage Regulator TE818 5-24V to 5V 3A Step Down Buck Converter
|
||||
2x Relais Omron G5Q-1-EU 5DC Printrelais 5 V/DC 5A
|
||||
2x Diode 1N4148 Diotec
|
||||
1x Elko 1000µF/16V Yageo SE016M1000B5S-1015
|
||||
2x Diode 1N5822 STMicroelectronics Schottky-Diode
|
||||
4x Metallschicht-Widerstand 10 KOhm 0,6W
|
||||
2x Lüfter BeQuiet SilentWings 3 120mm PWM Highspeed
|
||||
(oder bisher UNGETESTET Noctua NF-R8 Redux-1800 80mm PWM)
|
||||
1x Steckernetzteil 12V-20V DC / 2A
|
||||
1x Einbaubuchse für Steckernetzteil
|
||||
1x I2C 16x2 Arduino LCD Display Module
|
||||
1x Dreh-Encoder KY-040 (mit Mutter und Drehknauf)
|
||||
2x Magnethalterung (3D Druck)
|
||||
4x Neodymmagnet 20x10 mm (N52, 1 oder 2 mm dick)
|
||||
|
||||
|
||||
## Reference
|
||||
|
||||
This project was created based on an idea from the Hobbybrauer-Forum and would not be possible without the ideas from there.
|
||||
This project was created based on an idea from the german Hobbybrauer-Forum and would not be possible without the ideas from there.
|
||||
|
||||
The forum: https://hobbybrauer.de/
|
||||
|
||||
The thread: https://hobbybrauer.de/forum/viewtopic.php?f=21&t=1456
|
||||
|
||||
Special thanks for development and testing:
|
||||
|
||||
* Herbert Schmid
|
||||
* Adrian Sigel
|
||||
* Jens Warkentin
|
||||
* Bastian Werner
|
||||
|
||||
Successor project of: https://github.com/micworg/stir
|
||||
|
||||
## Overview of Functions
|
||||
|
||||
All functions are controlled by the KY-040 encoder:
|
||||
@ -61,8 +93,8 @@ All functions are controlled by the KY-040 encoder:
|
||||
|`PWM2`|PWM output pin for LCD brightness control|
|
||||
|`I0`, `I1`|interrupts for rpm measurement (2 and 3 for Leonardo and ProMicro / 0 and 1 for Uno)|
|
||||
|`CLK`, `DT`, `SW`|pins for KY-040 encoder|
|
||||
|`OFF0`, `OFF1`|these pins will be set if the fan is off|
|
||||
|`OFFSTATE`|off state (LOW/HIGH)|
|
||||
|`R0`, `R0`|voltage select relais pin|
|
||||
|`RTHRES`|voltage switch threshold (rpm)|
|
||||
|`RINTERVAL`|regulation interval (ms)|
|
||||
|`RDELAY`|extra regulation delay when value changes (ms)|
|
||||
|`RTOL`|regulation tolerance (rpm)|
|
||||
@ -73,71 +105,3 @@ All functions are controlled by the KY-040 encoder:
|
||||
|`SAVEDELAY`|delay in seconds before parameter will be saved to EEPROM|
|
||||
|`LCDB`|LCD brightness steps (10 values, 0=off, 255=max)|
|
||||
|
||||
## API commands
|
||||
|
||||
Commands are colon separated an can be send via USB/Serial
|
||||
|
||||
|Command|Description|
|
||||
|:------|:----------|
|
||||
|`info`|returns a colon separated string with all parameters (see below)|
|
||||
|`version`|returns the software version|
|
||||
|`on:<0/1>`|switch stirren on|
|
||||
|`off:<0/1>`|switch stirren off|
|
||||
|`bon:<0/1>`|switch boost mode on|
|
||||
|`boff:<0/1>`|switch boost mode off|
|
||||
|`speed:<0/1>:<rpm>`|set stirrer speed (FANMIN-FANMAX rpm)|
|
||||
|`bspeed:<0/1>:<rpm>`|set stirrer boost speed (speed-FANMAX rpm)|
|
||||
|`btime:<0/1>:<min>`|set boost time (0-60)|
|
||||
|`con:<0/1>`|switch catch mode on|
|
||||
|`coff:<0/1>`|switch catch mode off|
|
||||
|`ctime:<0/1>:<min>`|set catch mode interval (60-240 min)|
|
||||
|`rtime:<0/1>:<sec>`|set speed rise time (0-240 sec)|
|
||||
|`rnval:<0/1>:<rpm>`|set randon value range (0-1000 rpm)|
|
||||
|`otime:<0/1>:<hour>`|switch stirrer off after time in hours (1-99 hour, 0 deactivates switch off)|
|
||||
|
||||
All commands return a colon separated string with all current parameters:
|
||||
|
||||
|Element|Stirrer|Variable in stir.ino|Description|
|
||||
|:------|:------|:-------------------|:----------|
|
||||
| 0|0|`F[0]` |state (0=on, 1=off)|
|
||||
| 1|0|`v[0]` |speed (rpm)|
|
||||
| 2|0|`b[0]` |boost speed (rpm)|
|
||||
| 3|0|`rpm[0]` |rpm|
|
||||
| 4|0|`xpm[0]` |averaged rpm|
|
||||
| 5|0|`r[0]` |regulation value|
|
||||
| 6|0|`bstate[0]`|boost state (0=on, 1=off)|
|
||||
| 7|0|`btime[0]` |boost time (min)|
|
||||
| 8|0|`cat[0]` |fish catch mode state (0=on, 1=off)|
|
||||
| 9|0|`ctime[0]` |fish catch time interval (min)|
|
||||
|10|0|`rtime[0]` |speed rise time (sec)|
|
||||
|11|0|`otime[0]` |switch off time (hour)|
|
||||
|12|0|`rnval[0]` |random value range (rpm)|
|
||||
|13|0|`rnd[0]` |current random value (rpm)|
|
||||
|14|0| |boost remain (sec)|
|
||||
|15|0| |off timer remain (sec)|
|
||||
|16|1|`F[1]` |state (0=on, 1=off)|
|
||||
|17|1|`v[1]` |speed (rpm)|
|
||||
|18|1|`b[1]` |boost speed (rpm)|
|
||||
|19|1|`rpm[1]` |rpm|
|
||||
|20|1|`xpm[1]` |averaged rpm|
|
||||
|21|1|`r[1]` |regulation value|
|
||||
|22|1|`bstate[1]`|boost state (0=on, 1=off)|
|
||||
|23|1|`btime[1]` |boost time (min)|
|
||||
|24|1|`cat[1]` |fish catch mode state (0=on, 1=off)|
|
||||
|25|1|`ctime[1]` |fish catch time interval (min)|
|
||||
|26|1|`rtime[1]` |speed rise time (sec)|
|
||||
|27|1|`otime[1]` |switch off time (hour)|
|
||||
|28|1|`rnval[1]` |random value range (rpm)|
|
||||
|29|1|`rnd[1]` |current random value (rpm)|
|
||||
|30|1| |boost remain (sec)|
|
||||
|31|1| |off timer remain (sec)|
|
||||
|32| | |software version|
|
||||
|33| | |uptime (ms)|
|
||||
|34| | |0=ok, 1=error|
|
||||
|
||||
## Schematics
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/micworg/stir/blob/master/images/schematic_leonardo.png" width=500>
|
||||
<img src="https://github.com/micworg/stir/blob/master/images/schematic_uno.png" width=500>
|
||||
</p>
|
||||
|
143
V1/README.md
Normal file
143
V1/README.md
Normal file
@ -0,0 +1,143 @@
|
||||
# Dual magnetic stir controller
|
||||
|
||||
## Overview
|
||||
|
||||
This is the Arduino sketch to build a double magnetic stirrer based on 2 fans, a 1602 LCD display, a KY-040 encoder and an Arduino (e.g. Uno, Nano, Leonardo, Pro Micro).
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/micworg/stir/blob/master/images/stir.jpg" width=500>
|
||||
</p>
|
||||
|
||||
In order to put the stirrer into operation you have to change the settings in stir.ino according to your setup.
|
||||
|
||||
## Reference
|
||||
|
||||
This project was created based on an idea from the Hobbybrauer-Forum and would not be possible without the ideas from there.
|
||||
|
||||
The forum: https://hobbybrauer.de/
|
||||
|
||||
The thread: https://hobbybrauer.de/forum/viewtopic.php?f=21&t=1456
|
||||
|
||||
## Overview of Functions
|
||||
|
||||
All functions are controlled by the KY-040 encoder:
|
||||
|
||||
* **Short Press:** change between menu, stirrer 1 and stirrer 2
|
||||
* **Turn when menu is selected**: change between menu items (SPEED, BOOST, BTIME, CATCH, CTIME)
|
||||
* **Long press when menu is selected**: lock all functions (unlock also by long press)
|
||||
* **When a stirrer is selected**:
|
||||
* **SPEED**: turn sets speed, long press switches stirrer on or off.
|
||||
* **BOOST**: turn sets boost speed, long press activates/deactivates the boost function (running time is shown in the display).
|
||||
* **BTIME**: turn changes the boost time in minutes.
|
||||
* **CATCH**: turn activates/deactivates the fishing function
|
||||
* **CTIME**: turn changes the interval in minutes for the fish catching function
|
||||
* **RTIME**: turn changes speed rise time in seconds (applies to power on, stirrer on, boost on and fish catching)
|
||||
* **OTIME**: turn changes switch off time in hours (the timer activates immediately, 0 = switch off disabled)
|
||||
* **RNVAL**: random value range (a random values in this range will be added to speed)
|
||||
* **Other menu options**:
|
||||
* **BRGHT**: LCD brightness
|
||||
|
||||
## Display Indicators:
|
||||
|
||||
* **Bottom Left**: Menu
|
||||
* **Bottom Center/Right**: displays the set values for the stirrers depending on the selected menu item.
|
||||
* **Top Center/Right**: displays the current stirrer speed (or 'OFF' or 'CAT' (Fishing)).
|
||||
* **Top Left**: shows the remaining time of the boost or switch off function.
|
||||
|
||||
## Settings (in stir.ino)
|
||||
|
||||
|Value|Description|
|
||||
|:----|:----------|
|
||||
|`SPEEDINC`|increment of speed values when turning the encoder|
|
||||
|`FANMIN`|fan minimum speed (should be a value at which the fan runs safely) (rpm)|
|
||||
|`FANMAX`|maximum speed of the fan (it is important that this is the real maximum value of the fan) (rpm)|
|
||||
|`BOFF`|if set boost off will also turn the normal mode off|
|
||||
|`BINC`|boost time increment (min)|
|
||||
|`CINC`|catch time increment (min)|
|
||||
|`RINC`|rise time increment (sec)|
|
||||
|`OINC`|off timer increment (hour)|
|
||||
|`CATCHSTOP`|stop interval for stir fish catch function (ms)|
|
||||
|`PWM0`, `PWM1`|PWM output pins for fan speed|
|
||||
|`PWM2`|PWM output pin for LCD brightness control|
|
||||
|`I0`, `I1`|interrupts for rpm measurement (2 and 3 for Leonardo and ProMicro / 0 and 1 for Uno)|
|
||||
|`CLK`, `DT`, `SW`|pins for KY-040 encoder|
|
||||
|`OFF0`, `OFF1`|these pins will be set if the fan is off|
|
||||
|`OFFSTATE`|off state (LOW/HIGH)|
|
||||
|`RINTERVAL`|regulation interval (ms)|
|
||||
|`RDELAY`|extra regulation delay when value changes (ms)|
|
||||
|`RTOL`|regulation tolerance (rpm)|
|
||||
|`RNDINTERVL`|randon value range change interval (ms)|
|
||||
|`SINTERVAL`|speed measurement interval (ms)|
|
||||
|`SAVERAGE`|speed measurement average|
|
||||
|`SAVETAG`|parameter save identifier|
|
||||
|`SAVEDELAY`|delay in seconds before parameter will be saved to EEPROM|
|
||||
|`LCDB`|LCD brightness steps (10 values, 0=off, 255=max)|
|
||||
|
||||
## API commands
|
||||
|
||||
Commands are colon separated an can be send via USB/Serial
|
||||
|
||||
|Command|Description|
|
||||
|:------|:----------|
|
||||
|`info`|returns a colon separated string with all parameters (see below)|
|
||||
|`version`|returns the software version|
|
||||
|`on:<0/1>`|switch stirren on|
|
||||
|`off:<0/1>`|switch stirren off|
|
||||
|`bon:<0/1>`|switch boost mode on|
|
||||
|`boff:<0/1>`|switch boost mode off|
|
||||
|`speed:<0/1>:<rpm>`|set stirrer speed (FANMIN-FANMAX rpm)|
|
||||
|`bspeed:<0/1>:<rpm>`|set stirrer boost speed (speed-FANMAX rpm)|
|
||||
|`btime:<0/1>:<min>`|set boost time (0-60)|
|
||||
|`con:<0/1>`|switch catch mode on|
|
||||
|`coff:<0/1>`|switch catch mode off|
|
||||
|`ctime:<0/1>:<min>`|set catch mode interval (60-240 min)|
|
||||
|`rtime:<0/1>:<sec>`|set speed rise time (0-240 sec)|
|
||||
|`rnval:<0/1>:<rpm>`|set randon value range (0-1000 rpm)|
|
||||
|`otime:<0/1>:<hour>`|switch stirrer off after time in hours (1-99 hour, 0 deactivates switch off)|
|
||||
|
||||
All commands return a colon separated string with all current parameters:
|
||||
|
||||
|Element|Stirrer|Variable in stir.ino|Description|
|
||||
|:------|:------|:-------------------|:----------|
|
||||
| 0|0|`F[0]` |state (0=on, 1=off)|
|
||||
| 1|0|`v[0]` |speed (rpm)|
|
||||
| 2|0|`b[0]` |boost speed (rpm)|
|
||||
| 3|0|`rpm[0]` |rpm|
|
||||
| 4|0|`xpm[0]` |averaged rpm|
|
||||
| 5|0|`r[0]` |regulation value|
|
||||
| 6|0|`bstate[0]`|boost state (0=on, 1=off)|
|
||||
| 7|0|`btime[0]` |boost time (min)|
|
||||
| 8|0|`cat[0]` |fish catch mode state (0=on, 1=off)|
|
||||
| 9|0|`ctime[0]` |fish catch time interval (min)|
|
||||
|10|0|`rtime[0]` |speed rise time (sec)|
|
||||
|11|0|`otime[0]` |switch off time (hour)|
|
||||
|12|0|`rnval[0]` |random value range (rpm)|
|
||||
|13|0|`rnd[0]` |current random value (rpm)|
|
||||
|14|0| |boost remain (sec)|
|
||||
|15|0| |off timer remain (sec)|
|
||||
|16|1|`F[1]` |state (0=on, 1=off)|
|
||||
|17|1|`v[1]` |speed (rpm)|
|
||||
|18|1|`b[1]` |boost speed (rpm)|
|
||||
|19|1|`rpm[1]` |rpm|
|
||||
|20|1|`xpm[1]` |averaged rpm|
|
||||
|21|1|`r[1]` |regulation value|
|
||||
|22|1|`bstate[1]`|boost state (0=on, 1=off)|
|
||||
|23|1|`btime[1]` |boost time (min)|
|
||||
|24|1|`cat[1]` |fish catch mode state (0=on, 1=off)|
|
||||
|25|1|`ctime[1]` |fish catch time interval (min)|
|
||||
|26|1|`rtime[1]` |speed rise time (sec)|
|
||||
|27|1|`otime[1]` |switch off time (hour)|
|
||||
|28|1|`rnval[1]` |random value range (rpm)|
|
||||
|29|1|`rnd[1]` |current random value (rpm)|
|
||||
|30|1| |boost remain (sec)|
|
||||
|31|1| |off timer remain (sec)|
|
||||
|32| | |software version|
|
||||
|33| | |uptime (ms)|
|
||||
|34| | |0=ok, 1=error|
|
||||
|
||||
## Schematics
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/micworg/stir/blob/master/images/schematic_leonardo.png" width=500>
|
||||
<img src="https://github.com/micworg/stir/blob/master/images/schematic_uno.png" width=500>
|
||||
</p>
|
BIN
cad/.DS_Store
vendored
Normal file
BIN
cad/.DS_Store
vendored
Normal file
Binary file not shown.
@ -1,52 +0,0 @@
|
||||
$fn=128;
|
||||
|
||||
g = 10; // magnet gap
|
||||
|
||||
fw = 48.3; // fan width
|
||||
|
||||
h = 4; // base height
|
||||
r = 5; // edge width
|
||||
|
||||
pn = 7; // number of pins
|
||||
ph = 7; // pin height
|
||||
pa = 20; // pin angle
|
||||
|
||||
mw = 10.25; // magnet width
|
||||
ml = 20.25; // magnet length
|
||||
mb = 17; // magnet bar width
|
||||
|
||||
d=fw+r+r; // total diameter
|
||||
cl=d-r; // magnet bar length
|
||||
a=360/pn; // segment angle
|
||||
e=(d+g-10)/d; // elliptic scale factor
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
difference() {
|
||||
union() {
|
||||
translate([0,0,0]) cylinder(h+ph,d/2,d/2);
|
||||
translate([0,0,0]) scale([e, 1, 1]) cylinder(h,d/2,d/2);
|
||||
}
|
||||
translate([0,0,-1]) cylinder(h+ph+2,d/2-r,d/2-r);
|
||||
for (i =[0:1:pn-1]) {
|
||||
pin(a*i);
|
||||
}
|
||||
}
|
||||
translate([-cl/2,-mb/2,0]) cube([cl,mb,h]);
|
||||
rotate ([0,0,90]) translate([-cl/2,-(mb-mw)/4-d/7,0]) cube([cl,(mb-mw)/2,h]);
|
||||
rotate ([0,0,90]) translate([-cl/2,-(mb-mw)/4+d/7,0]) cube([cl,(mb-mw)/2,h]);
|
||||
}
|
||||
translate([-ml-g/2,-mw/2,-1]) cube([ml,mw,h]);
|
||||
translate([g/2,-mw/2,-1]) cube([ml,mw,h]);
|
||||
}
|
||||
|
||||
module pin(r) {
|
||||
translate([0,0,0.01]) rotate([0,0,r]) hull() {
|
||||
translate([0,0,h]) cylinder(h+ph,0.1,0.1);
|
||||
translate([-d,0,h]) cylinder(h+ph,0.1,0.1);
|
||||
rotate ([0,0,a-pa])union() {
|
||||
translate([0,0,h]) cylinder(h+ph,0.1,0.1);
|
||||
translate([-d,0,h]) cylinder(h+ph,0.1,0.1);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
# CAD Files
|
||||
|
||||
CAD files for 3D printed magnet holder. Compatible for magnets with size 20x10x5 mm and
|
||||
*be quiet! Silent Wings 3 140 mm* fans.
|
||||
CAD files for 3D printed magnet moun. Compatible for magnets with size 20x10x5 mm and
|
||||
*be quiet! Silent Wings 3 120/140 mm* fans.
|
||||
|
||||
<p align="center">
|
||||
<img src="https://github.com/micworg/stir/blob/master/images/magnetmount.jpg" width=500>
|
57
cad/magnetmount/magnetmount.scad
Normal file
57
cad/magnetmount/magnetmount.scad
Normal file
@ -0,0 +1,57 @@
|
||||
/// magnet mount for for magnets with size 20x10x5 mm and be quiet! Silent Wings 3 120/140 mm fans
|
||||
|
||||
$fn=128;
|
||||
|
||||
g = 10; // magnet gap
|
||||
fan = 120; // fan size (120 or 140)
|
||||
|
||||
h = 4; // base height
|
||||
r = 5; // edge width
|
||||
|
||||
pn = 7; // number of pins
|
||||
ph = 7; // pin height
|
||||
pa = 20; // pin angle
|
||||
|
||||
mw = 10.25; // magnet width
|
||||
ml = 20.25; // magnet length
|
||||
mb = 17; // magnet bar width
|
||||
|
||||
fw= fan==140 ? 48.3 : 42.5; // fan center width
|
||||
eo= fan==140 ? 10 : 5; // elliptic extra offset
|
||||
|
||||
d=fw+r+r; // total diameter
|
||||
cl=d-r; // magnet bar length
|
||||
a=360/pn; // segment angle
|
||||
e=(d+g-eo)/d; // elliptic scale factor
|
||||
|
||||
|
||||
difference() {
|
||||
union() {
|
||||
difference() {
|
||||
union() {
|
||||
translate([0,0,0]) cylinder(h+ph,d/2,d/2);
|
||||
translate([0,0,0]) scale([e, 1, 1]) cylinder(h,d/2,d/2);
|
||||
}
|
||||
translate([0,0,-1]) cylinder(h+ph+2,d/2-r,d/2-r);
|
||||
for (i =[0:1:pn-1]) {
|
||||
pin(a*i);
|
||||
}
|
||||
}
|
||||
translate([-cl/2,-mb/2,0]) cube([cl,mb,h]);
|
||||
rotate ([0,0,90]) translate([-cl/2,-(mb-mw)/4-d/7,0]) cube([cl,(mb-mw)/2,h]);
|
||||
rotate ([0,0,90]) translate([-cl/2,-(mb-mw)/4+d/7,0]) cube([cl,(mb-mw)/2,h]);
|
||||
}
|
||||
translate([-ml-g/2,-mw/2,-1]) cube([ml,mw,h]);
|
||||
translate([g/2,-mw/2,-1]) cube([ml,mw,h]);
|
||||
}
|
||||
|
||||
module pin(r) {
|
||||
translate([0,0,0.01]) rotate([0,0,r]) hull() {
|
||||
translate([0,0,h]) cylinder(h+ph,0.1,0.1);
|
||||
translate([-d,0,h]) cylinder(h+ph,0.1,0.1);
|
||||
rotate ([0,0,a-pa])union() {
|
||||
translate([0,0,h]) cylinder(h+ph,0.1,0.1);
|
||||
translate([-d,0,h]) cylinder(h+ph,0.1,0.1);
|
||||
}
|
||||
}
|
||||
}
|
12434
cad/magnetmount/magnetmount120x10.stl
Normal file
12434
cad/magnetmount/magnetmount120x10.stl
Normal file
File diff suppressed because it is too large
Load Diff
12434
cad/magnetmount/magnetmount120x20.stl
Normal file
12434
cad/magnetmount/magnetmount120x20.stl
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
BIN
images/pcb_top.jpg
Normal file
BIN
images/pcb_top.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 111 KiB |
BIN
images/stir+pcb.jpg
Normal file
BIN
images/stir+pcb.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 295 KiB |
Loading…
Reference in New Issue
Block a user