Evolution of a Blog

This blog has evolved as I have as a maker. It starts at the beginning of my journey where I began to re-tread my tires in the useful lore of micro electronics and the open-source software that can drive them. While building solutions around micro-electronics are still an occasional topic my more recent focus has been on the 3D Printing side of making.

Monday, August 25, 2014


Printer stopped working and on a little examination this is what I found.  Not sure yet what happened but replacing the RAMPS with new connectors has the printer back and happy.

Tuesday, July 15, 2014

Heat and Gas Monitor / Switch

This device was originally designed to monitor a 3D printer for temperature or gas (e.g. smoke) above a certain threshold at which point the printer would be powered down.   The circuit consists of an Arduino Nano connected to a temperature sensor and a gas sensor.   Two LEDs and a buzzer provide feedback.  The circuit drives a relay that can close the PS_ON circuit of an ATX type power supply (or a relay that is part of the power supply circuit for the printer).

There are two different boards with one being 50x50mm that would have the relay mounted off the board as shown in the picture to the right.   The two sensors are also mounted off the board as is the buzzer (upper right of photo).

The other board configuration is 50x100mm and has room for the relay on the PCB.  The relay could be part of a power supply circuit (DC or even AC) but the PCB is really designed to be part of an PS_ON circuit of an ATX power supply as it has an bypass switch that can be used to close that circuit.

Both of the boards are available in a kit form as there are a wide variety of ways that they could be mounted and as many ways to connect the board to sensors.

The PCB also has a connection point for the serial port of the Arduino for diagnostic information output by the sketch that drives the monitor.

As stated above, the monitor was designed for a 3D Printer but it could be used to monitor just about anything for heat and gas where a relay needs to be triggered.  I used the MQ-2 sensor looking for smoke but other MQ sensors could be used for other gas types.

Below is a documentation index for the Heat and Gas Monitor / Switch PCB:

Part 1 - Introduction
Part 2 - Hardware Configuration Options
Part 3 - Operation
Part 4 - Software Configuration
Part 5 - Assembly

Monday, July 14, 2014

3D Printer (RepRap) Monitor - Part 5 - Assembly

Choosing the Right Board

The larger board allows for a relay to be mounted on the board itself.   This is the configuration that works best for a power supply, such as an ATX, that has a "PS_ON" (or switch on) circuit.   The larger board could also be used for a single relay, of sufficient amperage, that provides power via a single bus.   However, DO NOT wire the "PS_ON" connection on the PCB to anything but a PS_ON circuit!

Choosing the Mounting Location

Two examples of mounting are shown here though others are certainly possible.  The major question will be one of where the two sensors need to be located relative to where the PCB can be mounted.   If the PCB can be mounted where the sensors need to be located then the sensors can be surface mounted on the PCB.   If not then leads will be required to connect the sensors to the PCB.   Likewise the monitors LEDs, reset, and bypass switch can all be surface mounted on the PCB or run remotely depending on placement of the PCB.

Surface Mount or Headers

Two strips of breakable headers can be used to provide mounts for most of the components and connection points on the PCB.   This can allow for easy removal of the Arduino Nano as one example. 


There are solder points on the PCB that expose a number of available pins (including power) on the Arduino Nano.   These could be used for a variety of purposes such as connecting additional sensors and/or relays. 


Actual assembly is straightforward.   Either solder the components (or leads) to the board in the places marked or solder on the appropriate headers!  Header strips can be easy broken into the proper lengths using a small wire cutter positioned on top of the pin where a cut needs to be made.  A pin is lost with each cut.  Edges can be sanded to make a smooth end to the header.

Polarity and/or Pin Positioning

The short lead on the LED is the ground.   The PCB shows how the Nano should be mounted as it does for all of the components and connections.  The reset button should be mounted as shown by the picture to the right.

The larger PCB provides a place where a relay can be mounted.   Small cable ties are provided for this purpose.   The larger PCB also allows for a bypass switch that mechanically closes the "PS_ON" circuit assuming that circuit is connected to the PCB.   Do NOT connect anything but a PS_ON circuit to the PCB.

Documentation Index

Below is a documentation index for the Heat and Gas Monitor / Switch PCB:

Part 1 - Introduction
Part 2 - Hardware Configuration Options
Part 3 - Operation
Part 4 - Software Configuration
Part 5 - Assembly

Wednesday, July 9, 2014

3D Printer (RepRap) Monitor - Part 4 - SW Configuration

At the top of the RepRapMonitor sketch there are a number of constants that need to be set for your environment.   They are as follows: 

  • WARMUP_DELAY - Delay in seconds for warmup of gas sensor (default is 60)
  • TEMP_ERRORS - Number of consecutive temperature errors we tolerate (default is 5)
  • TRIGGER_TEMP - Temperature at which we trigger the printer off (default is 40)
  • WARNING_TEMP - Temperature at which we start flashing a warning (default is 35)
  • TRIGGER_GAS - Gas threshold at which we trigger the printer off (default is 750)
  • WARNING_GAS - Gas threshold at which we start flashing a warning (default is 650)
  • STDDEV_GAS - Gas readings StdDev that justifies a sensor error (default is 10)
  • STDDEV_GAS_CHECK - Number of readings for above test (default is 30)
  • DELAY - Time between observations (default is 1000)

The temperature and gas trigger thresholds are the most critical of these settings.   While the sketch is running diagnostic messages will be written to the serial port.   These can be viewed using the Arduino IDE console or by connecting a terminal to the serial port on the RepRapMonitor PCB.  View this stream when setting your thresholds.

Software for the monitor is available on GitHub.

Monday, July 7, 2014

3D Printer (RepRap) Monitor - Part 3 - Operation

The two indicator LEDs provide feedback in regards to the operational status of the RepRap Monitor.

The gas sensor requires a warmup period.   When the monitor is first powered up, or reset, it will first flash a series of fast red / green LED, then alternating red / green LED flashes each second of the warmup period, and finally, somewhat faster alternating red / green LED flashes each second of the gas sensor check.

When the monitor is running normally the green LED will be on and solid.   If the monitor is running in standby the green LED will be flashing three times at 100ms every second.
    If the monitor has detected an error the green LED will be extinguished and the red LED will flash for 200ms from 1 to 4 times every second with the frequency indicating the nature of the problem encountered:
    • 1 time = Gas threshold exceeded
    • 2 times = Gas sensor error
    • 3 times = Temperature threshold exceeded
    • 4 times = Temp sensor error
    Note that if the printer has been shut down the alarm buzzer will sound continuously.

    If the monitor needs to indicate a warning state then the red LED will flash at 100ms either two or four times every second with two indicating a gas warning and four indicating a temperature warning.   In either case the green LED will still be lit.  During a warning situation the alarm buzzer will sound with pulses every second, two in the case of a gas warning, and four in the case of a temperature warning.

    The gas and temperature levels for errors and warnings are coded as constants within the sketch that drives the RepRap Monitor.  It is the responsibility of the user to set those constants as they vary for every environment!   The source code for the monitor is available here.

    Note that the serial port is accessible on the PCB and can be used to monitor status in detail.   Power is also made available which allows connection of a bluetooth serial adapter.

    Software for the monitor is available on GitHub.

    More in Part IV

    Monday, June 23, 2014

    3D Printer (RepRap) Monitor - Part 2 - HW Configuration

    There are two variants of the RepRap Monitor with each being configurable in a number of manners.   The first of the two variants is a small PCB where the expectation is that a relay would be mounted off the board somewhere.  The second variant has room on the board for a relay and also provides a bypass switch that disables the shutdown function (assuming a switched power supply is connected).

    The design for both PCBs is flexible in terms of power management strategy.  The primary configuration the PCBs are designed to handle entails that an ATX power supply is connected and the relay controls the switch circuit.   Obviously any power supply that provides a switch circuit would work.   The relay can also be used to control A/C power to the D/C power supply or the relay circuit could be used between the D/C power supply and the RepRap Controller (using two relays of appropriate capacity). 

    Below is a picture of the larger PCB (with relay on the board) mounted on top of my Prusa I3's electronics stack.   In this implementation the gas and temperature sensors are surface mounted on the back of the PCB.   This places the temperature sensor at the very top of the electronics stack and the gas sensor a little higher.   The temperature sensor is focused on the controller but the gas sensor will react to issues from either the electronics stack or the print area.  The buzzer is mounted on the printer frame.

    Here is a smaller PCB mounted on my Prusa I3 just above the electronics stack with the relay just below the monitor PCB.  The two sensors are on a stalk that is attached to the top of the printer controller.  The gas sensor is at the top of the stalk while the temperature sensor is inside the lower part of the stalk closer to the electronics.

    The above pictures illustrate the two different PCBs as well as two strategies that can be used for mounting either PCB (remote sensors or surface mounted sensors).   Obviously there are a large number of other alternatives that can be employed to match a given configuration.  I will make the designs for mounts shown available (Sketchup).  These are designed to fit on a RAMPS board that is mounted vertically.

    More in Part III

    Saturday, June 21, 2014

    3D Printer (RepRap) Monitor - Part 1 - Introduction

    My wife and I were sitting together in my office recently and as usual the 3D Printer was churning away.  Much to our surprise, and this has not happened before or since, the electronics stack started to smoke quite actively!  It turns out that one of the fuses at the top of the board had blown.  Puzzling as they are supposed to be self-resetting and they are not supposed to smoke to the point of flames!   It did NOT reset and it DID smoke!

    In any case this was a little worrying, even without my wife sitting next to it!  I got an extra smoke alarm and installed it in the office but wanted to go a step further.   That step further was to design and build a circuit that would power down the printer on detecting heat or smoke.

    Above is a picture of a prototype with all the components in place on the board itself.   I have chosen to use headers for the sensors, buzzer, LEDs, and the Arduino Nano though all or some of these components could be soldered directly to the board.   The sensors, reset switch, buzzer, and LEDs could also be mounted elsewhere with wiring back to the board.   It all depends on the implementation that is desired.

    From the bottom right, and moving around counter clockwise, here are the elements of the circuit:
    1. Pullup resistor for the temperature sensor
    2. DHT-11 temperature sensor
    3. Reset switch
    4. Audible alarm buzzer
    5. Green LED (behind buzzer)
    6. Pullup resistor for the Green LED
    7. Red LED (behind buzzer)
    8. Pullup resistor for the Red LED
    9. Relay
    10. Arduino Nano
    11. RS-232 monitoring connection
    12. Relay connector (in my case triggers an ATX power supply but could switch A/C power with the right relay)
    13. Gas sensor (I used the MQ-2 for smoke but other MQ sensors could be used for other types of gas in other applications)
    14. Power connector 
    More in Part II

    Sunday, June 1, 2014

    Prusa I3 Improvements/Modifications

    I have listed some of the modifications and improvements that I have added to my Prusa I3 but wanted to have a complete list at this point.   The things that I have mentioned before included the following:
    • Filament roller
    • Fan mount
    • Heated bed adjusters
    • Z-axis adjuster
    • Flexible cord for x-axis servo
    • Single board computer as controller (WiP)
    • Screw panel for hot end replacement
    Some other things that I have done either since the above of that I had not mentioned previously:
    1. Improved fan mount - now have two small fans on the mount with one directed at the cooling fins on the extruder and the other on the print
    2. Cooling fan for electronics stack with a master on/off switch.
    3. Tie-down to heavy platform for stability.
    4. Tensioner on the x-axis (downloaded from Thingiverse)
    5. Tensioner on the y-axis (crafted myself)
    6. Monitor to detect smoke or heat from the electronics and power down the printer (and sound an alarm)
    7. Cork insulation under the heated bed
    8. Cork insulator pad for top of heated bed (used when I rarely print with ABS or the heated bed takes forever to get to target temperature)
    9. Forward frame tensioner to help eliminate some vibration artifacts in my prints.
    10. Heated bed riser as the arms of the heated bed supports were dragging on the printer frame (downloaded from Thingiverse).
    Photos are on the way for the things with no links.





    #6 - Sensors

    #6 - Controller

    Wednesday, May 28, 2014

    Finally Comfortable with Print Quality

    I am finally, after a LONG time, comfortable with my print quality.   Still working on the balance between speed and quality but have enough speed to declare victory.

    Here is an image of the before and after for my final step in tuning.   The layers are just not as uniform as I would like.   This also shows in the corners.   In the after print the layers are uniform and the corners largely smooth.
    The top of the circle still needs some help but I am happy with the rest of the print.  Frankly the printer is a bit slow at the top of it's quality curve but I will have a couple configuration files that allow for a choice of quality vs speed.
    Getting to the point of the before print entailed adding some acceleration limits to my Slic3r settings and a jerk limit to my Marlin firmware.   Getting to the final print shown above required the below contraption to iron out some vibration of the Prusa I3 frame.

    Friday, May 23, 2014

    Summary of Stuff that I have Designed and Printed

    The very first thing that I designed and printed.   All of these things are available on Thingiverse.
    Then I did this thing.   In both cases these were prints that helped me with the printer itself.   I also printed a number of improvements designed by other people such as hot bed adjustment wheels and a Z-axis adjuster.
    Then I tackled this which was really a large part of the initial motivation for getting a 3D printer in the first place.
    This was a spin off from the above as I wanted to mount the encased LCD on the side of the printer.
    Then I got onto the theme of organizing things.   There was actually a critical piece of work prior to the below, namely some pieces that allowed me to hang a very heavy mirror in our spare bedroom.  Not very easy to take pictures of though.   The designs are on Thingiverse as a 'Heavy Object Hanger' with the rest of what is shown here.  My motivation for that design was not just to hang the mirror but also to demonstrate how useful having a 3D printer can be!
    This design was an evolution of the first version from the top of the page.
    Another organization thing.   This one has also been used under the kitchen sink for a towel hanger and a place to put the washing up liquid.
    Yet another organizer thing!   And another thing to demonstrate to Sara how useful a 3D printer can be!
    One last organization thing.   This one for me.

    Sunday, May 4, 2014

    Still Working on Print Quality / Speed

    Here is a photo of two calibration prints and screen shots of the Slic3r settings for speed that I used for the tests.

    The test case on the left takes almost 70% longer to print than the one on the right but the quality is obviously a lot higher.

    I have tried a lot of individual changes to the speed of printing but it seems that the whole thing needs to be SLOW to get the quality that I would like to achieve.

    The question is...what mechanical issues are greatest contributors to the reduction of quality as speed increase?
    Finally printing with some really good quality...and...SMOKE!

    Saturday, May 3, 2014

    New Project - Combining Disciplines

    My latest project combines 3D printing with a Raspberry Pi driving a couple of servos and the Pi Camera Module.

    Not completely sure of the application for the creation at this point...but more to come.

    Sunday, April 27, 2014

    Some 3D Printing Projects to Date

    I am using Thingiverse to publish many of the things that I have designed for, and then created using, my 3D Printer.   All of these designs are available with their source (I am using Sketchup).

    Sunday, April 20, 2014

    Detailed Photos of Prusa I3

    In response to a request, here are some detailed photos of my Prusa I3 including some of the enhancements that I have implemented on top of the original kit.

    Not the neatest electronics stack in the world by any means!

     Z-Axis end stop.  I used the mount that came with the kit but it is not bolted as there was not room for the entire mount and some cutting with a hot knife was involved.   You can also see the bottom part of the easy Z-axis adjuster knob which is one of the printer enhancements.

     Here is the complete extruder assembly.   Some detailed photos will follow later.

    This is the X-axis end stop.   I did not use the mount that came with the kit as I could not get the optimal positioning that I was seeking.  So, horror of horrors, I used some epoxy to put it where I want it.   I want to switch to Hall Effect end stops so no physical contact will be necessary but have not spent the money yet.

    Cooling fan for the electronics stack and a master power switch.   The power supply can be powered on and off via gcode but I wanted a hard wired switch as well.

    Close-up of the cooling fan for the hot end.   Trying to use a small fan to keep the hot bed from cooling too much.

    Two enhancements at the top of the extruder assembly.   First one to make it easier to change hot ends (though not as eloquent as some would do with a plug and socket arrangement) and the second being a filament cleaner that also lubricates (found it on Thingiverse).

    Original power supply was the LED strip variant.   Replaced with a PC power supply as it offers an on/off feature via grounding or ungrounding the green wire that you can see above.  Connected to the switch shown above.

    Y-Axis endstop.  Again I was not able to get the exact positioning that I wanted from the mount that came with the kit so printed this one (and used some more epoxy).   For a while the endstop was actually stuck to the servo...

    X-Axis tensioner (found it on Thingiverse).   The Y-Axis had a workable tension adjustment but the X-Axis did not (unless I installed something incorrectly).   This does the trick though.

    My solution to reducing friction of filament feeding from behind the printer (available on Thingiverse).

    My solution for reducing Z-Axis wobble.   I still don't have this licked but this did help.

    An elastic band to help keep the hot bed cables from jamming under the hot bed mechanism.   You can see where the cable cover had meed damages from said jamming!

    Securing the extruder assembly to the X-Axis.  Could never get the right tension just with the cable ties so added the tensioner shown above.

    Two enhancements shown here.   First being a corner adjuster for the hot bed.   REALLY makes the job of fine tuning the bed easier than without said adjuster  (found it on Thingiverse).  The other enhancement that might be obvious to some, but was not to me, is that you need to insulate the bottom of the hot bed if you are going to use higher temperatures needed for ABS.   I have some cork on order but this photo shows some aluminum foil wrapping a couple of paper towels.  I use the same thing on top of the bed during the initial heat up.
    Y-Axis tensioner as shipping with the original kit.   Works fine.