Posts

Showing posts from March, 2014

Moving code from ESP8266 to ESP32

Image
A while ago I made a mashup of Dan Royer's code CNC 2 Axis Demo with my own code for trapezoidal motion stepper and servo control for ESP8266.

I assumed porting the code to the ESP32 would be trivial, and that was true for the most part: changes like library name being Wifi.h instead of Wifi8266.h were not a problem. UDP now does not like multicharacter writes but you can use print instead. So far so good.

However, when it came to the interrupt code I was stuck with the stepper interrupt causing an exception sometimes. And to make things weirder, the servo interrupt worked flawlessly (both of them had the IRAM_ATTR directive if you ask me).

Going little by little, I could narrow down the culprit to a floating point operation during the interrupt, that would cause problems sometimes but not always. Browsing around I found this post. Where the solution was simple: do not use floats within the interrupt routines but doubles. The reason was the float calculation would be performed by…

Viewing g-code files in Linux and OSX

Image
Working with CNC machines and 3D printers and developing CAM software myself I need a tool to quickly display the 3D view of any g-code file generated. For a while I have been using EMC2 software on Linux and Pleasant3D in OSX. The former was a bit picky about certain commands that were not understood that would prevent the displaying of a file completely. The latter is ok, but being oriented to 3D printers, it is not very convenient when handling files of several square feet. It works but your viewing ability and angles are a bit limited.

After a bit of searching and playing with several potential candidates I have settled with version 0.2.3 of OpenSCAM that I had used in the past on Windows but somehow was not available at the time for OSX or Linux (or I was lazy enough not to try to compile it from the sources myself). Current version worked nicely in OSX and gave me some minor problems in Ubuntu Linux, that could be solved by installing libv8-dev library and doing a soft link. And…

Delta 3D printers

Since the presentation of the Rostock 3D printer, I have been amazed on the kind of motion that these machines make to print a part. While I have found quite hypnotic the way layers are deposited to create plastic part using fused filament fabrication, when the process is done by a delta robot instead of by a cartesian robot, the show is even more interesting.

However the Rostock was a big machine, not compatible with the space I have available at home. But when I saw Richard's 3DR printers, I thought it was a good way for me to venture into the interesting world of this type of printers. Contrary to the Rostock, the 3DR had a small footprint so I built one. But that was just part of the challenge.

Delta 3D printers use three vertical parallel carriages linked by a set of rods to a central platform where the hotend is placed. But contrary to some other printers, those vertical axis are not screw-driven but belt-driven, which allows very fast motion. As a result, Delta 3D printers …

Of pumps and stepper motors

Image
I have been quite busy lately due to several factors. One of them things not working out as expected. Of course every failure is a learning opportunity and this case, my chance to get familiar with the world of hydraulics and fluid dynamics. As a Computer Scientist, you do not get any training on that matter (other than maybe learning about fans for cooling down electronic parts).

I have been working for more than a year on a project where the least I was expecting was to have trouble with what it is eating a lot of my time lately: pushing a viscous fluid in a precise, controlled-way, from a container to the printing area of a 3D-printer we have designed and successfully built as part of our research project.

If you are familiar with 3D printing, you can think of us trying to create a reliable paste extruder. There are many open paste extruder designs out there, but many are designed for not so viscous pastes or liquids. Others can handle viscous fluids but only a very small amount of…