Time to build!
We ordered our boards from PCBWay, and after a few weeks, we received all the components and the board. Here's what the boards looked like:
Something interesting is that a few large via arrays on some of the boards were visibly slanted and one board had a broken 2nd layer zone:
After contacting PCBWay, it turned out that the slanting was actually within their specification (the vias were connecting two large zones together so it was technically fine). The broken zone wasn't, but they immediately sent us more boards to replace that one, which was great.
Soldering
This is pretty standard, but it's still worth going over. The first step was to apply solder paste using a stencil. We used Kester 256. Since nearly all the components are on the top side of the board, there was no need for two pastes (it's common to use two different solder pastes with different melting points / curves so that the first side you soldered doesn't flow when you solder the second side).
Then we placed the components. The area with the power supplies (where the inductors are) was a little bit tricky because the MAX17573ATG+ is a QFN, which can often have shorted solder joints after coming out of the oven, so we deicded to handsolder the passives around that chip later. Since the inductors are hard to handsolder due to having large pads underneath them, we decided to bake them too.
After baking, it looks pretty much the same:
We then decided to finish soldering just the microprocessor section of the board to verify that this was working prior to finish soldering all the other components in the power supply section. It was then that we realized that there was a mistake with the reset button - the footprint was incorrect and the reset line would constantly be shorted to ground, causing the processor to be in constant reset and be unprogrammable.
RESET_RAW
should be on pin 2, not pin 1 or the grounding pin. We cut the RESET_RAW
lines on pin 1 and soldered a wire between the grounding pin (now connected to RESET_RAW
) and connected it to pin 2, which was then connecte to RESET_RAW
pad next to the SWDIO port.
After finishing the soldering and some fixing:
with the red wires used to fix the mistake with the reset button. To test the microprocessor, we burned an itsybitsy m0 bootloader over the SWDIO port using these instructions and uploaded a simple 'hello world' script, which worked!
Then we finished handsoldering the power supply peripherals:
And the board was finished! Here's the overall layout diagram:
Errors:
Voltage sense
There was one mistake which put the board in jeopardy, however. The way that hot-swapping works here relies on the microcontroller being able to read the voltage of each battery and turn each on / off using a mosfet array. Here's the schematic:
The critical part is that the voltage sensing happens after the ideal diodes on each battery. The current travels from the battery &larr diode &larr board / voltage sense &larr mosfet array &larr rest of board. What we didn't know when designing the board is that mosfets can conduct in reverse. Thus, with one battery active (it's mosfets on), being able to conduct in reverse results in the mosfets for the disabled battery effectively putting both batteries in parallel (minus a small voltage drop on the enabled batter) at the voltage sense pin for the disabled battery. Thus, the voltage on the disabled battery can't be read - the microcontroller can't even tell if it's plugged in - when the other is on.
The fix to this was to change that 'chain' from earlier so that the voltage sense would occur prior to the diodes in order to isolate each sense pin: battery &larr voltage sense &larr diode &larr board... by cutting a few traces and soldering on a small jumper cable.
Mosfet Driving
The PMOS used CSD25404Q has a max gate to source voltage of ±12V. Unfortunately, a silly mistake meant that they would actually be subject to battery voltage (greater than ±12V), which would instantly kill them. The schematic shows a simple fix:
putting a 1k resistor right before the source of Q1 and after the bases of Q[3:6] divides the battery voltage for the bases using R12. Although it was a little tricky to solder that new resistor in, it was doable and worked well.
Other than that, the board worked great, with all the peripherals and power supplies working great!
Programming
It was then just a case of programming the board. This was fairly straightforward, with the overall logic being very simple:
Basically the same thing for each board... hopefully it's straightforward. There are a few edge cases, but everything is pretty easy.
Installation
This was pretty straightforward. With a few 3D printed brackets and some work in soldering the ESCs to the board, everything was assembled onto the electronics plate to go into the sub:
With the ESCs zip-tied to the bottom:
Then we installed the entire electronics plate and connected all the peripherals into it, and it worked!
More problems:
We discovered a few software bugs, but they were easy to fix and overall things worked well! In fear of having the board be shorted by dust, we also chose to conformal coat the board using silicon conformal coating. Unfortunately, some got into the reset button and made it unreliable, but an exposed reset pad and the SWDIO port allow the microprocessor to still be reset if necessary.
No comments:
Post a Comment