How to Make a 3D Printed and Automated Train Set
by 22Josh22 in Workshop > 3D Printing
75 Views, 0 Favorites, 0 Comments
How to Make a 3D Printed and Automated Train Set
Hi! Our names are Josh Elijah and Sophia
Sophia and I are seniors in high school, and Elijah is a junior, we all want to pursue careers as mechanical engineers. Our First Idea was to try and make an RC car but due to lack of materials on hand we had to improvise and we decided to make an Automated Train set.
The main idea behind the locomotive was to utilize an ultrasonic sensor in order to alert the locomotive as to when it is approaching the end of the line--in turn prompting it to reverse directions. To be more specific, the ultrasonic was coded to prompt a response from the motor when it sensed the end buffers to be within 4 cm of it. As for the drive train, the motor was connected to a smaller gear directly, and the smaller gear drove a gear of equal size that was compounded via a shaft with a smaller bevel gear. This bevel gear drove a larger bevel gear that was located on the driving axle, and in theory, this would propel the locomotive. What we failed to consider, however, was the level of adhesion the locomotive would have--as not only was the locomotive underpowered, but it also could not grip the rails at all. Additionally, the smaller gear connected to the drive shaft was not attached via mechanical methods to the hot glue holding it in place coming undone and the gear essentially spinning in place.
Designed on, On Shape, 3D Printed on a 6 x 6 Prusa mini and a 440 x 440 x 465 mm Ender 3.
Supplies
Materials used
- Ply Wood
- PLA Filament Diameter: 1.75mm weight 2.2 lbs. Can be purchased HERE
- HXBER Bambu Lab, 3-axis. Motor Can be purchased HERE
- Arduino Uno. Can be purchased HERE
- breadboard. Can be purchased HERE
- Shield-MDD10. Can be purchased HERE
- male-to-male wires. Can be Purchased HERE
- #8-32 x 1/4" Screws. Can be purchased HERE
3D Printing the Tracks
Let's get started with the Train tracks three things need to be downloaded and the track we made is about 9 inches long. We started by just creating mockups, ideating via drawings, and playing around to see what worked.
We were first beginning to think about how to make the tracks connect we first were going to go with dovetail joints from a Project earlier this year, but we decided to keep it classic with puzzle joints like toy train sets do and just make it easier to connect.
Creating the Locomotive
Of course, no train set would be complete without the train itself–and for our project, we had initially had a few ideas as to how we would go about creating it. Initially, we were going to model the locomotive off of a pre-existing design–such as a China Railways LD1 or another smaller tank engine. However, due to the time constraints put upon us (we only had around 2 weeks for this project), we determined that attempting to make our model prototypical would be a poor choice. However, if any of you decide that you would like to make a scaled-down model of a preexisting locomotive design, we would suggest keeping the following in mind:
- Don’t overestimate your abilities: While it can be incredibly tempting to attempt to make a larger articulated design such as a Big Boy or AC-9, those kinds of models are likely best suited for individuals who have some form of prior experience with railway modeling. As such, sticking to a simpler design such as a tank engine–or even creating your own freelance locomotive design and modeling that–would likely be your best bet. All in all, model the locomotive that you believe best fits you and your capabilities.
- Make sure that you will have space for electronics: Another major reason behind our group choosing to create a take engine for our locomotive model is the fact that the cab and bunker space of the model could be utilized to house the electronics and motor. This was further corroborated by the fact that we were utilizing an Arduino and motor shield to power/control the locomotive–and those components can take up a lot of space (especially if you have multiple wires and a larger motor). Thus, when creating the locomotive model (specifically the locomotive shell), making sure that you allocate sufficient space for the electrical components of the model is key to making operations efficient.
- Be creative: Do not be afraid to exaggerate some aspects of your design–this project is just as much an opportunity to be creative as it is a great exercise to combine multiple engineering skills! Thus, making a locomotive with a large headlight, huge driving wheels, etc. can make the final product more unique. Just be sure not to exaggerate too much, however–the final design still needs to be practical.
After determining that modeling a real-life prototype would be too difficult, we actually ended up repurposing an older CAD model that one of our team members had from a previous project in our class. Said model was of a locomotive-shaped pencil holder, and it was created in an attempt to create a product that could be made with only additive manufacturing methods (such as 3D printing). However, if scaled up and modified to be a shell that could be mounted to a frame, the locomotive design was perfect for a locomotive model. Additionally, the part drawings for the wheels were already available because of the CAD document–thereby making the design for our final locomotive design much easier than it would have been otherwise. So, the process of creating the locomotive started with this modification. The frame of the locomotive pencil holder was removed completely, and the inside of the cab was modified to be much more hollow to allow for the Arduino and breadboard to rest nicely inside. Bolt holes were also added to allow for a new chassis to be created and attached easily. The final part of creating the locomotive involved wiring and coding the electronics, but that aspect of this project deserves its own section.
Downloads
Coding and Wiring
- Set Up the Breadboard Wiring:
- Connect the motor to the breadboard.
- Attach the motor wires to the output pins of the H-bridge.
- Wire the motor input pins to the Arduino’s pins to control motor direction (front or back).
- Connect the ultrasonic sensor’s trigger and echo pins to the Arduino’s pins.
- Link the power supply to the Arduino to provide power to the motor, sensor, and Arduino.
- We wrote a program to make our motor spin in forward and backward
- If the train approaches within a set distance, reverse the motor direction by sending the appropriate signals.
- Ensure the code includes delays to handle continuous movement and reversal.
- Test the System:
- Power on the setup and test the train’s forward movement.
- Place a barrier on the track and confirm the sensor detects it and triggers the train to reverse.
- Adjust the code or wiring as needed.
- Fine-Tune Performance:
- Check the train’s traction on the tracks and modify it so it runs correctly.
Challenges We Faced
We encountered several difficulties during the project. Initially, the code had many errors that prevented the motor from functioning correctly, requiring a lot of debugging. After resolving these issues, we struggled to ensure the train had enough traction on the tracks to move reliably.
Hope These Instructions Helped!!
There were some challenges during the creation of this project, particularly with the wheels and getting them to effectively move the train. We had to troubleshoot and experiment with different methods to address the issue, but it was a learning experience that helped us grow our problem-solving skills. If we could do this project again, we would definitely focus on refining the wheel mechanism to ensure smoother operation and reliability. Additionally, we would enhance the code by adding more special features, such as improved motion control or interactive elements, to make the train more dynamic and engaging. Overall, these improvements would not only elevate the project's functionality but also showcase a deeper understanding of the engineering concepts involved.