Microscope 2

May 02, 2022

The next steps of this project were to find a source of precise movement and then to make those devices useful via Python scripting. The Creality Ender-3 Pro 3d printer was chosen as a source of linear actuators, and the Printrun 3d printing host software was used to interface with it.

First, the 3d printer was assembled according to its packaged instructions, with the hand tools provided. Very little additional work was needed and the instructions were sufficient to get it up and running. Special care needs to be taken with cable management, however, and we had to partially disassemble the printer when it was almost finished in order to put one of the cables in its appropriate position.

A test print was attempted from the ones on the included microSD card, but the print failed and resulted in a stringy mess. This seemed to be due to a temperature/filament mis-match, however, and the motion of the printer was as expected. Since we will not ultimately be using this printer to print and are only using it as a source of parts that does not include the "hot end", this type of failure means that we've nevertheless succeeded in our first goal.

Secondly, we needed to control the motion of the printer in a precise and programmable way. Our chosen printer is able to move its bed along one axis, and the print head along two axes, in increments down to 0.1mm. It also accepts commands over its USB port in the form of G-code, which takes the form of linebreak-separated text commands.

Actually connecting to the printer from the Raspberry Pi was more difficult than it seemed; attempting to use the pyserial library to connect directly only resulted in failure, so we have used the Printrun software instead to establish the connection and send commands to the printer. The Printrun package was installed on the Pi by executing the shell command sudo apt install printrun, and can be invoked from within Python after including the appropriate libraries within the script.

Additionally, the cooling issue of the Pi itself has been resolved for now with the addition of a 40-pin ribbon cable between the Pi and the LED hat. The LEDs on the hat can be turned on and off as before, but the gap between the two devices should help prevent either from overheating.



Back