New Maslow electronics using ESP32 instead of Atmega2560

The older teensy is already running several cartesian printers. Paul has a strong community of users as well. He has been incredibly responsible when developing and releasing his product and a major contributor to the Arduino community. Check out his kickstarter. He is one of the closest delivery to quoted projects I ever saw.

I recently looked at the ESP32. Don’t get me wrong I like the ESP boards. I’m not convinced it’s the best answer. There is strong support for using a raspberry pi as well. Not as an addon but as a controller.

This depends on who is going to develop the new controller board.

Edit - The ESP boards are designed for 1 thing IOT- Is the Maslow an ITO?

Thank you

I guess those approaches (castellated ESP32 or RasPi) are really re-boots of the project, needing to replace the hardware and re-write the software. Ambitious indeed.

The klipper project is written in Python, already developed, and uses hardware that is standardized for quality and, available to me at least at 2 retail outlets close by Target and Frys.

but yes - I’d consider any of this to be a Fork of the Maslow controller.

Thank you

The arduino was not designed for anything as fancy as controlling a CNC machine, that hasn’t stopped anyone from using it for that job.

A Pi is not a great fit for real-time work (a beaglebone black with it’s two PRC processors would be a good fit)

port the software rather than re-write (C is pretty portable), there are a few
problem points (EEPROM and pin assignments), but the librarires that are
avaialble in the arduino IDE handle a lot of it.

I’m really curious, what is the motivation to switch to different electronics?

Personally I want to put my Maslow on a network so I don’t have to keep a computer in the shop, but I’m wondering if the rest of you want to switch processors for the same reason?

for me, I see a few things.

  1. increased performance, we have some fairly nasty math in here and can run into limits from the slow arduino
  2. better communications (wifi and bluetooth)
  3. more headroom for future features (acceleration planning)
  4. with the multiple cores of the ESP32, isolation of the non-real-time tasks resulting in better movement of the machine.
  5. simplified kit, adding an ESP32 on the motor board to make a one-piece result will be a couple bucks cheaper, but also more reliable (how many people have plugged power into the wrong board)
  6. long term sustainability/flexibility, once it’s ported to a second board, it tends to be far easier to port to additional ones
1 Like

Which one looks best to you?

Please explain how it’s a couple of bucks cheeper? I’ll give you $15 to produce one. The mega goes for ~$12 complete. I understand the core is less however the core is not a complete system you need to interface it and there are cost involved.

Wifi and Bluetooth are great, how do you intend to work with the system if you can’t connect or simply put the wi-com core crashes?

Thank you

There are many ways to accomplish this with the current system. I have a Raspberry Pi as a remote desktop working very well under Ubuntu. You want a local computer to the controller - less than good things happen when your communication is over wireless while trying to do real time work. In your daily internet usage there are packets dropped, collisions and network failures you don’t see. When you are going to run a 27 hour tool path you need to have 100% communication for 27 hours.

The desire for mo - better is to have more resources to work with. The current system is reaching it’s limits and stressing it’s resources. The Arduino is old architecture. There are pros and cons to every choice and what is reasonable.

Thank you

Which one looks best to you?

I’m talking about something like these
https://www.aliexpress.com/item/WiFi-Bluetooth-4-2-dual-core-CPU-MCU-low-power-Bluetooth-ESP32-chip-ESP-32S/32829367382.html

they’ve come down in price, last I checked they were about $10/module, now they
are down under $5 each

We’d want them already soldered to the delivered board, probably a lot less than that retail price.

Of course we need a board designer experienced with surface mount microcontrollers and high(er) volume DFM

well, the Maslow is a fairly simple design, and aren’t we already using surface
mount chips for the motor controllers?

the castelated board design makes it really simple to attach to a board, just
leave pads in the right place and it gets soldered down pretty much the same way
that a surface mount chip would be (and in any case, is simpler than soldering
headers into through-holes)

Franly, I wouldn’t be surprised to learn that a motor driver board with an ESP32
soldered on it was within a few cents of the cost of a motor driver with headers
installed.

although if we add a USB plug and serial chip, that will raise the cost. But
I would not be surprised to see the two different versions within a dollor or
two of each other.

1 Like

You can get castellated ESP32 modules for almost unbelievably low prices if you’re willing to shop around. ESP-WROOM-32 (also known as ESP32S) seems to be the de-facto standard but there are others.

On AliExpress for 3.50: https://www.aliexpress.com/item/ESP-32S-ESP-WROOM-32-ESP32-ESP-32-Bluetooth-and-WIFI-Dual-Core-CPU-with-Low/32813569442.html

(This one seems almost too good to be true but it looks legit.) On Alibaba for “$1-$2”: https://gintech.en.alibaba.com/product/60703753128-804942635/ESP_32S_ESP32_WiFi_Bluetooth_4_2_Dual_Core_CPU_MCU_Low_Power_Bluetooth_module.html?spm=a2700.8304367.prewdfa4cf.17.f813b0aVvEDNl

FWW-

Thank you

Looking at those ESP-WROOM-32 modules - by the time we’ve weeded out the 6 pins that are brought to the edge but already committed to the on-board flash, the 5 strapping pins required boot selection, the 2 pins needed for serial I/O, the power and ground and Enable pins, the number of available gpio pins have dropped quit a bit.
The Adafruit HUZZAH32 is built using the ESP-WROOM-32 linked above, adding support circuitry (USB, battery, boot and reset) and bringing all available gpio out. I count 17 gpio available.
The Sparkfun Thing ESP32 is much the same thing with simialr support circuitry, and comes up with a similar number of gpio pins available. It doesn’t use the ESP-WROOM-32, it has similar circuitry built from discrete components.
The three motor/encoders currently require 5 pins per motor, though that could be reduced to 4 per motor using different driver chips. Offloading the encoder functions to a separate dedicated processor could reduce that a couple pins more. Using I2C or SPI expanders could make up for the limited gpios but add complexity.
Too, certifications are a concern if we’re talking about something to be sold, adding to the cost and complexity. Does anyone know whether soldering a certified module onto a carrier brings the blessings to the whole thing?

@blurfl

I was one of the first to receive the adafruit board. I’d love to say I have a clear example. I don’t but seeing and it is a RF design, adding any copper to it will change it, this would require recertification. The way around it is to make it a kit. That is in no way practical.

Thank you

Looking at those ESP-WROOM-32 modules - by the time we’ve weeded out the 6
pins that are brought to the edge but already committed to the on-board flash,
the 5 strapping pins required boot selection, the 2 pins needed for serial
I/O, the power and ground and Enable pins, the number of available gpio pins
have dropped quit a bit.

that leaves 20 pins free (and it’s very possible that the boot selection pins
can be used as outputs after boot.

The Adafruit HUZZAH32 is built using the ESP-WROOM-32 linked above, adding
support circuitry (USB, battery, boot and reset) and bringing all available
gpio out. I count 17 gpio available.

The Sparkfun Thing ESP32 is much the same thing with simialr support
circuitry, and comes up with a similar number of gpio pins available. It
doesn’t use the ESP-WROOM-32, it has similar circuitry built from discrete
components.

Both of these are pin compatible with systems that existed prior to the ESP32
being available, so the number of pins available is based on the huzzah/thing
standards, not the ESP module

The three motor/encoders currently require 5 pins per motor, though that could
be reduced to 4 per motor using different driver chips. Offloading the encoder
functions to a separate dedicated processor could reduce that a couple pins
more. Using I2C or SPI expanders could make up for the limited gpios but add
complexity.

I would choose a different chip rather than add an external processor (although
I would support having a hook to use an external processor to expand aux lines)

Too, certifications are a concern if we’re talking about something to be sold,
adding to the cost and complexity. Does anyone know whether soldering a
certified module onto a carrier brings the blessings to the whole thing?

That’s the purpose of having the module certified, the rest of the device needs
it’s own certification, but that’s for the circuitry not on the carrier.
Logically it’s exactly the same as if it’s socketed.

Would you be surprised to learn that the huzzah board brings every one of the usable ESP WROOM-32 module signals to the board edge, with the exception of one of the analog capable inputs they are using to monitor battery voltage, and one of the boot strapping pins that could put it into a mode to replace the boot loader? They’re plenty savvy at engineering. I haven’t been through the Sparkfun board in the same way, but I’ll bet it too brings essentially every gpio out as well. That ESP32 isn’t as gpio-rich as it might seem.
The present Maslow board works as an add-on to a cpu board made by others. It seems like a variation that would allow the user to plug in an ESP32-based board would make sense. We’ve had users need to replace their cpu card, and others need to replace their driver board. It would be a shame to have to replace the whole if only part is faulty.

Not sure I understand ‘different chip’? There are 6 encoder pins to watch in real time, one of the busiest jobs on the board. The ESP32 has plenty of speed though, and all its gpios can do interrupts. But committing 15 gpio pins (or 12 if we change drivers) to motors pretty much makes I/O expansion a requirement for AUX lines or SD file storage, using some of the remaining ESP32 gpios for signaling.

1 Like