|
Raspberry Pi Pico |
x 1 | |
|
L298N motor driver module |
x 1 | |
|
Male to male generic jumper wires |
x 4 | |
|
Male to female jumper wires |
x 9 | |
|
Female DC jack connector |
x 1 | |
|
12-volt DC power supply |
x 1 |
Raspberry Pi Pico Controlled Point-to-Point Model Railroad
Step 1: Program the Pico
You can learn how to program a Raspberry Pi Pico using the Arduino IDE from here. I would recommend you to go through the code to get an understanding of how it works as it will make it easier to make changes and troubleshoot.
Step 2: Set Up the Layout
The two 'sensored' tracks will be installed, after leaving some length of tracks at each end of the layout. This extra length of the track is required for the locomotive to slow down gradually and stop.
Step 3: Install the Pico on a Breadboard
You can skip this step if your Pico has female headers installed.
Step 4: Connect the Motor Driver to Power Wires
Make sure the header pins behind the power input terminals are bridged with a jumper connector. The left terminal will be connected to a +12-volt DC supply, the middle one will be connected to the GND of the power supply and Pico and the right terminal will be connected to the VSYS pin of the Pico.
Step 5: Connect Track Power to the Motor Driver
Step 6: Connect the Motor Driver to Pico
Connect +5-volt terminal of the motor driver to the VSYS pin of Pico and the GND terminal to the GND pin of Pico, then make the following wiring connections:
- IN1 to GP7
- IN2 to GP8
- ENA to GP9
Step 7: Connect the Sensors to Pico
Connect the VCC pin of each sensor to the 3V3(OUT) pin of the Pico and the GND of each sensor to the GND pin of the pico. Connect the output of the sensor near point A to pin ADC0 and the output of the sensor near point B to the ADC1 pin of the Pico.
Step 8: Place the Locomotive on the Tracks
Place the locomotive at point A of the layout. Use of a rerailing tool is recommended, especially for steam locomotives.
Step 9: Power Up the Setup
Double-check all the wiring connections and then connect the 12-volt power supply to the motor driver via a female DC jack. After turning on the power, the locomotive should start to move as shown in the video above.
Step 10: Tinker With the Project
Now that you have got your locomotive running successfully around the layout, why not try modifying it? You can increase the length of the track and add another halting point in the layout, you can add a turnout, or run two trains! There is a lot to do. If possible, do share your creation with the community. All the best!
Raspberry Pi Pico Controlled Point-to-Point Model Railroad
- Comments(0)
- Likes(3)
- ugur tezer Jan 08,2024
- ElectroMaker Jun 03,2021
- PCBWay Support Team Jun 03,2021
- 1 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
-
9design
-
8usability
-
10creativity
-
10content
More by KushagraK7
- Raspberry Pi Pico RC Vehicle SuppliesA Raspberry Pi Pico(Almost any microcontroller can be used here, but the Pico offers great f...
- Stepper Motor Controlled Stepper Motor Without Microcontroller! Step 1: Watch the VideoWatch the video to get a full understanding of the project and learn how to t...
- Automated Model Railroad Layout Running Two Trains I made an Automated Model Train Layout with Passing Siding a while back. Upon request from a fellow ...
- Program the Raspberry Pi Pico With the Arduino IDE The Raspberry Pi Pico is a recently launched product in the family of microcontrollers and its load ...
- Reuse an Old Laptop's Touchpad to Control a Computer! PS/2 laptop touchpads are among the coolest user interface devices to use with a microcontroller. Th...
- Automated Model Railroad Layout With Reverse Loops In one of my previous projects, I showed how to make a Simple Automated Point to Point Model Railroa...
- Use a Stepper Motor As a Rotary Encoder Rotary encoders are great for use in microcontroller projects as an input device but their performan...
- Keyboard Controlled Model Train(PS/2 Interface) Using Arduino microcontrollers, there are a lot of ways of controlling model railway layouts. A keyb...
- Stepper Motor Speed and Direction Control Without a Microcontroller In one of my previous projects, I showed you how to control a stepper motor's speed using a 555 time...
- Smartphone Controlled 4X4 Robot With ESP8266 SuppliesFor this project, you will need:An ESP8266 microcontroller(Node MCU)A dual H-bridge motor dr...
- Touchpad Controlled Digital Servo Motor Here is a quick and simple project where we control a digital servo motor with the slide of our fing...
- Smartphone Controlled Model Railroad With an ESP8266 IntroA while back, I made a project where a stepper motor's position is controlled using a smartphon...
- Simple USB Volume Controller with Arduino This project uses a rotary encoder connected to an Arduino Leonardo to control the audio volume of a...
- Motor Speed and Direction Control with a Web-Server using an ESP01 Supplies:For this project, you will need:An ESP01 microcontroller(You can use any ESP8266-based micr...
- Wi-Fi Controlled Stepper Motor With an ESP Microcontroller Step 1: Get All the Required StuffFor this project, you will need:An ESP8266 microcontrollerA Steppe...
- Simple Automated Model Railroad Loop With Yard Siding Video:Supplies: For this project, you will require:An Arduino microcontroller board compatible with ...
- Laptop Touchpad Controlled Model Railroad Supplies:For this project, you will require:An Arduino microcontroller compatible with Adafruit Moto...
- Control a Stepper Motor with a Slide of Your Finger Supplies:An Arduino microcontroller boardA PS/2 touchpad from a laptop(Try to get one with a Synapti...
-
-
Helium IoT Network Sensor Development board | H2S-Dev V1.2
113 0 0 -
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
181 1 1