[2021] Valenta Loco Setup Guide

by hummingworks in Circuits > Remote Control

507 Views, 1 Favorites, 0 Comments

[2021] Valenta Loco Setup Guide

Setup Guide Pic PNG.png

Valenta Loco is a powerful and smooth-running micro:bit based Lego compatible locomotive. It is equipped with Valenta Zero robotics controller that can be controlled by a micro:bit for playing with Lego train and rail ecosystem. The locomotive has two (x2) micro gear motors. You can use Lego Technic bricks to build your unique body shell on the locomotive.

3D printing Lego Compatible Rails via Thingiverse

Check Thingiverse and you can 3D print your Lego compatible rail tracks based on your layout plan.

Sample Codes

We have the following tutorials below, where you can download sample codes for playing the locomotive immediately. The sample codes were made via Microsoft MakeCode editor and you can easily customize or build your own codes for fun.

Tutorial: Running a locomotive with two (x2) micro:bits

This tutorial will present how to set up two (x2) micro:bits, one as the transmitter and another one as the receiver on the locomotive. On your "transmitter" micro:bit, pressing button A or B will let the locomotive go forward or backward. Pressing A and B simultaneously will let the locomotive stop.

Tutorial: Running a locomotive with iPad (iPhone)

This tutorial will present how to set up micro:bit app on your iPad (iPhone), how to pair it with your micro:bit, and how to use Gamepad in the app for controlling the locomotive. Pressing Gamepad button A or B will let the locomotive go forward or backward. Releasing Gamepad button A or B will let the locomotive stop.

Supplies

Micro:bits

For the receiver, we will need one micro:bit on the locomotive. For the transmitter, we will need another micro:bit, or we can substitute one iPad (iPhone) as the transmitter.

Batteries

We recommend using new, single-use six (x6) 1.5V AA batteries for the locomotive.

Kit

You can obtain Valenta Loco micro:bit powered locomotive engine via Projects4Kiz.

Valenta Zero Robotics Controller

Valenta Zero PNG.png
Wiring Motor and LED PNG.png

The locomotive is equipped with micro:bit based motor controller called Valenta Zero. It contains a small motor controller (DRV8833) for controlling a DC motor on each bogie. There are four (x4) GPIO (general purpose input and output) pins P0, P1, P2 and P8 for connecting devices like LED headlights. Each of P0, P1, P2, P8 pins have three pins, (S) Signal (yellow wire cable), (V) Voltage (red wire cable) and (G) Ground (black wire cable). These pins can operate at 3.3V or 5V (selectable) and please choose 5V for connecting LED headlights.

Mounting Valenta Zero to the Holder

Stand PNG.png

The first step is to mount Valenta Zero robotics controller to the holder.

Fit each corner of the motor controller to the holder as shown in the figure.

Placing Battery Case Within the Holder

Stand BT PNG.png

Insert six (x6) AA batteries to the battery case and place the case inside the holder as shown in the figure.

Copying the Sample Files to Micro:Bit

Tutorial PNG.png
Tutorial iPad PNG.png

You can choose one of these tutorials below and download the sample code (receiver.hex) to your "receiver" micro:bit.

Running a locomotive with two (x2) micro:bits

This tutorial will present how to set up two (x2) micro:bits, one as the transmitter and another one as the receiver on the locomotive. On your "transmitter" micro:bit, pressing button A or B will let the locomotive go forward or backward. Pressing A and B simultaneously will let the locomotive stop.

Running a locomotive with iPad (iPhone)

This tutorial will present how to set up micro:bit app on your iPad (iPhone), how to pair it with your micro:bit, and how to use Gamepad in the app for controlling the locomotive. Pressing Gamepad button A or B will let the locomotive go forward and backward. Releasing Gamepad button A or B will let the locomotive stop.

Mounting Micro:bit to Valenta Zero

MV Stand BT PNG.png

Once you've downloaded the sample code (receiver.hex) to your "receiver" micro:bit, you will insert it to the edge connector on Valenta Zero robotics controller as shown in the figure.

Connecting DC Jack to Valenta Zero

DC Jack PNG.png

Six (x6) AA batteries provide the power to "receiver" micro:bit, two (x2) micro gear motors on the bogies and LED headlights via Valenta Zero robotics controller.

Connect the DC Jack to the socket on Valenta Zero robotics controller.

Whenever you've done all the steps to assemble and set up the locomotive, you will turn on the power switch on the side of the controller.

Placing the Controller Unit to the Body

Mount PNG.png

In the earlier steps, "receiver" micro:bit, Valenta Zero robotics controller and the battery case are all assembled into a single-piece controller unit.

Now, let's mount this controller unit into the center of the body as shown in the figure.

Connecting Motor Cable to M1 Pin

M1 Wiring PNG.png
Cable Wiring (2) PNG.png

We can find red and black wires coming from each of the bogie on the locomotive. They are motor cables.

Pick up a motor cable and put its red wire to the left pin on M1 and its black wire to the right pin on M1 as shown in the figure. That way, both bogies will run the same direction.

​Connecting Motor Cable to M2 Pin

M2 Wiring PNG.png
Cable Wiring (2) PNG.png

We can find red and black wires coming from each of the bogie on the locomotive. They are motor cables.

Pick up another motor cable and put its red wire to the left pin on M2 and its black wire to the right pin on M2 as shown in the figure. That way, both bogies will run the same direction.

Connecting LED Headlights to GPIO Pin

P8 PNG.png
Wiring Motor and LED PNG.png

If we have a train body shell equipped with the front LED headlights, you can light them up by connecting to one of the GPIO pins (P0, P1, P2 or P8) on the motor controller.

Say let's choose P8 for connecting the LED headlights. Connect the LED headlights' red wire to (V) Voltage pin at P8 and the black wire to (G) Ground pin at P8. When the power is on, the LED headlights will light up. (FYI, the LED headlights on the train body are wired in parallel and will light up at 5V power.)