Skip to main content

Steps

danger

¡UPDATE FOR PH CONTROL 18042022!

We create a compact way to describe a set of instruction

Flags:

  • 0 : PID
  • 1 : Stepper
  • 2 : OUT1
  • 3 : OUT2
  • 4 : OUT3
  • 5 : OUT4
BITPARAM_STATUSCOMMENT
0PIDenable/disable heating
1Stepperenable/disable agitation control
2OUTPUT 1enable/disable output 1
3OUTPUT 2enable/disable output 2
4OUTPUT 3enable/disable output 3
5OUTPUT 4enable/disable output 4

Actions

0xxxx yyy yyyy yyyy

xxxxAction
00000Do nothing
10001Wait in minutes
20010Wait in hours
30011Wait for weight reduction to yy grams
40100Wait for weight increase to yy grams
50101Wait for temperature change (continue if delta < yyy °C/100)
81000Set all the flags

Change parameters

1xxxx yyy yyyy yyyy

  • xxxx the parameter (0 -> 15)
    • 4: Target temperature (in °C)
  • yyy yyyy yyyy: the new value (0 to 2047)

Example

Using two peristaltic pumps to remove bacteria and add fresh media

StepInstructionExplanation
00 1000 000 0000 0011 (16387)Stepper: on, PID: on
10 0010 000 0001 1000 (4120)Wait 1 day (24 h)
20 1000 000 0000 0000 (16384)Stepper: off, PID: off
30 0001 000 0001 1110 (2078)Wait 30 min
40 1000 000 0000 0100 (16388)OUT1: on
50 0011 000 0001 1110 (6174)Weight reduction 30%
60 1000 000 0000 1011 (16395)OUT2: on, Stepper: on, PID: on
70 0100 000 0110 0100 (8292)Weight increase 100%
8-150 0000 000 0000 0000 (0)Do nothing

Changing temperature and turning on / off a light (on IO3). We simulate a day / night cycle

StepInstructionExplanation
00 1000 000 0001 0011 (16403)IO3: on, Stepper: on, PID: on
11 0000 000 0010 1000 (32808)Set target temperature to 40°C
20 0010 000 0000 1100 (4108)Wait 12h
30 1000 000 0000 0011 (16387)IO3: off, Stepper: on, PID: on
41 0000 000 0001 1110 (32798)Set target temperature to 30°C
50 0010 000 0000 1100 (4108)Wait 12h
6-150 0000 000 0000 0000 (0)Do nothing