Posts

Showing posts from November, 2012

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…

Driver update

Image
A few days ago I learned in the RepRap forum about a new stepper driver from Pololu using the DRV8825 from Texas Instruments. I have read good things about this family of drivers being more robust and higher current than Allegro A4988. Well, thanks to the kind offer from Pololu I've got a few units for testing (at a huge discount) and my first impression is pretty good.

This may well be the answer to get a direct drive extruder that does not suck. I have detailed in past posts how I was unable to get a successful direct drive extruder working in my system, as I was needing more current that my electronics were capable of, for my extruder to work reliably at medium speeds. This new driver seems to be able to push 1.5A without the need of active cooling. The manufacturer claims that up to 2.5A per coil are possible with proper cooling.

Next stop is to use them for powering a CNC machine with beefier nema23 motors.

Stellaris ARM Cortex-M4F kit

Image
When I saw this summer that Texas Instruments was giving away ($4.99 shipped is a steal) Stellaris boards sampling their Cortex M4 with floating point unit I thought I could not go wrong, as it was already cheaper than any other kit I have bought in my life. After a while I've received a big box at home, than contained a smaller box, that eventually had the small card and USB cable inside.

The first impression was very good. But once I've got the board up and running I wanted to start making some sample programs for testing its capabilities. There is where I felt a bit dizzy. Texas lists a lot of tools to be used, some can be downloaded from their site, others are free versions of commercial products with a limited functionality.

I guess  that these years using Arduino have spoiled me, as  I have been able to complete different projects without having to have a look at any AVR datasheet. Even worse, I get used to the idea I could be developing code in different platforms (Linu…