Software apps and online services
Hand tools and fabrication machines
ReFILL-ament, is special Amazon DRS enabled device, that helps you calculate the usage of the filament for 3D printers, and re-orders itself when the filament is about to run out.
All the 3D printers print the object using the filament, melting it and shaping it up as per the required specification. Filament is like the ink refill of our pen. Without refill ink, we cannot write and without the filament, we cannot print 3D objects.
So what happens, when we have thought of an idea! Prepared a 3D model for the same after many iterations, and we are eager to print it visualize our imagination. Until, you realize that you don't have enough filament to print the object! That actually kills the imagination and the enthusiasm in us. So to avoid that embarrassing moment, ReFILL-ament takes care of your usage, and orders on your behalf, so that you never run out of filament and the new one arrives before the old runs out!
The basic idea is to create a complete standalone device that orders the filament on the preferences chosen earlier while configuring. The device would be packed in 3D printed enclosure, so that it is easy to maintain it. Being USB-powered, there will be less of hassles!
ReFILL-ament reads the RFID card attached to the filament to identify which filament is currently under use. It also as an IR Array on the reverse. So, the design on the RFID card is made such a way that it cuts 3 IR in sequence. A combination of RFID information, and a complete IR sequence, helps the device to count the number of turns, and eventually estimate the remaining filament on the reel.
Following video shows setup of ReFILL-ament with your 3D-Printer and register your ReFILL-ament device with Amazon DRS by production registration webpage.
Following video shows how ReFILL-ament tracks usage of maximum three filament reel and place order on Amazon on your behalf when quantity of any of three filament is less then 30% using filament reel preference (ABS/PLA and Color) for each filament reel selected during ReFILL-ament Product registration process with Amazon DRS.
(NOTE: In this video 1 unwound is considered 1% usage just for demo purpose, in real use based on length/number of wounds of filament this percentage use can be set to actual)
- Stand Alone device works with any 3D-Printer without even touch 3D-Printer.
- Track usage of 3 filament spool and can be used to track more spools with little modification in the code.
- USB powered device with Support of most of Amazon DRS API by ESP8266.
- Meaningful status display on OLED Display.
- if Internet connectivity not available than also tracks filament usage.
- Same project can be used for track any kind of spool usage and reorder the same. So its not only applicable to 3D-Printer.
- As filament ordered from amazon, dimensions of spool are known so using following calculation almost perfect percentage filament usage can be implemented.
There are two aspects of configuration.
1. Configuration on the website side for choosing the preferred filament for each slot.
2. Configuration on the device to provide it with the WiFi network credentials to connect to and the authorization code received in step one, to make the orders on our behalf.
I will explain the configuration part once we have created the individual pieces such as creating a Security Profile to use with Login with Amazon, creating an SNS Topic, building a web page, etc. For now, the individual parts are explained below.
To use your Amazon account for ordering the filament, we need to use the LWA service to link your Amazon account and the DRS app to place the order.
As a first step, we need to create a new security profile to use the Amazon LWA. Below are the steps for the same.
After following the above steps, you now should have the following details with you.
1. New Security Profile
2. Security Profile ID
3. Client ID
4. and a specified return URL of "https" type.
In this short video, I have tried to explain how to configure Amazon SNS. If you have any doubts, leave them in the comments below, and I'll try answering them.
In this video, I'll show you how to create a new device on the Amazon DRS.
Once we are done with these steps, we can now create a webpage for configuration as discussed earlier, which will be used to select our preferred filament and generate the authorization code for ReFILL-ament.
Once we are done with creating all the individual elements, we are now ready to generate the authorization code from the DRS service that will be used to place order by ReFILL-ament.
For creating your own product registration page, you may use any of the free hosting platforms available such blogpost, wordpress, etc. Note that you must have a service that supports https.
I have hosted my website on Amazon AWS Simple Storage Service(S3).
You can choose your preferred service. I prefer Amazon AWS for most of my projects. So I prefer this. This tutorial on Hosting a static website on Amazon S3 is well documented and I have followed the same to host my website.
Also, I have used Amazon AWS's Route 53 service for DNS management and routing the domain to my custom domain. The documentation for the same has been covered under hosting a static website on Amazon S3(Step 5).
Here is the video explaining the process of product registration.
The code for the website has been uploaded to Github repository mentioned below. You can have a look at the same. The things you need to take care are:
1. Return URL
2. Extracting Authorization Code from the return URL.
After registration, you should now have the Authorization Code, to be given to the ReFILL-ament device so that it places the order on your behalf.
The hardware for ReFILL-ament includes (BOM):
- NodeMCU board build around ESP8266: for internet-connectivity ensuring when the filament is about to run out. - 1
- RFID Reader: to know which filament is in use. - 1
- IR Transmitter/Receiver: to count the number of turns of the filament reel. - 3
- Push Buttons: for configuration - 3
- OLED Display: To display the Wi-Fi connectivity status and other information with ease. - 1
- A Buzzer - 1
- A Micro USB Cable to power up the whole system. - 1
- Soldering equipments
Schematic included as attachment of this blog and Code for nodeMCU is available in my Github Repo link included in attachment.
So below are the photographs of the basic circuit, Cards with RFID and BW pattern for each spool and 3D-Printed enclosure for the hardware. So, the complete circuit will be packed in enclosure and look aesthetically better.
Here are the photos of the circuit turned on with components and enclosure.
Initially, I decided to use the RFID card available in the market and make the pattern on it using black and white paper. But then, it wasn't looking aesthetically good. So I opened up the RFID card, took out the circuitry from it, and created a circular ring which fits perfectly on the filament reel. This ring serves both the purposes, of RFID detection as well as the pattern to count the filament.
Below is the video for the OLED Display Test
Your valuable comments are welcome.