October has been a month of pretty hardcore board layout fun. Two days ago I submitted a 3pcb order with 5 WHOLE BOARDS.
First up, a new ESC, ESC Mk 2:
Second up, basically the same board but without the microcontroller:
Third up: an NRF24L01+ controller board, using an STM32F303.
Fourth up: another NRF24L01+ controller board using an arduino, in case the above doesn’t work (lol):
Fifth up: a nice breakout board for Nucleos, intended to go in the Pasta Machine:
I will discuss these in order.
First up, the new motor controller! This motor controller is a huge update to my previous one. This board uses the DRV8323RS, a huge update to the DRV8301 chip that Ben uses. This board also uses an STM32F303K8, a smaller chip compared the the STM32F446 that I have used on past boards. Both of these chips make this board super compact, cheaper, and hopefully easier to solder. The F303 and DRV8323 are both sampleable (with free shipping!) from their respective vendors, making them effectively free for my purposes.
Why did I put in such effort to make this new motor controller when I already had a working one?
I wanted a better one. As soon as I was done with the Version 9 skateboard, I began to solder up a new motor controller for it. I wrote a hall interpolator and soldered up a new controller:
Installed on the board:
Log story short, something was wrong with this board and it worked but not well. The motor spun but it drew 3a at idle, which is a bit high. One of the ADCs on the 446 was messed up so instead of zeroing at Vcc/2 it zeroed at VCC/4 or something like that. While trying to debug the board, I accidentally touched the programming header to battery plus (16v) so RIP 446. I reflowed off and soldered on a new 446 (which was a REAL pain in the butt), but that board wouldn’t program. Rip In Peace.
I figured this was a good excuse to make a new controller that was hopefully smaller and lighter than the past one. Here were some of the pain points of Board 5:
- The 446, although fast, is just such a pain to solder. I never get the amount of solder paste right and so I have to spend a while removing solder bridges. And when you have to remove it and solder on a new one, good luck.
- The 446 itself is huge.
- The half bridge chips I used did not turn out to work that well. Although they were supposed to be only 2.7 milliohm, I think they had a lot of gate charge or something so they got pretty hot. They are supposed to be rated for 80a but could probably do only about 30-40 realistically. Maybe 20kHz is just too fast for them.
- The DRV8323 looked soooooooo nice so I just couldn’t resist…. It has a magical set of features, including automatic dead time insertion and fault detection. The gate drives are also current-mode so you don’t need gate resistors! This makes the board a LOT smaller.
- The DRV8323 even comes with a reference design!
And I like trying new things. Here is the board I came up with.
The DRV section largely copies the reference design. Unsurprisingly it worked out great. All the FETs on the top worked out pretty well too because the FETs go on the top and a huge array of ceramic capacitors go on the bottom. Every single pin on the microcontroller is used for something. Something also worth noting is that I opted to use the SPI version of the DRV8323, as it actually saves me pins on the micro as well as gives a lot of adjustable features. SPI is cool I guess.
Here are some general features of the board as designed:
- 60v max, probably 40a burst – depends on the FETs
- Automatic fault detection built in to the 8323
- A lot of space for ceramic capacitors, probably on the order of 100 uF
- A space for an electrolytic on the board!
- 3 shunt resistors instead of two, meaning it is possible to check for faults! Not sure if the DRV does this automatically.
- Connector 1: Timer3 channels 1, 2, and 3. Can be used for halls or an ABI encoder.
- Connector 2: General purpose IO which has: an ADC for pot input, a timer for PWM input, can also be used as just a digital IO. CAN is also broken out on two separate pins, one of which has a timer on it as well for a second PWM input or output. Maybe for a skateboard headlight or something.
- SPI is also broken out on pads on the bottom of the board.
- All pins are currently 2mm pitch pin headers. I could not decide what JST connectors to use, so 2mm pitch headers it was. They are nice to solder to.
- Same programming header as my last board. ugly but whatevs.
I’ll work on porting my F446 code into F303 code over the next week. Its also cool that I was able to design this ESC in just 15 days, compared to the entire spring it took for the last one. Hopefully it works!
Board 2: DRV8323 breakout:
This board is the backup board. On it is broken out all the important pins of the 8323, including SPI, PWM A, B, and C, the Enable pin, and 3.3v. If the board above doesn’t work (which is likely!!) I’ll use this one in the meantime.
Third board: STM32F303 NRF24L01 board:
The intended use for this is a wireless skateboard controller, which I’ve been putting off making a board for for about 3.5 years. I tried making this board with an Atmega328 a while ago but couldn’t get it to program. Hopefully this board will work! I made this board during a bus ride so if it doesn’t work no big deal.
Board 4: If the above board doesn’t work, I have this one!!!!
This board uses an arduino pro mini and therefore you’d have to try pretty hard to make it not work. I’m REALLY hoping a least this one works!
And the last one, board 5: a nucleo daughter board for the pasta machine. This board will hopefully resolve the current blob of electronics on the pasta machine. Also, Aaron and someone else expressed interest in building pasta machines of their own so I figured it was time to lay out a real board.
Broken out are places to connect a whole bunch of servos as well as PWM inputs and general digital IOs. I’m hoping to add a few new features to the pasta machine in the coming weeks (a boil time potentiometer and an OLED screen) and this board will enable me to do so without creating a huge rats nest of wires.
Some additional funsies (Thanks Mike), which I’ll just leave here:
There you have it. Good stuff is in the works.