▲ 1 r/Motors

How does PWM work in Three Phase Sinusoidal Current?

Hi there!
I'm building a three phase linear motor in a wye configuration using FOC, and I have a question:
How does the PWM work with the sinusoidal current? Each coil has a half bridge, and they're all connected at neutral.

For example, say 𝜃=0. Then U=sin0=0, V=sin120=sqrt3/2, W=sin240=-sqrt3/2. So it makes sense that when the PWM is in its low state, it should be floating, and in its high state, it should be at its relevant voltage (For U, V+ if 𝜃<180, otherwise GND (could this not also be represented with neutral as the reference point, where V+ = N+V/2, and GND = N-V/2??)). But what if it's more like U=1, and V=W, then U is always providing current, but V and W are only sinking it to ground part of the time? But then U would only be on at the same duty cycle as V and W because otherwise its an open circuit, which makes me think that when PWM is in its low state, it's GND, and in its high state, it's at the relevant voltage. But what if it's idle? Then it's wasting all of the power holding a position - even when FOC commands zero torque!

Please help!
Thanks!

reddit.com
u/YANNTASTIC5915 — 5 days ago
▲ 23 r/PrintedCircuitBoard+1 crossposts

[Review Request] Seeed XIAO nRF52840 Plus Split Ergo HE Keyboard w/3DOF Trackball. USB/BLE/2.4GHz (w/Dongle)

Schematic Review: here

MCU: Seeed XIAO nRF52840 Plus (nRF52840).

Trackball sensor: 2x PMW3610.

Encoders: Bourns PEC11H-4115F-S0020

5Ah battery, 300-400mA (probably too high)/1A/2A charging depending on USB source current.

Trimodal power supply, favouring USB.

MCU disable-able latching power button (avoiding MAX16054 for cost reasons).

Keydio Labs Vista508 OLED.

PMW3610 lives on its own board.

Mainboard: 55x50mm

PMW3610 board: 24x24.5mm

Finish: OSP, black soldermask

I am aware that Q5, 6, 7 have incorrect pinouts. That has been fixed.

SW1 and 2, and their respective connectors are marked as exclude from board, as they are mounted in the chassis.

Thanks!

u/YANNTASTIC5915 — 13 days ago

Schematic Review: Seeed XIAO nRF52840 Plus Split Ergo HE Keyboard w/3DOF Trackball. USB/BLE/2.4GHz (w/Dongle)

Schematic review: here

Schematic:

MCU: Seeed XIAO nRF52840 Plus (nRF52840).

Trackball sensor: 2x PMW3610.

Encoders: Bourns PEC11H-4115F-S0020

5Ah battery, 300mA/1A charging depending on USB source current.

Trimodal power supply, favouring USB.

MCU disable-able latching power button.

Vista508 OLED.

2x PWM3610 live on their own board.

PCB:
Mainboard - 55x50mm

PMW3610 board - 24x24.25

Finish will be OSP, black soldermask.

Test points included for VBUS, VBAT, +3V0, GND.

Supports dual config - same PCB for left and right.

Left - DNP J10, BT1(R)

Right - DNP J11, BT1(L)

Thanks!

Edit:
I am aware that Q5, 6, 7 had incorrect pinout based on the part number (SSM3K35CTC,L3F). I've fixed it in the PCB.

u/YANNTASTIC5915 — 14 days ago
▲ 7 r/SurfaceLinux+1 crossposts

Surface Laptop Studio 2 bad performance.

Hi there!

I've been using my SLS2 with surface-linux for a while, and have always noticed the short battery life, mainly due to the laptop itself, but didn't realise how bad the performance was. Recently, however, I've been trying to play some games on it (e.g. Empulse, The Finals, even Rounds), and they all run terribly - I can't get 15 FPS consistently in Empulse or the Finals, and Rounds is super stuttery.

The games used to run perfectly fine on windows.

Everything is using prime-run. I've looked at GPU (and CPU) usage, and they're both around 40%. I've disabled the power cap on the GPU (4050), according to the instructions on the GitHub. Performance mode is enabled in various ways - powerprofilesctl, tlp, and many others. There is no thermal throttling - GPU temp is around 60C, and the fans are running at full. PCIe width is correct under load.

Linux-surface, arch, Nvidia-open-dkms: latest version.

How can I fix this?
Thanks!

reddit.com
u/YANNTASTIC5915 — 21 days ago
▲ 0 r/KiCad

KiCAD Library Importer

Hi there!

I just wanted to share a quick Linux tool that I (I say I, it was completely vibe-coded, however, read my note at the end) made.

I tried many other library loading tools (Library Loader (worked fine on Windows, couldn't get it to work on linux), impart GUI for KiCAD, etc), but none of them seemed to work well/work at all. Therefore, I made this.

It's designed to take a downloaded '.zip' file and import all of the symbols, footprints and 3d models into KiCAD.

It handles tries to handle most cases of bad file naming, by replacing (some) bad symbol (file) names with their contained symbol name (not that it matters much anyway). It also extracts the footprint name from the file and links the symbol to the footprint. Finally, it links the 3D model to the footprint. I've found lots of part databases frequently come with the model in the wrong position and orientation, so it will not always be perfect. However, that is not the fault of the tool, and there is no way that I can rectify this.

Disclaimer:

  • It has not been rigorously tested. It has been iteratively refined based on my feedback, but there may still be edge cases that crash, corrupt files, or produce subtly wrong output.
  • It is not production-grade. There is no test suite, no error-recovery, no logging to disk, no undo, no validation that the patched KiCad files are still semantically valid.
  • It overwrites nothing by default (collisions get _1, _2, etc.), but you should still back up your existing ~/.local/share/kicad_libs/ directory (provided you have one) before using it on real libraries.
  • KiCad file parsing is regex-based. The script assumes the input files follow standard KiCad S-expression format. Malformed files, exotic variants, or future KiCad format changes may break the patching.
  • Use at your own risk. If something goes wrong, the worst case is a corrupted .kicad_mod or .kicad_sym file in your library directory — recoverable by re-importing the original ZIP.

I know there has recently been a lot of vibe coded slop on this sub - https://www.reddit.com/r/KiCad/comments/1v7g62x/meta_mods_please_ban_nonopen_source_posts/ is a prime example of the opposition to it. However, whether you choose to use this or not, it is open source, works in the majority of cases, is useful, and I hope that it will be able to help at least a few people.

https://github.com/YANNTASTIC/kicad_lib_importer/tree/master

Thanks!

reddit.com
u/YANNTASTIC5915 — 24 days ago

Schematic Review: Seeed XIAO nRF52840 Plus Split Ergo HE Keyboard w/3DOF Trackball. USB/BLE/2.4GHz (w/Dongle)

MCU: Seeed XIAO nRF52840 Plus (nRF52840).

Trackball sensor: 2x PMW3610.

Encoders: Bourns PEC11H-4115F-S0020

5Ah battery, 300mA/1A charging depending on USB source current.

Trimodal power supply, favouring USB.

MCU disable-able latching power button.

Vista508 OLED.

1x Encoder, 2x PWM3610 live on their own board, connected via mouse-bites.

Thanks!

u/YANNTASTIC5915 — 26 days ago