At this point in the project, we have the color sensor system ready to be attached to the printer to start detecting the filament. A few things to note are that due to availability of Arduino parts in the labs on campus, we used a different microcontroller board and sensor than in the original design plan. The functions are identical.
The microcontroller we had available was the Arduino Mega 2560 Rev3:
And for the actual RGB sensor, we had the ISL29125 RGB Sensor:
To setup the sensor system, we soldered wires to the sensor’s 5 pins. There is a pin for power (3.3 V), ground, two pins for I^2*C lines (SDA and SCL), and a pin for an interrupt. We then connected the wires to the corresponding pins of the Mega 2560 microcontroller. The pin connections are intuitive: Ground goes to ground, 3.3 V to 3.3 V, SDA to SDA, and SCL to SCL. For our project, we have no use for a an interrupt, so it was not connected to any pin on the microcontroller.
IMPORTANT NOTE: The Mega 2560 microcontroller has a 5 and 3.3 V power source. The sensor can only handle the 3.3 V and if a microcontroller supplies it with anything else, it will destroy the sensor. If any other microcontroller is to be used, make sure it is either 3.3 V compatible OR if higher (such as 5V), a logic level converter is needed.
Once the hardware portion of the sensor was complete, we needed to setup the software portion where the sensor sends signals to a computer and the results are read and displayed. The specific Arduino Library for the sensor, as well as other information on the sensor, can be found online (free of course!) here: https://learn.sparkfun.com/tutorials/isl29125-rgb-light-sensor-hookup-guide
Once the library was downloaded, unzipped, and brought up in the Arduino IDE, we had a fully functional RGB color sensing system! We tested the sensor with different colors and the displays changed accordingly, assuring we had working components.
The next challenge for the project is attaching it to a printer, so it can detect the filament. The printer we will be using currently has the following print head setup, utilizing the yellow filament guide to guide the white filament directly into the nozzle:
From here, we wanted to construct a similar filament guide, that would still function as a guide but also as a housing for the sensor system. We took measurements of the print head setup and used these to model and then 3D print a similar setup that houses a wheel of sufficient size to be read by the sensor, but small enough to not interfere with the setup.
First, we modeled the identical filament guide that was already on the printer.
We then needed a way to mount the sensor system and a filament detecting wheel to this filament guide. For this function we designed the following part:
The two holes with “+” marks show where the sensor will be attached. The large circular hole is to be attached to the printer. The small hole is for the axis which will hold the wheel that touches the filament. From here we designed a housing for the sensor that incorporated both designs. By combining the designs, the final part is stiffer (therefore more stable on the printer) and can be mounted on the print head precisely. The following is that model:
Next, we realized the model needed to hold the axis more steadily so we added extra support on the other end of the axis:
Once we had the housing, we started designing the wheel, that would run against the filament. This was our first model:
Before we printed this wheel however, we noticed it should have a channel in the middle to allow for the filament to pass through. This would aid in guiding the filament as well as turning the wheel due to an increased contact surface area. This led to our next design, which we felt was ready for printing. We printed the following wheel design and our complete housing design with 3mm PLA filament in the FDM Lulzbot Taz5 printer, using Cura software.
The photo following the designs show the parameters used in Cura during all of our FDM prints. Since strength and finish were not as important for our parts, we chose these parameters to produce a quick print.
Our printed product with sensors and all:
From printing this design and adding it onto the printer, we noticed some flaws. As you can see in the design above, the wheel was very thin and the sensor would not accurately read the thin color strips on such a small surface. Along with a bigger surface, we also needed a rougher surface finish. The smooth surface on the wheel from FDM printing did not provide enough friction between the filament and the wheel, so it would not turn completely with the filament; there was some slip. We decided to add a larger surface area on the wheel and get a rougher surface finish from SLS printing. For the SLS part, we used the SinterStation 2500 in lab.
The following was our new design taking into account these flaws:
The newest setup worked well with enough friction on the wheel to move with the filament’s movements. Attached to the printer, this is what the filament detector looks like as a final product:
We used our filament detection sensor on the Lulzbot Taz5 printer because our project has a lot of equipment surrounding the print head and this printer had the largest print head and good support to mount our sensor structures.