• ESP3D config file. - Here is the configuration settings I used for an ESP32CAM Cut and paste this in your configuration.h if you are facing issues.

    Here is the configuration settings I used for an ESP32CAM

    // This file was generated by ESP3D-Configurator V1.0.0-a14 
    /*
      configuration.h - ESP3D configuration file
    
      Copyright (c) 2014 Luc Lebosse. All rights reserved.
    
      This code 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 2.1 of the License, or (at your option) any later version.
    
      This code 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 code; if not, write to the Free Software
      Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    */
    #ifndef _CONFIGURATION_H
    #define _CONFIGURATION_H
    //Setup station as default, use AP mode first if not done
    //Note: need both defined to enable it
    //Uncomment and edit them to define
    //#define STATION_WIFI_SSID "yourssid"
    //#define STATION_WIFI_PASSWORD "yourssidpassword"
    
    //You can also use a different config file for SSID/password
    //Just save it in same location as this configuration.h
    //This file is ignored by github
    #if defined __has_include
    #  if __has_include ("myconfig.h")
    #    include "myconfig.h"
    #  endif
    #endif
    
    
    /************************************
    *
    * Board description
    *
    * ESP Board  using ESP3D firmware
    *
    ************************************/
    // MCU=ESP32
    // ESP flash size=4MB
    // Form factor=Original (all pins)
    
    /************************************
    *
    * Serial Communications
    *
    * Settings and protocols
    *
    ************************************/
    
    // Serial Communication protocol
    // Basic serial protocol, without data change
    #define COMMUNICATION_PROTOCOL RAW_SERIAL
    
    // Serial port
    #define ESP_SERIAL_OUTPUT USE_SERIAL_0
    
    // Serial buffer size
    // 1024 Bytes
    // Maximum size of the serial buffer
    #define SERIAL_RX_BUFFER_SIZE 1024
    
    /************************************
    *
    * Target firmware
    *
    * Targeted firmware that ESP3D will communicate with
    *
    ************************************/
    // System type=3D printer
    
    // Target firmware
    // Marlin 2.x firmware
    #define DEFAULT_FW MARLIN
    
    /************************************
    *
    * Radio mode of ESP3D
    *
    * The radio mode ESP3D communicate with the network
    *
    ************************************/
    
    // Use WiFi 
    // Enable wifi communications
    #define WIFI_FEATURE 
    
    /************************************
    *
    * Channels of ESP3D
    *
    * The way ESP3D communicate
    *
    ************************************/
    
    // Use webserver
    // Enable http server
    #define HTTP_FEATURE 
    
    // Use telnet server
    // Enable telnet light (raw tcp) communications
    #define TELNET_FEATURE 
    
    // Enable notifications
    // Allows to send notifications to the user
    #define NOTIFICATION_FEATURE 
    
    // Notification message when online
    // The message that will be sent when the ESP is online
    #define NOTIFICATION_ESP_ONLINE "Hi, %ESP_NAME% is now online at %ESP_IP%"
    
    // Notification title message
    // The title of notification
    #define ESP_NOTIFICATION_TITLE "ESP3D Notification"
    
    /************************************
    *
    * Discovery methods of ESP3D
    *
    * The discovery methods of ESP3D
    *
    ************************************/
    
    // Use captive portal 
    // Enable captive portal in AP mode
    #define CAPTIVE_PORTAL_FEATURE 
    
    // Use mDNS discovery
    // This method need `bonjour` protocol on windows, or `avahi` on linux
    #define MDNS_FEATURE 
    
    // Use Simple Service Discovery Protocol
    // It is supported on Windows out of the box
    #define SSDP_FEATURE 
    
    /************************************
    *
    * SSDP Customization settings
    *
    * Customize your ESP3D
    *
    ************************************/
    
    // Model name
    // Modele name of device
    #define ESP_MODEL_NAME "ESP32"
    
    // Model number
    // Modele number of device
    #define ESP_MODEL_NUMBER "ESP3D 3.0"
    
    // Model url
    // Modele url of device
    #define ESP_MODEL_URL "https://www.espressif.com/en/products/devkits"
    
    // Manufacturer name
    // Manufacturer name of device
    #define ESP_MANUFACTURER_NAME "Espressif Systems"
    
    // Manufacturer url
    // Manufacturer url of device
    #define ESP_MANUFACTURER_URL "https://www.espressif.com"
    
    /************************************
    *
    * Flash filesystem
    *
    * Filesystem on flash
    *
    ************************************/
    
    // File system type
    // LittleFS
    // Type of file system used by ESP3D to store files
    #define FILESYSTEM_FEATURE ESP_LITTLEFS_FILESYSTEM
    
    // Enable date/time on files
    // Set date/time on files using SNTP or last webui connection
    #define FILESYSTEM_TIMESTAMP_FEATURE 
    
    /************************************
    *
    * SD filesystem
    *
    * Filesystem on SD card
    *
    ************************************/
    
    // SD card connection
    // Only your ESP board is connected to SDCard
    // Does your system has SD card and how it is connected to your ESP3D
    #define SD_DEVICE_CONNECTION ESP_DIRECT_SD
    
    // SD card library
    // Used by SDMMC
    #define SD_DEVICE ESP_SDIO
    
    // Sdio bit mode
    // 4 bits
    #define SDIO_BIT_MODE SD_FOUR_BIT_MODE
    
    // Enable date/time on files
    // Set date/time on files using SNTP or last webui connection
    #define SD_TIMESTAMP_FEATURE 
    
    /************************************
    *
    * Update ESP3D
    *
    * Update ESP3D firmware
    *
    ************************************/
    
    // Enable Web Update
    // Update firmware using WebUI
    #define WEB_UPDATE_FEATURE 
    
    // Enable SD card Update
    // Update firmware and settings using file on SDCard
    #define SD_UPDATE_FEATURE 
    
    /************************************
    *
    * Display settings
    *
    * Rendering screens
    *
    ************************************/
    
    // Printer screen
    // Your printer has a display
    #define PRINTER_HAS_DISPLAY 
    
    /************************************
    *
    * Camera settings
    *
    * Connected camera
    *
    ************************************/
    
    // Camera type
    // AI Thinker (ESP32-Cam)
    // Camera connected to ESP board, only ones with PSRAM are supported
    #define CAMERA_DEVICE CAMERA_MODEL_AI_THINKER
    
    // Flip horizontally
    // Flip camera horizontally
    //#define CAMERA_DEVICE_FLIP_HORIZONTALY 
    
    /************************************
    *
    * Levels of security
    *
    * How commands are allowed to be sent to ESP3D
    *
    ************************************/
    
    // Enable serial commands
    // Allow commands to be sent to ESP3D via serial port
    #define SERIAL_COMMAND_FEATURE 
    
    /************************************
    *
    * Additional features
    *
    * Extra settings
    *
    ************************************/
    
    // Enable direct control pin
    // Controls pins using [ESP201]
    #define DIRECT_PIN_FEATURE 
    
    /************************************
    *
    * Default settings for ESP3D
    *
    * Do not edit them
    *
    ************************************/
    
    // Gcode Host Feature
    // This feature allows to process Gcode files like macros.
    #define GCODE_HOST_FEATURE 
    
    // Settings location
    // EEPROM
    // Location where ESP3D will save settings
    #define ESP_SAVE_SETTINGS SETTINGS_IN_EEPROM
    
    // Add serial task
    // ESP32 need to add a task to handle serial communication
    #define SERIAL_INDEPENDANT_TASK 
    
    
    
    /************************************
    *
    * Development setting 
    * Do not modify them for production 
    ************************************/
    
    //Enable debug mode
    //Do not do this when connected to printer !!!
    //be noted all upload may failed if enabled
    //DEBUG_OUTPUT_SERIAL0
    //DEBUG_OUTPUT_SERIAL1
    //DEBUG_OUTPUT_SERIAL2
    //DEBUG_OUTPUT_TELNET
    //DEBUG_OUTPUT_WEBSOCKET
    //#define ESP_DEBUG_FEATURE DEBUG_OUTPUT_SERIAL0
    
    #ifdef ESP_DEBUG_FEATURE
    #define DEBUG_BAUDRATE 115200
    #define DEBUG_ESP3D_OUTPUT_PORT  8000
    #endif //ESP_DEBUG_FEATURE
    
    //Enable benchmark report in dev console
    //#define ESP_BENCHMARK_FEATURE
    
    //Disable sanity check at compilation
    //#define ESP_NO_SANITY_CHECK
    
    
    /************************************
    *
    * Sanity checks 
    * Do not modify 
    ************************************/
    
    #if defined (SD_TIMESTAMP_FEATURE) || defined (FILESYSTEM_TIMESTAMP_FEATURE)
        #define TIMESTAMP_FEATURE
    #endif //SD_TIMESTAMP_FEATURE || FILESYSTEM_TIMESTAMP_FEATURE 
    
    #if defined(PRINTER_HAS_DISPLAY)
    #define HAS_SERIAL_DISPLAY ""
    #endif // PRINTER_HAS_DISPLAY
    
    #if defined(CAMERA_DEVICE)
    #if CAMERA_DEVICE==CAMERA_MODEL_ESP32_CAM_BOARD || CAMERA_DEVICE==CAMERA_MODEL_ESP32S2_CAM_BOARD
    #define USE_BOARD_HEARDER 1
    #endif // CAMERA_DEVICE==CAMERA_MODEL_ESP32_CAM_BOARD || CAMERA_DEVICE==CAMERA_MODEL_ESP32S2_CAM_BOARD
    #endif // CAMERA_DEVICE
    
    #if !defined(WIFI_FEATURE) && !defined(ETH_FEATURE)
    #undef HTTP_FEATURE
    #undef TELNET_FEATURE
    #undef WEBDAV_FEATURE
    #undef FTP_FEATURE
    #undef WEB_UPDATE_FEATURE
    #undef CAPTIVE_PORTAL_FEATURE
    #undef SSDP_FEATURE
    #undef MDNS_FEATURE
    #undef NOTIFICATION_FEATURE
    #endif
    
    #endif //_CONFIGURATION_H

    Cut and paste this in your configuration.h if you are facing issues.

  • Doc Brown Inspired sunglasses - Check the show notes for the STL and SVG Photos below

    Check the show notes for the STL and SVG

    Photos below

  • Can you Wifi a 3D printer? - I was wondering if it was possible to Wifi my 3D printer. At the moment I need to either use an SD card or plug it into the front of my printer with a USB cord. These are two mechanical connections that will soon fail due to the constant operation. You could, of course just attach a dedicated unit like a raspberry Pi. This requires additional power requirements and a USB plug screaming to be snapped off. This along with the general shortage of raspberry pi in general puts me off this idea. There are lots of low-cost ESP wifi modules that could surely pass the serial data from wifi to the printer so I set out to see if this was indeed possible. In general, I would print directly from Octoprint from an old laptop that has a new lease on life with this important function. Before I can start I have to work out how to hack into the control board serial communication. Flash ESP3D to a ESP32 Download ESP-3D from here: https://github.com/luc-github/ESP3D Unzip the file somewhere you can find it easily.  Open ESP-3D in Arduino. Browse the download for the esp3d folder, within this the sketch esp3d.io can be found, open this file.  Pull the triggerI will assume you have flashed an ESP32 previously, if not configure this first. With your ESP-32 connected and selected in your boards try and flash the software. I very much doubt there is a single Arduino IDE install that is the same as another so you could have a lot of dependency errors when you try and flash the firmware or you may have none. For me, I just had two: Websockets: https://github.com/Links2004/arduinoWebSockets ESP32SSDP: https://github.com/luc-github/ESP32SSDP Once these libraries were installed I could flash the ESP-32 Configure ESP-3D Once you have successfully flashed the ESP shortly afterward a new AP will appear in your list of APs called ESP3D. Connect to this AP the password will be 12345678. This will open a captured portal page in a browser, there will be an error on the page.  Click on Choose files and navigate to esp3d/data select all the files and upload them.  After the upload, the files should appear in the ESP3D UI. Reboot the ESP-32  You should now be presented with the first-time configuration.  Choose Marlin, no other settings need to change here (E3V2) click Continue  On the next screen, you can configure your WiFi If you would like to connect to your local WiFI enter your AP and credentials otherwise leave the settings as they are to connect to the ESP-32 directly.  Click Continue You will now be presented with the ESP3D full UI. Click on ESP3D at the top of the UI.  From the top of the window click Printer.  Select Marlin from the dropdown and click Set An extra tab should now appear at top of the UI. This is as far as we can go with ESP3D for now. Connecting to the serial port As I mentioned earlier, 3D printers have serial but the data is communicated via a converter chip to computer-friendly USB. Most small controllers can not act as USB host so we need to hijack the serial before it gets to the converter chip. Looking at the schematic for the board the printer CPU connects directly to the serial-USB converter chip. There is no convenient header to connect to the serial so we will have to solder directly to the converter chip.  Below you can see my serial wires soldered to the chip.  Conventionally there is a header near buy that can supply our ESP32 with 3.3v and ground. Once you have soldered the serial connection and connected headers to the power route the wires with the control panel ribbon cable.  Remove the back cover of the aluminum extrusion and slide the holder (see STL) as far forward as it will go behind the ender control panel, insert the ESP32 Connect your new serial wires to GP01 and GP03 RX to TX and TX to RX connect the power wires to 3.3v and a GND.  Place the remaining cover over the ESP32 mount For now, the USB is only for flashing the ESP32. The developer has created an issue to enable pass-through support so you do not lose the ability to print via USB: https://github.com/luc-github/ESP3D/issues/800 If you have been successful you should see an IP address on the Ender screen.  Return to your browser and check your printer tab. and click the refresh button. You should see GCODE defaults you can change. If you only see Label Value Help the printer is not talking to the ESP32.  Virtual serial port We now need to trick your slicer or Octoprint that your computer has a COM port. To do this we use virtual serial port software. There are many different apps that will do this. I found this one easy to use and appears free: https://tibbo.com/soi/software.html The tool requires the IP of the ESP32 and a port number. The port number can be found in the ESP3D UI. This probably won’t change unless you change it.  Simply add the IP address in Tibbo or your virtual serial port software of choice and the port number. Here Tibbo has allocated COM5, remember your COM port.  Print! All things being equal when you try to connect from your slicer or Octoprint there should be a COM port and when you connect to that COM port you should have control of your printer as if the USB cable is attached.  Check the video at the top of the guide with my findings on how well the prints come out.  Test print Initially, I tried an ESP-01s the first print that came out was not good. It seems that the printer paused several times during the job. I am not sure if the network was slow or if the 8266 was just struggling to keep up. Looking at the network performance of the Ocotprint server it was not running out of capacity at all so I figured the 8266 was the bottleneck. Time for an upgrade. I tried an ESP32 with the same firmware and fired off another Benchy. This print came out significantly better. It was not perfect as there were one or two places where it looks like the print head may have stopped but nothing like the dozens of times it must have stalled with the 8266. Conclusion With a bit of tweaking, I think it would be possible to run a 3D printer with a low-cost ESP module. I have the ideal situation here as I have no other wifi signals to interfere and network latency could be an issue in a suburban area. Using Wifi would mitigate the issue of damaged USB plugs or SD card readers but it does introduce the issue of someone inadvertently rebooting the router. The general convenience of being able to print from anywhere without the requirement for extra power connections or add-ons might make it worthwhile. I will add a double pole switch so I can swap between Wifi and USB as both can not be used at the same time. Keep an eye out on my cults3d account as I will have a mounting bracket for the Ender 3 V2 and ESP32. Even if you did not want to print directly you can still use all the tools in ESP3D.

    I was wondering if it was possible to Wifi my 3D printer. At the moment I need to either use an SD card or plug it into the front of my printer with a USB cord.

    These are two mechanical connections that will soon fail due to the constant operation. You could, of course just attach a dedicated unit like a raspberry Pi. This requires additional power requirements and a USB plug screaming to be snapped off. This along with the general shortage of raspberry pi in general puts me off this idea.

    There are lots of low-cost ESP wifi modules that could surely pass the serial data from wifi to the printer so I set out to see if this was indeed possible.

    In general, I would print directly from Octoprint from an old laptop that has a new lease on life with this important function. Before I can start I have to work out how to hack into the control board serial communication.

    Flash ESP3D to a ESP32

    Download ESP-3D from here: https://github.com/luc-github/ESP3D

    Unzip the file somewhere you can find it easily. 

    Open ESP-3D in Arduino.

    Browse the download for the esp3d folder, within this the sketch esp3d.io can be found, open this file. 

    Pull the trigger
    I will assume you have flashed an ESP32 previously, if not configure this first.

    With your ESP-32 connected and selected in your boards try and flash the software.

    I very much doubt there is a single Arduino IDE install that is the same as another so you could have a lot of dependency errors when you try and flash the firmware or you may have none.

    For me, I just had two:

    Websockets:

    https://github.com/Links2004/arduinoWebSockets

    ESP32SSDP:

    https://github.com/luc-github/ESP32SSDP

    Once these libraries were installed I could flash the ESP-32


    Configure ESP-3D

    Once you have successfully flashed the ESP shortly afterward a new AP will appear in your list of APs called ESP3D. Connect to this AP the password will be 12345678. This will open a captured portal page in a browser, there will be an error on the page. 

    Click on Choose files and navigate to esp3d/data select all the files and upload them. 

    After the upload, the files should appear in the ESP3D UI.

    Reboot the ESP-32 

    You should now be presented with the first-time configuration. 

    Choose Marlin, no other settings need to change here (E3V2) click Continue 

    On the next screen, you can configure your WiFi

    If you would like to connect to your local WiFI enter your AP and credentials otherwise leave the settings as they are to connect to the ESP-32 directly. 

    Click Continue

    You will now be presented with the ESP3D full UI.

    Click on ESP3D at the top of the UI. 

    From the top of the window click Printer

    Select Marlin from the dropdown and click Set

    An extra tab should now appear at top of the UI.

    This is as far as we can go with ESP3D for now.


    Connecting to the serial port

    As I mentioned earlier, 3D printers have serial but the data is communicated via a converter chip to computer-friendly USB. Most small controllers can not act as USB host so we need to hijack the serial before it gets to the converter chip. Looking at the schematic for the board the printer CPU connects directly to the serial-USB converter chip.

    There is no convenient header to connect to the serial so we will have to solder directly to the converter chip. 

    Below you can see my serial wires soldered to the chip. 

    Conventionally there is a header near buy that can supply our ESP32 with 3.3v and ground.

    Once you have soldered the serial connection and connected headers to the power route the wires with the control panel ribbon cable. 

    Remove the back cover of the aluminum extrusion and slide the holder (see STL) as far forward as it will go behind the ender control panel, insert the ESP32

    Connect your new serial wires to GP01 and GP03 RX to TX and TX to RX connect the power wires to 3.3v and a GND. 

    Place the remaining cover over the ESP32 mount

    For now, the USB is only for flashing the ESP32. The developer has created an issue to enable pass-through support so you do not lose the ability to print via USB: https://github.com/luc-github/ESP3D/issues/800

    If you have been successful you should see an IP address on the Ender screen. 

    Return to your browser and check your printer tab. and click the refresh button.

    You should see GCODE defaults you can change. If you only see Label Value Help the printer is not talking to the ESP32. 


    Virtual serial port

    We now need to trick your slicer or Octoprint that your computer has a COM port. To do this we use virtual serial port software. There are many different apps that will do this. I found this one easy to use and appears free: https://tibbo.com/soi/software.html

    The tool requires the IP of the ESP32 and a port number. The port number can be found in the ESP3D UI. This probably won’t change unless you change it. 

    Simply add the IP address in Tibbo or your virtual serial port software of choice and the port number.

    Here Tibbo has allocated COM5, remember your COM port. 


    Print!

    All things being equal when you try to connect from your slicer or Octoprint there should be a COM port and when you connect to that COM port you should have control of your printer as if the USB cable is attached. 

    Check the video at the top of the guide with my findings on how well the prints come out. 


    Test print

    Initially, I tried an ESP-01s the first print that came out was not good. It seems that the printer paused several times during the job. I am not sure if the network was slow or if the 8266 was just struggling to keep up. Looking at the network performance of the Ocotprint server it was not running out of capacity at all so I figured the 8266 was the bottleneck. Time for an upgrade.

    First print was not great

    I tried an ESP32 with the same firmware and fired off another Benchy.

    ESP32 print was a significant improvement

    This print came out significantly better. It was not perfect as there were one or two places where it looks like the print head may have stopped but nothing like the dozens of times it must have stalled with the 8266.


    Conclusion

    With a bit of tweaking, I think it would be possible to run a 3D printer with a low-cost ESP module. I have the ideal situation here as I have no other wifi signals to interfere and network latency could be an issue in a suburban area. Using Wifi would mitigate the issue of damaged USB plugs or SD card readers but it does introduce the issue of someone inadvertently rebooting the router.

    The general convenience of being able to print from anywhere without the requirement for extra power connections or add-ons might make it worthwhile.

    I will add a double pole switch so I can swap between Wifi and USB as both can not be used at the same time. Keep an eye out on my cults3d account as I will have a mounting bracket for the Ender 3 V2 and ESP32. Even if you did not want to print directly you can still use all the tools in ESP3D.

  • Filament Friend - I was after an easy way to check if my 3D printer was out of filament. You can get filament sensors that detect the filament is missing (run out) but if the filament has broken after the sensor you would never know. All these sensors do really is tell the machine to stop. I would rather know so I could intervene. There are also sensors that are slightly better and detect the lack of movement so a jam at any position would stop the machine. Again this just stops the machine. I have had little success personally restarting a cold print. Both sensors require you to feed the filament through the sensor itself introducing a binding point. The filament friend Initially, I designed a tool that used a hall effect sensor on the spool to detect movement. As long as a magnet passed the sensor within a predefined time the tool was happy. If it didn’t turn it would send an email alerting you of the status. A breakdown of that project can be found in the video below. Unfortunately the same weekend I completed this project Gmail, which I used to send the alert email stopped the service that allowed less secure apps to send emails. This issue along with the problem of having to add a magnet to every spool led me to try a different approach. Filament Friend 2.0 My new version would use more modern push messaging and TOF (time of flight sensor). This little sensor uses a laser to bounce off objects to measure the distance. This change in distance would trigger the “all is ok” part of the code. If the distance remains static for too long an alert would be pushed. In my original Filament Friend, I used an ESP-01 which is a tiny Arduino-compatible MCU with wifi. The big issue with this device is the lack of easy debugging. Further research found a cool little MCU dev board with a built-in 18650 battery charger and holder. This would have its own power supply or USB power, multiple inputs and outputs, and also debugging while still being small in size. Once I had decided on this unit it was down to designing the case it was to go into. My usual goto for STL and step files Grabcad came up empty with a version of this particular board so I had to design one of these from the ground up to start with. My search did find a few similar including one with an OLED screen which would be cool for a project. Once the board was mocked up it was down to designing a case around it. For this, I needed to consider the TOF sensor. Time of flight sensor. Time of flight sensors as mentioned before shoots out a laser and the time it takes for the light to reflect back to the unit is used to calculate the distance, or, the time of flight. The unit I am using is the VL53LOX. There seem to be a few variations of break-out boards for this sensor and I opted for the smallest. Getting this up and running was pretty simple it uses the I2C bus and there is no shortage of documentation on getting I2C to work with Arduino. What I found with the sensor (this version any) is that the readings vary wildly. Or the measured values can swing up to 10mm depending on the surface. Even when both the object and the sensor are static I would get readings from 100-110mm. Deciding the output seems almost analog in nature I incorporated the smoothing sketch found on the Arduino website and sketch examples. This seemed to tame the beast to a somewhat usable solution. With the TOF now in a more stable position, I may still need to attach something to the spool. I could now go ahead and design the case to hold it all together. Getting the message out. In my first version of the Filament Friend, I used Gmail to message any alerts. Coincidently Gmail killed off email from less secure apps so that solution was not really available anymore. I was really keen on a push message system that wasn’t too complicated and accessible to everyone. In the past I had used IFTTT in my Turn on your lights with Google assitant – IFTTT – MQTT – WLED video. Here I used Google assistance to turn on my RGB trampoline. This looked like the solution again where you would only need to install the IFTTT app, configure the service in IFTTT, and the Arduino code for push messaging to work. I found this great tutorial here to get me up and running. Case design. A few simple mockups to start with got a self-contained unit. I put a small hole in one end for the sensor to “look out”. The whole unit fits in this case nicely. The tool itself would just need to sit near the spool (around 100mm) this could just be the top of the gantry. I will have a few different lid designs so you could even use a GoPro mount as these cameras have a plethora of mounting options. This design is a bit rough and ready for the POC. Later designs, if everything works out will look a bit tidier. First tests With the case designed up and some rough code cobbled together, I set a print running to see what would happen. The spool I have on the printer at the moment is almost empty so I placed the tool so it could see through the gaps in the spool. With the tool on the back, I fired it forwards and recorded the readings with some debug output. I then graphed the output below. The data above is from a full rotation, the arrows are pointing towards the flat spot pointed out on the spool. You can clearly see the five gaps in the spool also. This sample was over around a 16min period. I expect the moving downwards across the sample is due to the spool moving back and forward. I was under the impression that if the laser was shooting through the spool the distance would shoot up to meters as in theory there is nothing to bounce off but the other wall of my shed. The data sheet shows that the sensor housing requires a pretty wide viewing angle so I suspect this is the actual viewing angle. Of course the further you have the sensor from the spool the less likely it is to detect the gaps in the spool as the focus area will encompass the spool itself. The intention was always to have the tool at a maximum of 100mm. I can see the tool can detect movement but the test will be to see if it can detect no movement and what kind of variation we can expect in this situation. Detecting a jam This is all a bit pointless if the sensor fails to detect a jam. I stopped the spool and again logged the output and plotted the result below. This looks bad but it is actually pretty good when you see the scale the swing is between 151-157mm. While static and looking through a gap in the spool. If I place the tool in front of the spool with no gap the variation is just a couple of millimeters. Overlaying the moving spool with a static spool the difference is clear. With this spool “profile”, we can configure our minimum movement amount and time we should wait for a change. This is just for this spool type and is also almost empty. I will have to think of something a bit more universal. For now, I think I have something to work with so I will start on the IFTTT integration and test the unit in full production. To keep up with developments subscribe to my YouTube channel: No STLS or sketches to release yet.

    I was after an easy way to check if my 3D printer was out of filament. You can get filament sensors that detect the filament is missing (run out) but if the filament has broken after the sensor you would never know. All these sensors do really is tell the machine to stop. I would rather know so I could intervene.

    There are also sensors that are slightly better and detect the lack of movement so a jam at any position would stop the machine. Again this just stops the machine. I have had little success personally restarting a cold print.

    Both sensors require you to feed the filament through the sensor itself introducing a binding point.

    The filament friend

    Initially, I designed a tool that used a hall effect sensor on the spool to detect movement. As long as a magnet passed the sensor within a predefined time the tool was happy. If it didn’t turn it would send an email alerting you of the status. A breakdown of that project can be found in the video below.

    Unfortunately the same weekend I completed this project Gmail, which I used to send the alert email stopped the service that allowed less secure apps to send emails.

    This issue along with the problem of having to add a magnet to every spool led me to try a different approach.

    Filament Friend 2.0

    My new version would use more modern push messaging and TOF (time of flight sensor). This little sensor uses a laser to bounce off objects to measure the distance. This change in distance would trigger the “all is ok” part of the code. If the distance remains static for too long an alert would be pushed.

    In my original Filament Friend, I used an ESP-01 which is a tiny Arduino-compatible MCU with wifi. The big issue with this device is the lack of easy debugging.

    ESP-01(S) is good if you don’t need many pins or debugging

    Further research found a cool little MCU dev board with a built-in 18650 battery charger and holder. This would have its own power supply or USB power, multiple inputs and outputs, and also debugging while still being small in size.

    WIFI, 18650+charging, multiple I/O, power switch, and USB power if required.

    Once I had decided on this unit it was down to designing the case it was to go into. My usual goto for STL and step files Grabcad came up empty with a version of this particular board so I had to design one of these from the ground up to start with. My search did find a few similar including one with an OLED screen which would be cool for a project.

    Once the board was mocked up it was down to designing a case around it. For this, I needed to consider the TOF sensor.

    Time of flight sensor.

    Time of flight sensors as mentioned before shoots out a laser and the time it takes for the light to reflect back to the unit is used to calculate the distance, or, the time of flight.

    The unit I am using is the VL53LOX. There seem to be a few variations of break-out boards for this sensor and I opted for the smallest.

    VL53LOX time of flight sensor.

    Getting this up and running was pretty simple it uses the I2C bus and there is no shortage of documentation on getting I2C to work with Arduino.

    What I found with the sensor (this version any) is that the readings vary wildly. Or the measured values can swing up to 10mm depending on the surface. Even when both the object and the sensor are static I would get readings from 100-110mm. Deciding the output seems almost analog in nature I incorporated the smoothing sketch found on the Arduino website and sketch examples. This seemed to tame the beast to a somewhat usable solution.

    My battles with the TOF sensor.

    With the TOF now in a more stable position, I may still need to attach something to the spool. I could now go ahead and design the case to hold it all together.

    Getting the message out.

    In my first version of the Filament Friend, I used Gmail to message any alerts. Coincidently Gmail killed off email from less secure apps so that solution was not really available anymore.

    I was really keen on a push message system that wasn’t too complicated and accessible to everyone. In the past I had used IFTTT in my Turn on your lights with Google assitant – IFTTT – MQTT – WLED video. Here I used Google assistance to turn on my RGB trampoline.

    This looked like the solution again where you would only need to install the IFTTT app, configure the service in IFTTT, and the Arduino code for push messaging to work. I found this great tutorial here to get me up and running.

    Case design.

    A few simple mockups to start with got a self-contained unit. I put a small hole in one end for the sensor to “look out”. The whole unit fits in this case nicely. The tool itself would just need to sit near the spool (around 100mm) this could just be the top of the gantry. I will have a few different lid designs so you could even use a GoPro mount as these cameras have a plethora of mounting options.

    Prototype case design
    Time of flight sensor location on this end
    Lid on, the status light lets me know what is happening

    This design is a bit rough and ready for the POC. Later designs, if everything works out will look a bit tidier.

    First tests

    With the case designed up and some rough code cobbled together, I set a print running to see what would happen. The spool I have on the printer at the moment is almost empty so I placed the tool so it could see through the gaps in the spool.

    Red areas indicate holes in the spool. Note the one spot where there is no gap.

    With the tool on the back, I fired it forwards and recorded the readings with some debug output. I then graphed the output below.

    Output graphed from a full rotation. Time is on the horizontal.

    The data above is from a full rotation, the arrows are pointing towards the flat spot pointed out on the spool. You can clearly see the five gaps in the spool also. This sample was over around a 16min period.

    I expect the moving downwards across the sample is due to the spool moving back and forward.

    I was under the impression that if the laser was shooting through the spool the distance would shoot up to meters as in theory there is nothing to bounce off but the other wall of my shed. The data sheet shows that the sensor housing requires a pretty wide viewing angle so I suspect this is the actual viewing angle.

    Sensor viewing angle.

    Of course the further you have the sensor from the spool the less likely it is to detect the gaps in the spool as the focus area will encompass the spool itself.

    The sensor has a wide angle in the scheme of things.

    The intention was always to have the tool at a maximum of 100mm.

    I can see the tool can detect movement but the test will be to see if it can detect no movement and what kind of variation we can expect in this situation.

    Detecting a jam

    This is all a bit pointless if the sensor fails to detect a jam. I stopped the spool and again logged the output and plotted the result below.

    This looks bad but it is actually pretty good when you see the scale the swing is between 151-157mm. While static and looking through a gap in the spool. If I place the tool in front of the spool with no gap the variation is just a couple of millimeters.

    Overlaying the moving spool with a static spool the difference is clear.

    Comparing static (red) with a moving (blue) spool

    With this spool “profile”, we can configure our minimum movement amount and time we should wait for a change. This is just for this spool type and is also almost empty. I will have to think of something a bit more universal.

    For now, I think I have something to work with so I will start on the IFTTT integration and test the unit in full production.

    To keep up with developments subscribe to my YouTube channel:

    No STLS or sketches to release yet.

  • LP-E17 Mains adapter - In this project, I needed a mains adapter for my EOS-M3 camera. Filming videos chews up a lot of battery. Going out to do some shooting when I finally find the time and to find the battery is dead is a total pain. With a mains adapter, I never need to worry about the state of the battery. Getting power in. Even though I have owned this camera for 4-5 years I didn’t realize that it had a hole designed in the battery cover for a power adapter. A real “life hack” moment. The slider for opening the cover moves to the side to reveal the charging hole. The next challenge was to create the file in fusion360. The battery itself is just a brick but the contacts need to line up perfectly otherwise no power would be applied to the terminals. The battery itself has an odd voltage of 7.2V which isn’t something you will easily find in the local shops. 3.3V, 5V, and 12V are the norm so I would need to create some sort of regulation to get the correct voltage and supply sufficient current. As 7.2V regulators arent really available I opted for an LM-317 variable regulator. This regulator just needs a couple of resistors to configure the supply voltage and can handle up 1.5A of power so this project is well within its wheelhouse. A quick calculation using an online calculator found the resistors required would be 1k and 4k7. Something easily found in any electronics spares box. With the circuit configured I found the voltage to be around 7.3 volts. Taking into account the resistor tolerances this was fine. The battery itself provided 8V so this extra .1 was not going to be much of an issue. With the circuit completed, I set about designing the battery case itself. First design The design required a DC power socket. A panel mount version wouldn’t really do here as the locking nut would be wider than the case itself. I opted rather to use a regular cable end adapter and use the battery case as the screw-in point rather than the usual cable cover. Once this was completed it was a case of adding the rest of the components and testing it out on the camera. Housten we have a problem All things assembled I put the battery into the camera and fired it up. Expecting a litany of complaints from the camera about being subjected to nonfactory parts I was pleasantly surprised with no feedback at all from the camera. As far as it was concerned it seemed as though everything was normal. Time to try it out. The long-term goal here is to have high-quality timelapse videos of 3D prints. These take time obviously so the camera needs to work without an issue for a few hours at least. I started a Benchy print and crossed my fingers. I found in about 15-20mins the camera had died? To investigate further I decided to pull the battery case out and have a look, except I couldn’t. The battery case glued itself in place. I used a hot glue gun to hold the components in place. Although the heat generated by the regulator wasn’t hot enough to melt the PLA it was enough to melt the hot glue. This then cooled and glued itself to the inside of the camera! Fearing all was lost anyway I used brute force and ignorance to rip the battery out with long-nose pliers. Fortunately, the camera survived the experience and being a sucker for punishment I persevered with version 2. Nope, that ain’t going to work either. Taking what I didn’t already like from the first version I moved to copper tape throughout the battery and added even more heatsinks. The regulator now had two pretty thick bits of metal screwed down to absorb the heat from the regulator. It was now time for attempt two. Although this did last longer the heat from the regulator softened the PLA sufficiently that the spring contacts pushed the contacts in the holder away and eventually dropped out of reach altogether. Jackpot I wasn’t sure if it was just the heat in the camera or that along with the regulator softening the PLA. As a last-ditch effort, I moved all the electronics out of the case and just had the wires from the DC connector to the battery terminals. I purchased a cheap step-down voltage converter and printed a case for it. This would supply the voltage required to power the camera. The case couldn’t be simpler or cheaper now with just the DC connector some wires and the copper tape. “The best part is no part. The best process is no process. It weighs nothing. Costs nothing. Can’t go wrong.” Elon Musk This ended up being the working design. There is no heat generated at all from the camera after hours of use so the heat was just purely the regulator. Conclusion If you would like to try and make the internal regulated version here is the wiring diagram. I don’t show it in this diagram but you would run copper tape up to the connectors to the left. Note that the copper tape goes under the regulator. This is required as the regulated voltage is collected from the heatsink. The center pin of the regulator is NOT connected. The input voltage pint is soldered directly to the +ve tape. When putting copper tape down you will need to solder each strip together as the sticky part of the tape acts as an insulator. For the none regulated version the -ve side is to the edge of the battery. If you already have a Canon LP-E17 it should show the markings to confirm. If you would like to make the same adapter the STL files are below along with the buck converter used and connector. Step down power buck converter: https://jasonwinfield.nz/product/step-down-power-supply/ Custom Camera Firmware can be found here: https://chdk.fandom.com/wiki/CHDK STLS: https://cults3d.com/en/3d-model/gadget/lp-e17-dc-power-adapter

    In this project, I needed a mains adapter for my EOS-M3 camera. Filming videos chews up a lot of battery. Going out to do some shooting when I finally find the time and to find the battery is dead is a total pain. With a mains adapter, I never need to worry about the state of the battery.

    Getting power in.

    Even though I have owned this camera for 4-5 years I didn’t realize that it had a hole designed in the battery cover for a power adapter. A real “life hack” moment. The slider for opening the cover moves to the side to reveal the charging hole.

    Power access when mod is fitted

    The next challenge was to create the file in fusion360. The battery itself is just a brick but the contacts need to line up perfectly otherwise no power would be applied to the terminals.

    The battery itself has an odd voltage of 7.2V which isn’t something you will easily find in the local shops. 3.3V, 5V, and 12V are the norm so I would need to create some sort of regulation to get the correct voltage and supply sufficient current.

    As 7.2V regulators arent really available I opted for an LM-317 variable regulator.

    LM317T variable voltage regulator

    This regulator just needs a couple of resistors to configure the supply voltage and can handle up 1.5A of power so this project is well within its wheelhouse.

    A quick calculation using an online calculator found the resistors required would be 1k and 4k7. Something easily found in any electronics spares box.

    With the circuit configured I found the voltage to be around 7.3 volts. Taking into account the resistor tolerances this was fine. The battery itself provided 8V so this extra .1 was not going to be much of an issue.

    With the circuit completed, I set about designing the battery case itself.

    First design

    The design required a DC power socket. A panel mount version wouldn’t really do here as the locking nut would be wider than the case itself. I opted rather to use a regular cable end adapter and use the battery case as the screw-in point rather than the usual cable cover.

    The first design had the socket screw into the holder itself.

    Once this was completed it was a case of adding the rest of the components and testing it out on the camera.

    Housten we have a problem

    All things assembled I put the battery into the camera and fired it up. Expecting a litany of complaints from the camera about being subjected to nonfactory parts I was pleasantly surprised with no feedback at all from the camera. As far as it was concerned it seemed as though everything was normal.

    Time to try it out.

    The long-term goal here is to have high-quality timelapse videos of 3D prints. These take time obviously so the camera needs to work without an issue for a few hours at least.

    I started a Benchy print and crossed my fingers. I found in about 15-20mins the camera had died? To investigate further I decided to pull the battery case out and have a look, except I couldn’t. The battery case glued itself in place.

    I used a hot glue gun to hold the components in place. Although the heat generated by the regulator wasn’t hot enough to melt the PLA it was enough to melt the hot glue. This then cooled and glued itself to the inside of the camera!

    Fearing all was lost anyway I used brute force and ignorance to rip the battery out with long-nose pliers.

    Fortunately, the camera survived the experience and being a sucker for punishment I persevered with version 2.

    Nope, that ain’t going to work either.

    Taking what I didn’t already like from the first version I moved to copper tape throughout the battery and added even more heatsinks.

    Version 2 (heat sink removed)

    The regulator now had two pretty thick bits of metal screwed down to absorb the heat from the regulator. It was now time for attempt two.

    Although this did last longer the heat from the regulator softened the PLA sufficiently that the spring contacts pushed the contacts in the holder away and eventually dropped out of reach altogether.

    Too much heat.

    Jackpot

    I wasn’t sure if it was just the heat in the camera or that along with the regulator softening the PLA. As a last-ditch effort, I moved all the electronics out of the case and just had the wires from the DC connector to the battery terminals.

    I purchased a cheap step-down voltage converter and printed a case for it. This would supply the voltage required to power the camera.

    External power supply

    The case couldn’t be simpler or cheaper now with just the DC connector some wires and the copper tape.

    “The best part is no part. The best process is no process. It weighs nothing. Costs nothing. Can’t go wrong.”

    Elon Musk
    Design is complete when there is nothing else to remove

    This ended up being the working design. There is no heat generated at all from the camera after hours of use so the heat was just purely the regulator.

    Conclusion

    If you would like to try and make the internal regulated version here is the wiring diagram.

    I don’t show it in this diagram but you would run copper tape up to the connectors to the left. Note that the copper tape goes under the regulator. This is required as the regulated voltage is collected from the heatsink. The center pin of the regulator is NOT connected. The input voltage pint is soldered directly to the +ve tape.

    When putting copper tape down you will need to solder each strip together as the sticky part of the tape acts as an insulator.

    For the none regulated version the -ve side is to the edge of the battery. If you already have a Canon LP-E17 it should show the markings to confirm.

    If you would like to make the same adapter the STL files are below along with the buck converter used and connector.

    Step down power buck converter: https://jasonwinfield.nz/product/step-down-power-supply/

    Custom Camera Firmware can be found here: https://chdk.fandom.com/wiki/CHDK

    STLS: https://cults3d.com/en/3d-model/gadget/lp-e17-dc-power-adapter

  • Getting started with ESP-01 and WLED - I have used the ESP-01 and WLED in a lot of my projects but haven’t really had an explainer video of how to get up and running, here, hopefully is all you need to know. Here is what you need to get started.

    I have used the ESP-01 and WLED in a lot of my projects but haven’t really had an explainer video of how to get up and running, here, hopefully is all you need to know.

    Here is what you need to get started.

  • DIY RGB Keyboard - In this project, I make an RGB keyboard using a K-Mart “gaming” keyboard. This keyboard already has an acrylic lens to allow RGB lights to filter through the keys. There is not an LED per key just 26 in total. Using the WLED effects you can customize your keyboard. I will be using this keyboard in a Hyperion ambient light setup in the future. Would you like to do the same mod? You just need the items below (and a keyboard)

    In this project, I make an RGB keyboard using a K-Mart “gaming” keyboard. This keyboard already has an acrylic lens to allow RGB lights to filter through the keys. There is not an LED per key just 26 in total. Using the WLED effects you can customize your keyboard. I will be using this keyboard in a Hyperion ambient light setup in the future.

    Would you like to do the same mod? You just need the items below (and a keyboard)

  • Megacharger - For my RGB trampoline project, I had the unique issue of having a dozen batteries to charge at once. This usually meant filling up the phone chargers in the house and playing merry-go-round after a few days of use. In this project, I build a charger that will fit and charge all the batteries for the project at once. Wiring diagram I used the following meter for check the voltage and current. 3D files: The STL and SVG’s for this project can be found in my Cults3D profile here.

    For my RGB trampoline project, I had the unique issue of having a dozen batteries to charge at once. This usually meant filling up the phone chargers in the house and playing merry-go-round after a few days of use. In this project, I build a charger that will fit and charge all the batteries for the project at once.

    Wiring diagram

    I used the following meter for check the voltage and current.

    3D files:

    The STL and SVG’s for this project can be found in my Cults3D profile here.

  • PSX controlled RC car - In this project, I try to control an RC car with a Playstation 3 controller. The PlayStation 3 controller uses Bluetooth to connect to the PS3. Here we use a ESP32 to spoof this connection and then use the controls to drive a small RC car. Would you like to build a similar product? I used the items below.

    In this project, I try to control an RC car with a Playstation 3 controller. The PlayStation 3 controller uses Bluetooth to connect to the PS3. Here we use a ESP32 to spoof this connection and then use the controls to drive a small RC car.

    Would you like to build a similar product? I used the items below.

  • Horror Mirror – Scare prank mirror - In this project, I wanted to make a mirror that looked pretty normal during the day and then spring a surprise when the lights went out showing a scary image and a playing a screaming sound. Using some mirror tint, LED lights, and an MP3 module I managed to make this happen. I have a shortlist of other videos around the project here. You can also make a scare mirror with the parts below. The controller will come with a full wiring diagram. 3D files The skull monster used in the project can be found here (Not my file)

    In this project, I wanted to make a mirror that looked pretty normal during the day and then spring a surprise when the lights went out showing a scary image and a playing a screaming sound. Using some mirror tint, LED lights, and an MP3 module I managed to make this happen.

    I have a shortlist of other videos around the project here.

    You can also make a scare mirror with the parts below. The controller will come with a full wiring diagram.

    3D files

    The skull monster used in the project can be found here (Not my file)