Post by 3DMS on Nov 4, 2015 21:06:00 GMT
Firmware on Github
Official Scalar 3D printer marlin firmware is available on Git hub on a special fork:
github.com/Nutz95/Marlin
On the Tags list, select "Scalar_V1.0.0.24082015"
The main features are:
- Auto bed leveling
- MQ2 gaz/smoke detector support
- Thermal Runaway protection for both heatbeds and hot end.
- Saving to EEPROM is also enabled
Scalar profiles for XL and M models are available inside sub folders "example_configurations/Scalar"
How to enable Smoke detector module:
Special profiles with the feature enabled are already available for Scalar Family printers.
At the bottom of "configuration.h", you will see the following part:
//#define MQ2_GAZ_DETECTOR // Enables MQ 2 Gaz detector functionality,
//If nothing is connected it might trigger some alarm in digital mode.
//Verbose mode enables a lot of messages on the output serial console
// you might need to enable it to adjust the Trigger alarm level if you feel that the default value is too low/high
#define MQ2_VERBOSE // Enabled verbose output on serial output
#ifdef MQ2_GAZ_DETECTOR
#define MQ2_PIN 57 //the default analog pin A3/D57 from AUX 1 connector from RAMPS 1.4 (see your board schematic if you are using another board type)
//#define USE_ANALOG_MODE // Enables Analog mode : Enable this flag in order to use the anolog pin output of the module. It will use MQ2_PIN as analog input so make sure it's compatible (default pint A3/D57 is compatible on both mode)
#define INVERT_DIGITAL_SIGNAL // (Digital Mode only) by default MQ2 detector signal is inverted; HIGHT when normal and LOW when detection is triggered
#define MQ2_ALARM_TRIGGER_LEVEL_PPM 10 // (Analog Mode only) This value sets up the Detection level of the sensor. 10 seems to be a good starting point but you might want it to be a little bit more sensitive
// MQ2_SMOKE_CONFIRM_COUNT value gives you the amount sensor configmation readings that will be perfomed before aknowledging a smoke detection error.
//whren the senro reads a value above the trigger level, it will perfom MQ2_SMOKE_CONFIRM_COUNT additional readings and check if they are also above the trigger level.
// if it is confirmed then the error will be triggered.
// this is used to qvoid false positive
due to printing environement ; power voltage variation, sensor vibration, air flow change on sensor, etc...
#define MQ2_SMOKE_CONFIRM_COUNT 3
//The following parameter allows to use the LCD in order to display warning
#define MQ2_ENABLE_LCD_WARNING // enable this to allow WARNINGS on LCD
#ifdef MQ2_ENABLE_LCD_WARNING // don't touche this flag
#define MQ2_ENABLE_WARNING_BEEP // Enable this flag to allow beep warnings from your LCD (tested with LCD 2004)
#ifdef MQ2_ENABLE_WARNING_BEEP // don't touche this flag
#define MQ2_WARNING_BEEP_SPACING 100 // Change this value to change the beep spacings. you can set it to 0 for max speed
#endif
#define MQ2_ENABLE_LCD_WARNING_BLINK // enable this flag if you want the LCD to blink on warning
#endif
#endif
//If nothing is connected it might trigger some alarm in digital mode.
//Verbose mode enables a lot of messages on the output serial console
// you might need to enable it to adjust the Trigger alarm level if you feel that the default value is too low/high
#define MQ2_VERBOSE // Enabled verbose output on serial output
#ifdef MQ2_GAZ_DETECTOR
#define MQ2_PIN 57 //the default analog pin A3/D57 from AUX 1 connector from RAMPS 1.4 (see your board schematic if you are using another board type)
//#define USE_ANALOG_MODE // Enables Analog mode : Enable this flag in order to use the anolog pin output of the module. It will use MQ2_PIN as analog input so make sure it's compatible (default pint A3/D57 is compatible on both mode)
#define INVERT_DIGITAL_SIGNAL // (Digital Mode only) by default MQ2 detector signal is inverted; HIGHT when normal and LOW when detection is triggered
#define MQ2_ALARM_TRIGGER_LEVEL_PPM 10 // (Analog Mode only) This value sets up the Detection level of the sensor. 10 seems to be a good starting point but you might want it to be a little bit more sensitive
// MQ2_SMOKE_CONFIRM_COUNT value gives you the amount sensor configmation readings that will be perfomed before aknowledging a smoke detection error.
//whren the senro reads a value above the trigger level, it will perfom MQ2_SMOKE_CONFIRM_COUNT additional readings and check if they are also above the trigger level.
// if it is confirmed then the error will be triggered.
// this is used to qvoid false positive
due to printing environement ; power voltage variation, sensor vibration, air flow change on sensor, etc...
#define MQ2_SMOKE_CONFIRM_COUNT 3
//The following parameter allows to use the LCD in order to display warning
#define MQ2_ENABLE_LCD_WARNING // enable this to allow WARNINGS on LCD
#ifdef MQ2_ENABLE_LCD_WARNING // don't touche this flag
#define MQ2_ENABLE_WARNING_BEEP // Enable this flag to allow beep warnings from your LCD (tested with LCD 2004)
#ifdef MQ2_ENABLE_WARNING_BEEP // don't touche this flag
#define MQ2_WARNING_BEEP_SPACING 100 // Change this value to change the beep spacings. you can set it to 0 for max speed
#endif
#define MQ2_ENABLE_LCD_WARNING_BLINK // enable this flag if you want the LCD to blink on warning
#endif
#endif
Enable/Disable the feature
To enable/disable the feature you need to uncomment/comment the line "#define MQ2_GAZ_DETECTOR"
Verbose Mode
When uncommented (#define MQ2_VERBOSE) the module will generate some console information that you will see appearing if you are using a 3rd party host software.
You will see some messages when the sensor module is triggered.
In analog mode, the sensor will send some messages about the detected level of smoke/gas. It will help you to adjust the analog Trigger level PPM.
The pin to use
With Ramps 1.4, the default pin is Pin 57 which correspond on the diagram to the Aux 1 A3/D57 pin
In Analog mode, this pin is used as Analog input.
In Digital mode, this pin is used as digital input and the trigger level is adjusted directly on the smoke sensor trim.
Tweak detection sensitivity and avoid false alarms
In addition to the Trim on the Sensor module, sometimes the sensor output might trigger for no visible reason stopping your print.
Possible triggers might be vibrations, power voltage fluctuations, increased air flow on sensor, etc...
To avoid this we put in place "MQ2_SMOKE_CONFIRM_COUNT" parameter.
The firmware will check n times if the level is triggered before really shutting down heating elements.
Alarm features
Displaying warning on LCD
It is possible to display some alarm message on the LCD screen.
To do that you need to uncomment line " #define MQ2_ENABLE_LCD_WARNING"
Enable alarm sound from LCD beeper
You can also enable some sound alarm coming from the LCD display.
Of course your LCD display must have a speeker or beeper module.
Also you need to enable both " #define MQ2_ENABLE_LCD_WARNING" and " #define MQ2_ENABLE_WARNING_BEEP " in order to enable this feature.
This feature comes with the ability to change beep spacing, so you can increase or decrease beeps frequency by changing parameter value "MQ2_WARNING_BEEP_SPACING"
Make the LCD blink on alarm
In addition to all previous options, you can also make your LCD blink.
In this mode you might not see anymore the error messages.
To enable this feature uncomment "#define MQ2_ENABLE_LCD_WARNING_BLINK "
Enjoy