# Thoughts on designing a new controller

**URL:** <https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453>\
**Category:** Electronics\
**Created:** [July 8, 2019, 5:13pm UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453 "2019-07-08T17:13:29Z")\
**Posts on this page:** 20\
**Page:** 12

<div class="post-metadata">

**Author:** ![dlang](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/dlang/32/859_2.png) [@dlang](https://forums.maslowcnc.com/u/dlang)\
**Post date:** [August 5, 2019, 2:32am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/221 "2019-08-05T02:32:25Z")

</div>

that can work. pinouts of the stepstick modules are at  
[https://learn.watterott.com/silentstepstick/pinconfig/tmc2130/](https://learn.watterott.com/silentstepstick/pinconfig/tmc2130/)

ideally we would want to support both the standalone and the spi mode (the spi  
mode allows for the detection that the stepper has run into the end of it’s  
travel without needing limit switches), as that would let us use any stepstick  
module, but since we are using spi for the encoders, if we only supported that  
it wouldn’t be the end of the world.

David Lang

---

<div class="post-metadata">

**Author:** ![slomobile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/slomobile/32/6235_2.png) [@slomobile](https://forums.maslowcnc.com/u/slomobile)\
**Post date:** [August 5, 2019, 3:11am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/222 "2019-08-05T03:11:45Z")

</div>

> [@blurfl](#):
>
> > wire insert blocks for motors and encoders
> 
> Using a [6 position Phoenix connector](https://www.digikey.com/product-detail/en/phoenix-contact/1778803/277-2319-2-ND/2625553) in place of the JST connector would accomplish that, Phoenix makes screw terminal mating connectors.

That still requires 2 parts to mate though if I am looking at the right part. I was thinking something more like this [1824460000 Weidmüller | Connectors, Interconnects | DigiKey](https://www.digikey.com/product-detail/en/weidmuller/1824460000/281-2024-ND/1094362) through hole, but for good reason, they are robust. Wires do not accidentally pull out. I’ll keep looking for SMT. You just push down the tab and stick the stripped wire in the hole. Same to remove it. I work with high school kids using these all the time, pretty fool proof as long as they dont let stray strands touch.

---

<div class="post-metadata">

**Author:** ![slomobile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/slomobile/32/6235_2.png) [@slomobile](https://forums.maslowcnc.com/u/slomobile)\
**Post date:** [August 5, 2019, 3:20am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/223 "2019-08-05T03:20:09Z")

</div>

> [@dlang](#):
>
> on-board antennas or connectors for antennas

Any opinion on which of those we should use?

---

<div class="post-metadata">

**Author:** ![blurfl](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/blurfl/32/9_2.png) [@blurfl](https://forums.maslowcnc.com/u/blurfl)\
**Post date:** [August 5, 2019, 3:26am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/224 "2019-08-05T03:26:06Z")

</div>

> [@slomobile](#):
>
> You just push down the tab and stick the stripped wire in the hole.

That’s the way that wires attach to the Phoenix mating plug 👍🏻

> [@slomobile](#):
>
> as long as they dont let stray strands touch.

[Wire ferrules!](https://www.ebay.com/itm/Crimp-Tool-Kit-Ferrule-Crimper-Plier-Wire-Stripper-800-Connector-Wire-Terminal-/112995349358)

---

<div class="post-metadata">

**Author:** ![slomobile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/slomobile/32/6235_2.png) [@slomobile](https://forums.maslowcnc.com/u/slomobile)\
**Post date:** [August 5, 2019, 3:28am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/225 "2019-08-05T03:28:17Z")

</div>

> [@dlang](#):
>
> > SPI lines going to  
> > the encoders. I made an awful mess of a cable to see if I had any problems and  
> > it worked great, but I still think shielding those cables is a priority.
> 
> shielding or going with a balanced signaling so that you can use twisted pairs.

When SPI fails due to cables it is usually due to too much capacitance in the cable limiting at high speed, not shielding. A differential driver inserts propagation delay. What kind of signal and environment did you test the encoders in?

---

<div class="post-metadata">

**Author:** ![slomobile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/slomobile/32/6235_2.png) [@slomobile](https://forums.maslowcnc.com/u/slomobile)\
**Post date:** [August 5, 2019, 3:46am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/226 "2019-08-05T03:46:51Z")

</div>

> [@blurfl](#):
>
> Wire ferrules!

We started using ferrules in March and like them. I tried to get other teams using them and there was a lot of pushback about unnecessary cost and labor. Their tune might change if they short the FPGA.

Is the disconnect force high enough on the Phoenix? I don’t see any locking tabs. I’ve tried some off brands that slide apart under their own weight. If someone doesn’t zip tie a motor cable and the plug disconnects while running, what is the worst that could happen? Sled runs off the workpiece, sled jams and bit starts a fire. Maybe our current sense should check for under current as well to sense disconnects and shut down safely.

---

<div class="post-metadata">

**Author:** ![blurfl](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/blurfl/32/9_2.png) [@blurfl](https://forums.maslowcnc.com/u/blurfl)\
**Post date:** [August 5, 2019, 3:54am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/227 "2019-08-05T03:54:38Z")

</div>

> [@madgrizzle](#):
>
> stepper motor driver that can be optionally installed would be awesome.

Thinking further about this, if we’re talking about the Z motor, we could route the Z motor control signals to a header in parallel with the L298 for that channel. A firmware setting would choose whether the firmware sends PWM /ENable to those pins for the L298 or STEP/DIRection for a stepper daughterboard. I don’t think the L298 would interfere with the stepper signals and the header would take very little board space. The encoders specified don’t use the MOSI signal, so SPI wouldn’t be as easy to handle. The stepper control signals are almost a ‘gimme’, though.

---

<div class="post-metadata">

**Author:** ![slomobile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/slomobile/32/6235_2.png) [@slomobile](https://forums.maslowcnc.com/u/slomobile)\
**Post date:** [August 5, 2019, 3:59am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/228 "2019-08-05T03:59:30Z")

</div>

> [@dlang](#):
>
> stepstick modules

You are talking about stepper for just the Z axis right? What do you think of a testbed 5 stepper motor Maslow built with these [NEMA17 or NEMA23 Turbine Worm Gear Stepper motor - RobotDigg](https://www.robotdigg.com/product/1378/NEMA17-Turbine-Worm-Gear-Stepper-motor?gclid=EAIaIQobChMIpsvOysHn4wIVCZ6fCh3Y-w3dEAQYBSABEgI7TvD_BwE)  
and this  
[https://www.tindie.com/products/33366583/grbl\_esp32-mpcnc-cnc-controller-ver-12/](https://www.tindie.com/products/33366583/grbl_esp32-mpcnc-cnc-controller-ver-12/)  
Already built, just needs code.

---

<div class="post-metadata">

**Author:** ![dlang](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/dlang/32/859_2.png) [@dlang](https://forums.maslowcnc.com/u/dlang)\
**Post date:** [August 5, 2019, 4:43am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/229 "2019-08-05T04:43:25Z")

</div>

it doesn’t make any difference to the software, layout the board to support the  
on-board antenna (hanging off the end of the board the module is soldered to)  
and you support both versions.

default to on-board, that will work for most people, separate antennas are one  
more thing that can go wong for them 🙂 but there should be a special order  
option for a few bucks more to get one with an external antenna for those who’s  
shop is a significant distance from their house and it’s wifi (the built-in can  
still be made to work, with an extra AP involved to relay the signal or with  
purely local connectivity (no Internet) but it’s far better to be able to hook  
up a high-gain antenna if you really need it.

David Lang

---

<div class="post-metadata">

**Author:** ![dlang](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/dlang/32/859_2.png) [@dlang](https://forums.maslowcnc.com/u/dlang)\
**Post date:** [August 5, 2019, 4:45am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/230 "2019-08-05T04:45:17Z")

</div>

we have very little data we need to move, so we should be able to slow the clock  
down a LOT to make it more reliable.

David Lang

---

<div class="post-metadata">

**Author:** ![dlang](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/dlang/32/859_2.png) [@dlang](https://forums.maslowcnc.com/u/dlang)\
**Post date:** [August 5, 2019, 4:54am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/231 "2019-08-05T04:54:48Z")

</div>

> You are talking about stepper for just the Z axis right? What do you think of  
> a testbed 5 stepper motor Maslow built with these  
> [NEMA17 or NEMA23 Turbine Worm Gear Stepper motor - RobotDigg](https://www.robotdigg.com/product/1378/NEMA17-Turbine-Worm-Gear-Stepper-motor?gclid=EAIaIQobChMIpsvOysHn4wIVCZ6fCh3Y-w3dEAQYBSABEgI7TvD_BwE)

very low holding torque (so it’s not a worm drive). you would have to add  
absolute mode encoders to the output shaft for this (or at the very least, an  
index pulse)

> and this  
> [https://www.tindie.com/products/33366583/grbl\_esp32-mpcnc-cnc-controller-ver-12/](https://www.tindie.com/products/33366583/grbl_esp32-mpcnc-cnc-controller-ver-12/)

nice idea, but I don’t like that it has hard-coded microstepping (no jumpers)  
and cannot use the more advanced stepper drivers

> Already built, just needs code.

code is always the hard part 🙂

but I will bookmark this for use on other things.

David Lang

---

<div class="post-metadata">

**Author:** ![dlang](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/dlang/32/859_2.png) [@dlang](https://forums.maslowcnc.com/u/dlang)\
**Post date:** [August 5, 2019, 5:30am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/232 "2019-08-05T05:30:48Z")

</div>

they do have suitable worm drives, such as

> **[RV30, RV40, RV50 or RV63 worm gear reducer - RobotDigg](https://www.robotdigg.com/product/1452/RV30,-RV40,-RV50-or-RV63-worm-gear-reducer)**
>
> NMRV series worm gear speed reducer is a new-generation of product developed by our company on the basis of perfecting W...

  
and  

> **[Heliostat worm gear nema23 or nema34 Stepper Motor - RobotDigg](https://www.robotdigg.com/product/567/Heliostat-worm-gear-nema23-or-nema34-Stepper-Motor)**
>
> Heliostat Drive SystemNema23 3A 76mm High Torque Stepper Motor RV30 Worm Gear Reducer 10:1, 30:1 or 60:1 Ratio for 11mm ...

  
but at ~$60 each, that’s getting pretty pricy.

you would probably want something in about the 30:1 gear ratio for accuracy.

David Lang

---

<div class="post-metadata">

**Author:** ![blurfl](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/blurfl/32/9_2.png) [@blurfl](https://forums.maslowcnc.com/u/blurfl)\
**Post date:** [August 5, 2019, 6:24am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/233 "2019-08-05T06:24:03Z")

</div>

> [@madgrizzle](#):
>
> there are no pre-assembled devkit type boards with more than 4mb flash. Only way to get that is use the modules and add the missing components.

Looking at the BOM for the ESP32 DEVKITC-V4 with a 16MB version of the WROOM-32D, the parts would come to around $15 when the parts are bought in single quantities.  
[Bom\_ESP32-WROOM-32D DEVKITC-V4.csv](https://forums.maslowcnc.com/uploads/short-url/jC1IZYUZ0tsRAZ6Q96fnZJ3RVEP.csv) (3.1 KB)

---

<div class="post-metadata">

**Author:** ![blurfl](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/blurfl/32/9_2.png) [@blurfl](https://forums.maslowcnc.com/u/blurfl)\
**Post date:** [August 5, 2019, 6:30am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/234 "2019-08-05T06:30:04Z")

</div>

> [@dlang](#):
>
> who’s shop is a significant distance from their house and it’s wifi

> [@FIRE RISK, CNC, Dust, Shop Vacs and Air Filters - a cautionary tale](https://forums.maslowcnc.com/t/fire-risk-cnc-dust-shop-vacs-and-air-filters-a-cautionary-tale/10714):
>
> It seems like this comes up every few weeks here and on every CNC forum, usually in relation to people saying they are comfortable walking away from a running CNC machine for a while - with or without cameras monitoring it. Don’t, it’s unsafe and the fire risk is real - I know. I recently joined a local Makerspace that has a 4x8 Shopbot professional CNC. It has high rapid and cutting speeds and lots of power. I was using it last weekend to cut a large project (3’x5’) and the controller or PC…

🔥

---

<div class="post-metadata">

**Author:** ![JohnC](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@JohnC](https://forums.maslowcnc.com/u/JohnC)\
**Post date:** [August 5, 2019, 7:19am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/235 "2019-08-05T07:19:03Z")

</div>

If you want to go with a custom board with a Pi driving it take a look at the PCA9629 from NXP. It connects over I2C and handles all of the timing and driving it also has built-in ramping.  
[https://www.mouser.com/new/NXP-Semiconductors/nxppca9629/](https://www.mouser.com/new/NXP-Semiconductors/nxppca9629/)

---

<div class="post-metadata">

**Author:** ![dlang](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/dlang/32/859_2.png) [@dlang](https://forums.maslowcnc.com/u/dlang)\
**Post date:** [August 5, 2019, 7:55am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/236 "2019-08-05T07:55:07Z")

</div>

I didn’t say anything about leaving the machine unattended, but the machine  
needs to get updates and be able to fetch g-code from the Internet (especially  
with maslowcreate pending)

David Lang

---

<div class="post-metadata">

**Author:** ![dlang](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/dlang/32/859_2.png) [@dlang](https://forums.maslowcnc.com/u/dlang)\
**Post date:** [August 5, 2019, 7:58am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/237 "2019-08-05T07:58:27Z")

</div>

1. we need a controller for DC motors and encoders, not steppers

2. any ramping needs to be done at the direction of the central motion  
controller logic, as it needs to coordinate different axis

---

<div class="post-metadata">

**Author:** ![dlang](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/dlang/32/859_2.png) [@dlang](https://forums.maslowcnc.com/u/dlang)\
**Post date:** [August 5, 2019, 9:38am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/238 "2019-08-05T09:38:08Z")

</div>

this controller may be something we can use as a common testbed, it’s got  
h-bridge support for two motors,sd card, esp32 and a bunch of other i/o

> **[ESP32 LED, Motor, and High Current Driver by wmeckman on Tindie](https://www.tindie.com/products/wmeckman/esp32-led-motor-and-high-current-driver/)**
>
> An ESP32 based controller that can drive any kind of LED strip, or motor. Includes a microSD slot, USB-UART, and large voltage range input.

it is too early to pick something like this and define it as ‘the’ new board,  
but it may be something that people who want to work on the software, but not  
the hardware could consider working on rather than waiting for hardware to be  
produced

they also have these boards that may be worth experimenting with

> **[2x10A Motor Driver HAT For Rasberry PI by Cytron Technologies on Tindie](https://www.tindie.com/products/Cytron/2x10a-motor-driver-hat-for-rasberry-pi/)**
>
> Raspberry Pi, the HAT-MDD10 is designed to drive two high current brushed DC motor up to 10A controller

  

> **[10Amp Dual DC Motor Driver Shield for Arduino by Cytron Technologies on Tindie](https://www.tindie.com/products/Cytron/10amp-dual-dc-motor-driver-shield-for-arduino/)**
>
> SHIELD-MDD10 is a 2-channel high power motor driver shield for Arduino. Able to support 10 Amp per channel continuously.

  
and  

> **[Waveshare Motor Driver HAT for Raspberry Pi Zero/Z by MakerUSA on Tindie](https://www.tindie.com/products/trustedseller/waveshare-motor-driver-hat-for-raspberry-pi-zeroz/)**
>
> The Motor Driver HAT is designed for Raspberry Pi, I2C interface supporting two DC motors. It's ideal for robotics

  
(3A per motor)

David Lang

---

<div class="post-metadata">

**Author:** ![slomobile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/slomobile/32/6235_2.png) [@slomobile](https://forums.maslowcnc.com/u/slomobile)\
**Post date:** [August 5, 2019, 11:47am UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/239 "2019-08-05T11:47:21Z")

</div>

Low data rate and slow clock makes me feel better about it. Found this reference, Extending the SPI bus for long-distance communication [http://www.ti.com/lit/an/slyt441/slyt441.pdf](http://www.ti.com/lit/an/slyt441/slyt441.pdf)

---

<div class="post-metadata">

**Author:** ![slomobile](https://yyz1.discourse-cdn.com/flex031/user_avatar/forums.maslowcnc.com/slomobile/32/6235_2.png) [@slomobile](https://forums.maslowcnc.com/u/slomobile)\
**Post date:** [August 5, 2019, 12:13pm UTC](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453/240 "2019-08-05T12:13:21Z")

</div>

> [@dlang](#):
>
> very low holding torque (so it’s not a worm drive). you would have to add  
> absolute mode encoders to the output shaft for this (or at the very least, an  
> index pulse)

Holding torque is a spec for just the stepper. It says it is a worm. Up to 30:1. so multiply torque by 30 and add whatever factor being a worm drive gets you. Gearbox looks an awful lot like the current Maslow box.  
Steppers do not require encoders for accurate open loop operation. Since GRBL is intended for steppers, there is no need to abandon that functionality. It makes sense to keep it as an option alongside servo drive. If it is an option, there should be a hardware reference design to test it with. That is what I was suggesting. If you think it requires higher specs, that is fine by me. What do you think of keeping the stepper drive option in the software?

[Previous page](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453.md?page=11)

[Next page](https://forums.maslowcnc.com/t/thoughts-on-designing-a-new-controller/10453.md?page=13)
