
Coal Hopper V2
lucari/Coal-Hopper
Arduino based stepper motor controller for model railway coal-hopper

Arduino based stepper motor controller for model railway coal-hopper
Coal Hopper is an open-source printed circuit board by lucari, from the lucari/Coal-Hopper repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 85.1 × 53.3 mm with 24 parts on 47 nets, routed with 131 tracks and 0 vias.
It is built around the TMC2209. Its parts include 9 connectors, 4 resistors, 4 diodes and 3 ICs. It belongs with the robots and motor control boards of this library.
This is an Arduino based stepper motor controller for a model railway coal-hopper.
*** The board and software has been updated as more requirements were uncovered. The original files can be found under the V1 folder ***
The design is based around an Arduino Nano and a TMC2209 Silent Stepper motor controller. There are 6 general I/O pins that are used for the home & optional away microswitches, trigger input, busy output, Train detection and Conveyor control. Trimmers are used to set the speed of the hopper, length or travel (if not using Away switch) and delay time at the Away position before moving home.
Note. The 5v supply on the I/O pins comes from the Nano voltage regulator. It will not be enough to drive relays and servos. In this instance, an external power source is required.
The end-stop switches can be Normally-Open or Normally Closed types and set by configuration variables in the software.
When a train is detected (reed switch), the conveyor motor, via a relay board, is turned on for a period of time.
When triggered by the level of coal in the hopper or the train leaving the unloading section, and after a delay, the stepper motor will move the hopper to the Away position. Once at the top and after a delay (when the hopper is emptied), the hopper will move back to the Home position. During this time, the busy output is used via a relay to disable track power in the unloading section.
At initialisation time, the hopper is moved back to Home. If the hopper is already Home, it is moved away for a few turns and then back Home.
The Arduino will normally be powered through the Stepper Motor supply. There is a jumper provided so this can be isolated if the Arduino is connected by its USB port to a PC. This will avoid conflicting power on the Nano.
The code is held under the Arduino folder. Any changes to the connections can be made at the top of the file. The code is written 'long-hand' to make it readable and maintainable.
A Custom PCB was made for this and can be found under the Kicad folder.

The image below shows a completed board.

| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | 1K | Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_Horizontal | R1, R2, R3, R4 |
| 2 | 1N4148 | Diode_THT:D_DO-35_SOD27_P7.62mm_Horizontal | D3, D4 |
| 2 | PC817 | Package_DIP:DIP-4_W7.62mm | U2, U3 |
| 1 | 12v Power | TerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_Horizontal | J1 |
| 1 | Arduino Nano | Module:Arduino_Nano | A1 |
| 1 | Arduino Power | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J2 |
| 1 | Away | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J9 |
| 1 | Away | Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J6 |
| 1 | Away | LED_THT:LED_D5.0mm | D2 |
| 1 | Busy | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J5 |
| 1 | Delay | Potentiometer_THT:Potentiometer_Piher_PT-6-V_Vertical | RV1 |
| 1 | Home | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J8 |
| 1 | Home | LED_THT:LED_D5.0mm | D1 |
| 1 | Home | Connector_JST:JST_XH_B2B-XH-A_1x02_P2.50mm_Vertical | J7 |
| 1 | Length | Potentiometer_THT:Potentiometer_Piher_PT-6-V_Vertical | RV3 |
| 1 | Speed | Potentiometer_THT:Potentiometer_Piher_PT-6-V_Vertical | RV2 |
| 1 | Stepper Motor | Connector_JST:JST_XH_B4B-XH-A_1x04_P2.50mm_Vertical | J3 |
| 1 | TMC2209 | Richard:TMC2209-Module | U1 |
| 1 | Trigger | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J4 |

lucari/Coal-Hopper
Arduino based stepper motor controller for model railway coal-hopper

creapunk/CLN-ClosedLoopNemaDriver
Compact closed-loop stepper motor driver designed for NEMA motors


wntrblm/jellyfish-and-starfish
Jellyfish and Starfish are control boards designed for use with the LumenPnP. Starfish controls the base of the machine including X & Y axes and pneumatics.

NikodemBartnik/StarTrckr
Open source star tracker for deep sky astrophotography
RParkerE/OpenSilicon
OpenSilicon enables DIY semiconductor fabrication with open-source guides for building IC equipment at home. The project includes BOMs, 3D files, firmware, and PDKs, supporting makers and researchers in chip fabrication.

AdamTuraj/PicoMMU
A Klipper expansion board intended to run a MMU unit to control a stepper motor and servo.

TheContrappostoShop/Apollo
Control Board for the Prometheus mSLA Printer.

Duet3D/Duet3-Mini5plus
This repository also contains information in the Mini 2+ : a two driver expansion board for the Duet 3 mini 5+
It measures 85.1 × 53.3 mm and has 2 copper layers, 1.6 mm thick.
24 parts, built around the TMC2209. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the lucari/Coal-Hopper repository on GitHub, at the commit this page was made from: the board is V1/Kicad/Coal-Hopper.kicad_pcb and its schematic Kicad/Coal-Hopper-V2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).