I recently built the (hopefully) final master station and train h-bridge pcbs. Here are they, just out of the acid, freshly drilled:
The master station is basically just a breakout board for the ATmega328P. I made a separate crystall oscillator on a small piece of protoboard. I could've went with a ceramic resonator, but I didn't have any at hand, and the crystal is more accurate anyway.
Here is the full master board with the mcu, the oscillator, connectors for the serial, power and ISP, and a LED on the usual PORTB 5. All other pins are accessible and there is also space for a pull-down resistor if needed. I've only connected the TWPC cables yet.
Here is the picture of the H-bridge with the four SMD mosfets. It works great, not like the last one. No shortage, no overheating, drives the motor perfectly.
The brain of the train engines is just the MCU itself, it didn't even deserve an own board, a protoboard was just enough. It will be standing in the front of the loco. Behind this will be the h-bridge connected to the yellow wires. The led will be the headlight of the train.
The last piece of the puzzle (for now) is this adapter I made for the raspberry. There is a 4050 ic converting the avr's 5V signal to 3V3, ensuring safe uart connection between the master staion and the pi.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.
Good stuff. Love a neat handmade board.
Are you sure? yes | no