Showing posts from October, 2011

Moving code from ESP8266 to ESP32

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…

Calibrating RepRap Prusa

I thought my troubles were over once I've got all the parts for building my 3D printer, including the replacement for some defective parts.

As usual, I was wrong: Once I have finished building it and tested all the electronics it comes the moment to select a working firmware. There are several choices for RAMPS hardware but I selected Sprinter firmware as it includes acceleration control plus many people use it. But firmware alone is not complete till you've added all the different adjustment parameters so your hardware works together with the firmware the expected way (ie. a 10 mm move in the G-CODE causes a 10 mm move in your printer).

I was excited because once I tested with a thermometer that the hot-end heating and temperature reading was working nicely I thought it will be easy. I used RepSnapper for this basic tests, and next I tried to print a text object. Result was ok, but measurements were still a bit off. But when I attempted the design in the center of this pictu…

Finishing my Reprap Prusa 3D printer

It's been a long wait to finish building my Reprap Prusa Mendel, to source all of the different parts and then to wait for some replacements of defective electronics. The building time has not been very long as I have had long waits in between, but I'd say it can be easily done over a weekend if you have all the parts.

Now I have to configure it and to master into the use of the system. My total cost is near 500€ and I have chosen some hardware to be better than average, so I guess cost can be driven down a couple hundred euros if you really push it to the bare minimums. I do not have yet any printed samples to show you though.

I can mention the companies I bought from that have given me a good service: XYZ printers (hardware), (plastic & extruder), (electronics & PLA filament), Zapp Automation Ltd (stepper motors).

One of the things that have worked for me that can allow you to save so cash is to use both, the stepper motors and the belt…