Dumpcar series 31-638 [WIP]
The prototype
Here is a video of the real thing in action:
The model
The goal is to make the model in 1/87 scale that has motorized function of bed tipping to both left and right, and has moveable sideboards with kinematics like on a real one.
The project is still in-progress, so here is a latest short video of it.
Actuation
I’ve considered different ways to motorize the tipping function, as there are different types of motors, each with their own pros and cons.
-
RC Servo. Pros: has positional control built-in. Cons: even the smallest one is way too big to fit.
-
Linear RC microservo. Same pros and cons as above, might be easier to design the kinematics around (or not).
-
Stepper motor with built-in gearbox and linear screw drive. Cons: too large to fit.
-
Micro DC motor from smartphone vibrators. Pros: tiny, simple control. Cons: too long (including shaft), too little torque and too high RPM.
-
Bare stepper motor. Pros: tiny and give full control over kinematics. Cons: attaching anything to a tiny shaft is difficult.
All of considered options require additional electronics to control as they are either low voltage or need special drivers.
| Fun fact: the stepper motors with linear drive that are currently available on aliexpress come from smartphones with retractable cameras (e.g. Xiaomi Mi 9T). There are some photos of disassembled camera modules, where such stepper motor assemblies are visible. This means that when these smartphones go out of fachion, the steppers will disappear from market. |
For arrangement, I was initially considering placing the motor in the frame of the wagon, and some kinematic links to connect it to the bed. This way some larger motors could be accommodated. But after comparing and looking at available options, I settled on a micro stepper motor inside the pneumatic cylinder model, with a screw attached directly to its shaft. Space in the frame was given to electronics.
To attach a screw drive to the stepper motor, I first tried to glue an M1 screw to the shaft with superglue. This approach can be seen on the last 2 photos above. This proved to be too fragile, as contact surface was too small, so I invented a way to solder the screw to the shaft, using steel-capable flux. To keep screw and the motor aligned, I made a resin-printed alignment jig where both the motor and the screw could be secured.
Current pickup
For current pickup I wanted to experiment with ways to increase number of contact points to a maximum, i.e. make each wheel (not wheelset) a pickup. For this, I used "AC" wheelsets, where "AC" means "for 3 rail Marklin system". In these wheelsets both wheel are electrically connected to the axle (compaed to DC wheelsets where one wheel is isolated from it). I cut the axle in half, 3D printed a joiner and connected the halves, so that pickup can happen on axle from both sides of the joiner. The pickups themselves are makde from phosphor copper bronze wire of 0.4mm. (I want to try phosphor bronze sheet later).
The electronics (custom DCC decoder)
To control the model with established model railroaders tools, a DCC decoder is needed. It needs to have specific functionality to control stepper motors and preferrable must be small enough to fit in the wagon itself.
I couldn’t find any decoders with stepper control ability, so I decided to develop my own (honestly, I haven’t looked, but I’ve never heard of any). For added challenge, it had to fit into wagon’s frame, which is 6mm wide.
Components selection
MCU: PY32F030 in QFN20 3x3mm package.
I was considering STM32C0 or STM32L0 in the same package, but they had less features (C0) or were more difficult to work with (L0), so I decided to use PY32 that I already had available. I had PY32F003, but PY32F030 is a drop-in replacement with same amount of flash/RAM (and available at JLCPCB at the moment). Originally I was also considering 5V supply (which would make STM32’s impossible), but then went to a more widespread 3.3V.
No special requirements for MCU, only ability to work crystalless, GPIO interrupts and some timers. UART is used for debug output.
Motor drivers
Initial idea was to use a generic dual H-bridge IC (DRV8835, which I used before for DC motors), but to use miniature 5V steppers on ~15V track voltages, some current limiting would be needed to avoid burning up the motors. So I decided to use dedicated stepper controllers, DRV8428 in particular, to benefit from its built-in current control and microstepping. It comes in a slightly larger 3x3mm package (DRV8835 comes in 3x2mm package). To fit the components into PCB, most of extra features were dropped, e.g. control of microstepping from MCU, control of current from MCU.
Other
I’ve summarized my search for miniaturized components in this post.
Bridge rectifier is made of TECH PUBLIC B5819WT SOD-323 Shottky diodes, which are rated at 40V, 1A (and 0.6V drop at 1A).
Voltage regulator is a <24V input, 3.3V, 50mA output LDO TPS71533DCKR-TP in SOT-363 package. It’s also from TECH PUBLIC. I used TECH PUBLIC components quite a lot in this design.
DCC reading is done via one diode (also B5819WT) and one resistor, a simplest possible circuit that is still safe and delivers correct logic HI and LOW levels on all possible track voltages. I picked the circuit from this article. 2 is lowest number of components that can be used here, except direct connection with a large-value resistor. This is somewhat unsafe as track voltage can leak into 3.3V line via MCU’s internal clamping diodes. The chosen circuit won’t work to sense analog voltage or detect ABD/CDB voltage changes, but since the decoder is not for locomotive, it’s not needed anyway. No RailCom circuitry is implemented too (to keep PCB small and to not overcomplicate my first decoder design).
Input buffer capacitors are 0603 22uF 25V capacitors from muRata. I couldn’t find any comparable energy storage in this package from other manufacturers. The PCB was manufactured with 0603 capacitors, but for next version I changed it to 0805. While 0805 package has the same limit of 22uF/25V (at least that’s maximum on LCSC), there are more manufacturers that provide the densest devices, so it’d be easier to source in general.
While ordering PCBA, I made a mistake, so the PCB was manufactured with 6.3V capacitors instead of 25V, which I had to replace to be able to run on 15V tracks. However, nothing failed when I tried to do it for a brief period of time.