Model Railroad Controller

obniz, the model train can be operated from a smartphone or PC.
In addition, using OpenCV, you can automatically stop at the specified position from the camera image.

 

MAKE

Materials

Steps

Wire as shown in the photograph.

The railway model operation board we used includes the following functions.

  • power supply to obniz
  • receives signals representing the traveling direction and speed from obniz and supply signal to the rail
  • receives a selection signal for straight-curvilinear of the points from obniz and output signals to the points

The functions of the tabs are as follows.

The railway model can be controlled by operating the “Mascon” or “Simple Cab”.

In “Drive Setting”, you can set acceleration, motor drive sound, motor vehicle type, etc.

In addition, “Camera Control” has a function that can automatically stop at a specified position from the camera image using OpenCV.

The camera image is displayed after tapping “Camera Start” from the “Camera Control” tab.

If you specify an area by tapping two points in the image in order, motion detection will be performed within that area. When motion is detected, it is detected that the train has passed and the brakes are applied.

When stopped, acceleration will start again after a certain time.

Program

Appendix

 

Recommended