MicroMod modular driver idea

All of those pins in the Micromod connector. & the definitions of how they are handled.

The detail of any specific implementation (EG the way Sparkfun have done their STMxx board) doesn’t matter. That is; the existing Micromod spec doesn’t define that PA1 should be pulled high on a STMxx board. It has no opinion about it.

unspec

Sparkfun could have done other things with it and remained within the spec, other board designers in the future could do different things with it and remain within the spec.

I’m still not clear. Could you use the schematic picture I posted and circle the pins that need to be preserved, and then I will assume all other pins are fair game to be changed? Don’t think about STM32, stay within the connector pinout please.

To me these are the ones I cannot touch, ground and input voltage, as well as SWD.

1 Like

AFAIK all of the purple pins here G0 > G11


Easier to view here

Could be further defined for your STMxx use case.

What’s a Module Key?

A gap in the M.2 connector that defines its type; Type E Type B etc.

I see, Sparkfun simply designated the physical keyout / cutout as Module Key. Got it. That’s helpful, thank you.

So we have 12 GPIO assigned to whatever we want to do.

  1. Eight PWM motor control (BLDC or Stepper)
  2. One enable = 9
  3. Three current sense = 12

You know, this may actually work. And there is one un-connected pin on top which could be re-purposed, and if we are careful with the other pins which are also multiplexed this is a winner IMO.

I will keep this in mind and revisit in a month.

@Sam . @samuk

Great idea, thank you.

Cheers,
Valentine

Edit:

@runger, could you please split this into a MicroMod Motor Control thread so we don’t dilute this one?

Cheers,
Valentine

1 Like

If on further inspection it seems like it might be viable, we could also informally extend the spec to include the 2242-sized cards.

All the existing MicroMod ones are 2230 dimensions, but Sparkfun says" “We currently plan to only have 22x22mm MicroMods Processor Boards but this may grow in the future.” Designing with MicroMod - SparkFun Learn

We could choose to grow this and provide both 2230 and 2244 mount holes on any carrier boards we design.

22x22 will be sufficient for small MCUs but higher end MCUs will require 30x42 boards. Even 22x42 won’t work. 30x30 will be an option, may be, and I see the bolt hole is the same as 22x30, but it’s a tight fit unless you go for 2-side SMD which will dramatically increase cost.

1 Like

Guys, I know you are getting into actually doing things, but I think it’s taken a bit of a detour. I think this desire to make everything mix an matchable is good on some levels but it cannot practically take the place of actual, complete, distinct, finished designs. Libraries and standards help pave the way to finished designs, but sooner or later someone has to put things together into something that can actually improve life directly.

At Open Source Ecology, Marcin loved the idea of “scalable” designs. He wanted to be able to make systems you could simply scale up. I had to convey to him that it makes more sense to have a handful of actual complete designs than one parametric, “scalable” design. I know this is different, but I think it’s kind of biting off more than is needed to try to make the MCUs swappable.

The history of GNU was also kind of like that. They wanted to make things super good and spent years making the foundation and doing things, but they weren’t delivering. Then Linus came along and make linux really quick and the GNU guys realized their road to nirvana wasn’t the best idea really.

I think it is advisable to start with one single flagship combo to replace the shield+uno+AS5600, which is not so hot.

I’ve already designed three MCU swappable designs and this is standard industry practice, also separate effort from a low-end hobby/diy integrated design. This won’t work in a low-end low-cost design. In a high end design such as EV, modular is the only way to go.

We need to split this effort off into a separate conversation. I will try to create a low cost integrated Lepton-Pro however I leave the manufacturing, software and documentation to end users, I’m not interested in this.

2 Likes

Done, I split the MicroMod conversation to this new thread

2 Likes

One thing that’s a bit of a shame is that the gold plated edge connectors will come with a surcharge that will affect the prototype costs quite a bit… or does JLC do them free?

And if we’re deviating from the standard MicroMod pinout, and targeting higher end applications with it, I think we should be sure to include all the pins needed for advanced control applications…

I will think a bit on it, but IMHO this would include:

8xPWM for BLDC or steppers
7xADC for current sense, voltage sense and bus voltage
1xPWM for braking or PFC
1xEN
1xSLEEP
What else?

That would allow 1 motor with advanced features or even two motors with 3-PWM and current sense

1 Like

As we’re discussing standards, it’s probably about time someone dropped this in the thread

I’m really keen to see if we could not deviate from that standard, or at least not too far. I realise it may not be possible. Maybe we do need another for STMxx/ SimpleFOC use cases.

12 flexible pins, plus the 2x existing PWM & 2X existing ADC in might be enough to do something useful? Keeping SPI/I2C/CAN & UART as they are.

If not maybe this section

Could be re-purposed as ADC sense, Put all the PWM on G0 > G11, you’d then still be ‘mostly’ compatible with the existing Sparkfun stuff.

It looks like PCBway will do them free “First of all,it is without extra cost for producing gold finger and beveling.”

You don’t need gold-plated connectors, you can get away with tin-plated. Yes, there is a surcharge (JLC). I have no first-hand experience with PCBWay.

Looking at the pin-outs, the external control pins such as canbus, i2c are already broken out so it’s just about documenting which pin has what purpose in the motor control scheme.

I’m not sure even G431 would be worth this investment, perhaps only H7 series would benefit from this modular design since the driver boards that would use it would be high end. G4 would probably be a borderline case. The real benefit I see in the design is where you have use cases that require you to swap MCUs and re-program them. For example, the high-power EV board I designed, if the MCU was part of the design, this would have made experimenting different algorithms and schemes impossible. Once you put the driver into the car, programming and re-programming it in the field is very hard. A lot easier to pop the MCU off and on on the track, bring it to a cool (warm?) and dry place (say it’s raining on the track), reprogram it in the pit by a person sitting in a chair and not getting blown by the wind and rain, and have like 5 MCUs with different use cases pre-programmed and swap them. Also the kids managed to burn 4 or 5 MCUs already, since they don’t have any discipline and they have like six or even up to ten hands touching this unprotected at all time, if it were hard-wired to the driver, that’d be a really expensive development effort, to toss the whole board, and re-install a driver, because someone burnt out a single pin, since the very first thing they managed to do was connect 12V mosfet high power driver input to the 3V digital inputs and had the magic smoke literally out of the box, that’s a $300 board which survived the assassination attempt.

Another benefit would be where the M.2 board would form a mezzanine with extra layers and be able to be shielded from EMF, in essence creating a stacked design with a smaller footprint.

1 Like

On some boards I did for a different project, JLC did bevel and HASL edge connector for free. Maybe that is just with small volume?

Depending on the type, but if you do what they call “Economy” everything is a surcharge.

I was looking at the MicroMod SparkFun concept.

This will work only in multi-core concept for motor control. Single-MCU will dramatically degrade performance.

Hence, this is my current take on the idea.

The F103 is very mature MCU with a massive and well maintained Arduino code-base.
The G431 is a 128k 170MHz MCU which is also very well supported by SimpleFOC and Arduino, proven to have excellent motor control features.

Both are really cheap.

Therefore we use the F103 for the standard MicroMod pins, and the generic pins are for motor control from G431.

The F103 is used for external communication, I included a 3.3v CAN transceiver. Also we connect the F103 with the G431 with both I2C and UART for chip-to-chip comms.

The board has to be 4-layer 0.8mm, I’m not sure if we even need chamfer. The 22x22 with two MCUs will be a tight fit but can be done since the power and protection will be external. The G431 will operate in a crystal-less mode, since the F103 will handle the crystal-critical comms.

We have to somehow handle the problem where we need to program two MCUs, but that’s also doable. I see plenty of empty pins on the STM32 version of the MicroMod.

The only unfortunate issue is that it will only do 6PWM. The G431 of that footprint doesn’t have 8PWM pins exposed (i.e. no steppers). For steppers we need the bigger board with the larged G432 footpring with extra pins, and get creative with the extra pins. Also the bigger board will allow us to get the G431 op-amps exposed too. If you believe the steppers are a must we can just go with the bigger board and forget about the 22x22.

G431 ~= $1.60
F103 ~= $2.40

You get a dual-core board for less than $10 with none of the hassle of programming a dual-core MCU.

I welcome all criticism as long as it’s constructive.

Cheers,
Valentine

1 Like

The reason why the H747 is so relatively expensive is because it has shared memories between the two cores. The 7x7mm pack w. 4 gate drivers would kick ass

You mean the UFBGA169 package? I don’t think JLC can SMD those. Plus I’m not interested in dual-core designs.