Acrome-SMD Docs
All Acrome ProductsReferencesBlogCase StudiesContact Us
  • ACROME SMD
  • Electronics
    • πŸ”΄SMD Red
      • Coding Guide
      • Robot with Raspberry Pi Setup Guide
      • Robot with Arduino Setup Guide
      • Troubleshooting Guide
    • πŸ”΅SMD Blue
    • 🟒SMD Green
    • Gateway Modules
      • Arduino Gateway Module
      • USB Gateway Module
    • Electrical Motors
      • Brushed DC Motors (BDC)
      • Stepper DC Motors (SDC)
      • Brushless DC Motor (BLDC)
      • Linear Actuator with Feedback
    • Add-on Modules
      • Ambient Light Sensor Module
      • Button Module
      • Buzzer Module
      • IMU Module
      • Joystick Module
      • Potentiometer Module
      • Reflectance Sensor Module
      • RGB LED Module
      • Servo Module
      • Ultrasonic Distance Sensor Module
  • SMD Kits
    • Starter Kit
      • What You Can Build
    • Education Kit
      • What You Can Build
    • Motion Kit
      • What You Can Build
  • Software
    • Libraries
      • Python Library
      • Arduino Library
      • Java Library
      • Matlab Library
    • SMD UI
    • SMD Blockly
      • Introducing Customized Blockly Blocks
  • SMD Applications
    • Basics
      • Blink
      • Action - Reaction
      • Autonomous Lighting
      • Smart Doorbell
      • Security System
      • Distance Buzzer Warning
      • Distance Auto Stop
      • Smart Light Control
    • Interactive
      • Automatic Trash Bin
      • Radar
      • Chrome Dino Game Player
      • Play Chrome Dino Game With Joystick
      • Snake Game With Joystick
      • Pan-Tilt with Joystick Module
      • Joystick Mouse Control
      • Rev Up the Engine
      • Motor Rotation Based on Turn Input Value
      • Basic Motor Speed Control Application
      • Basic Motor Control Application Using PWM Input
      • Basic Motor Position Control Application
      • Basic Motor Torque Control Application
      • Motor Rotation Based on Joystick Counting
    • Robotics
      • Differential Robot Projects
      • Mouse Cursor Tracker Motion Robot
      • Waypoint tracker robot
      • Braitenberg Robot
      • Line-Follower Robot
      • Teleoperation Robot
      • Obstacle Avoidance Robot
      • ESP32 Wireless Controlled Mobile Robot
  • AI
    • Object Tracking Robot
    • Groq Chatbot-Controlled Robot
  • ROS
    • Teleoperation Robot with ROS
  • Mechanics
    • Building Set
      • Plates
        • 2x2 Plate Package
        • 2x3 120Β° Plate Package
        • 3x3 Plate Package
        • 3x5 Plate Package
        • 3x9 Plate Package
        • 11x19 Plate
        • 9x19 Plate
        • 5x19 Plate
        • 3x19 Plate
        • 9x11 Plate
        • 5x13 Plate
      • Joints
        • 60Β° Joint Package
        • 90Β° Joint Package
        • 120Β° Joint Package
        • Slot Joint M2 Package
        • Slot Joint M3 Package
        • U Joint Package
      • Mounts
        • Add-on Mount Package
        • Motor L Mount Package
        • Pan-Tilt Package
      • Wheels
        • Ball Wheel Package
        • Caster Wheel Package
        • Wheel Package
      • Cables
        • Power Cable 10 cm Package
        • Power Cable 20 cm Package
        • Power Cable 35 cm Package
        • RJ-11 Cable 7.5 cm Package
        • RJ-11 Cable 20 cm Package
        • RJ-11 Cable 35 cm Package
        • RJ-45 Cable 7.5 cm Package
        • RJ-45 Cable 20 cm Package
        • RJ-45 Cable 35 cm Package
      • Fasteners
        • M2x5 Allen Hex Screw Package
        • M3x6 Allen Hex Screw Package
        • M3x8 Allen Hex Screw Package
        • M3 Hex Nut Package
  • Help
    • Manual
    • Shops
    • Reach Us
Powered by GitBook
On this page
  • Introduction
  • 1. User PC Setup
  • 2. Robot Assembly + Raspberry Pi Setup
  • 3. Programming and Code Upload
  • 4. Run and Test Your Robot
  • 5. Troubleshooting Table (SMD Red Troubleshooting Guide)
  • 6. Final Checklist
  1. Electronics
  2. SMD Red

Robot with Raspberry Pi Setup Guide

⚠️ Audience: This guide is written for complete beginners. No prior experience with coding, electronics, or Raspberry Pi is required.


Introduction

Welcome to the official SMD Red Robot Guide using Raspberry Pi. This document will walk you through every single step required to:

  • Set up your computer environment

  • Assemble your robot and connect Raspberry Pi and SMD Red hardware

  • Program and test your robot using Python code and a web interface

By following this guide step by step, you'll successfully build a fully functional smart robot that can:

  • Drive using DC motors

  • Rotate pan/tilt servos

  • Detect objects using sensors

  • Be controlled via Wi-Fi through a mobile or web app


1. User PC Setup

Before configuring the robot itself, your computer must be ready to write, edit, and transfer code to the Raspberry Pi.

1.1 Install Python

  • Download the latest version compatible with your operating system.

  • During installation, make sure to enable β€œAdd Python to PATH”.

  • After installation, verify Python works by opening a terminal/powershell and running:

python --version

Expected output: Python 3.x.x

1.2 Install acrome-smd Library

This library allows you to write Python programs that talk to the SMD Red hardware.

pip install acrome-smd

πŸ’‘ Run this on both your PC and Raspberry Pi later. This step ensures compatibility and development flexibility.

1.3 (Optional) Install Visual Studio Code

Recommended if you want a user-friendly interface for writing Python code.

1.4 Install Raspberry Pi Imager

This tool lets you install the operating system onto the Raspberry Pi’s SD card.

  • We will use this in the next step to flash Raspberry Pi OS.


2. Robot Assembly + Raspberry Pi Setup

2.1 Required Hardware

Here’s everything you’ll need physically:

  • Raspberry Pi 3B+

  • MicroSD card (16GB or larger)

  • 1–2x SMD Red Drivers

  • RJ11 cables: To daisy-chain SMD Red modules and connect Gateway

  • RJ45 cables: To connect modules (e.g., motors/servos) to SMD Red

  • 12V power supply: Powers SMD Red and motor modules

  • 5V USB-C: Powers the Raspberry Pi

  • Screws, jumper wires, zip ties: For physical mounting and wiring

2.2 Wiring Overview

  • USB-A from USB Gateway β†’ Raspberry Pi USB port

  • RJ11 from USB Gateway β†’ SMD Red 0 RJ11 IN

  • RJ11 SMD Red 0 β†’ SMD Red 1 β†’ SMD Red 2 (daisy-chained)

  • Power connection: Each SMD Red unit requires a separate power-to-power cable connection for power supply.

  • RJ45 from SMD Red to DC motor, servo, sensor modules

🧠 RJ11 cables carry communication between controller boards (SMD Reds), and between the Gateway and first SMD Red. 🧠 RJ45 cables carry signals and power to individual hardware modules.

2.3 Flash the OS and Configure Raspberry Pi

  • Launch Raspberry Pi Imager

  • Select: Raspberry Pi OS (Lite – 64-bit)

  • Click the gear icon for Advanced Options:

    • Enable SSH (use password authentication)

    • Set Username: pi, Password: raspberry

    • Enter your Wi-Fi name and password

    • Set Hostname: smd-robot

  • Choose SD card and click Write

  • Safely eject and insert into your Raspberry Pi

2.4 Access Raspberry Pi Terminal

To configure and program your Raspberry Pi, you need terminal access.

🟒 Option 1: Headless (Preferred)

No monitor/keyboard required. Access via Wi-Fi.

Steps:

  • Power on Raspberry Pi

  • From your computer:

ssh pi@smd-robot.local

If that fails, get your Pi’s IP address from your router and run:

ssh pi@<your_ip_address>

πŸ”΅ Option 2: HDMI + Keyboard

Plug a monitor and keyboard directly to the Pi.

Steps:

  • Power on

  • Login with:

    • Username: pi

    • Password: raspberry

  • Open terminal and run:

sudo raspi-config

Use this menu to configure Wi-Fi and hostname manually if needed.


3. Programming and Code Upload

Once your Pi is online and you have terminal access, you can upload your robot code.

3.1 Update Raspberry Pi and Install Tools

Run these commands:

sudo apt update && sudo apt upgrade -y
sudo apt install python3-pip hostapd dnsmasq network-manager -y

These install Python tools and network support, required for running and debugging the robot, or enabling offline hotspot.

3.2 Install SMD Red Python Library on Raspberry Pi

pip install acrome-smd

Needed to communicate with the SMD Red hardware using Python.

3.3 Send Your Python Code from PC to Pi

Use the following command on your computer:

scp python.py requirements.txt pi@smd-robot.local:/home/pi/

This sends your project files securely to the Pi.

3.4 Install Required Python Libraries

On Raspberry Pi:

pip install -r requirements.txt --break-system-packages

This includes Flask (for web server), pyserial (for USB communication), and others.

3.5 Set Up Autostart (Optional But Recommended)

If you want your robot to launch automatically on boot:

  1. Create a systemd service file:

sudo nano /etc/systemd/system/run_script.service
  1. Paste the following:

[Unit]
Description=SMD Robot Service
After=network.target

[Service]
ExecStart=/usr/bin/python3 /home/pi/python.py
WorkingDirectory=/home/pi
User=pi
Group=pi
Restart=always

[Install]
WantedBy=multi-user.target
  1. Activate the service:

sudo systemctl daemon-reload
sudo systemctl enable run_script.service
sudo systemctl start run_script.service

Now your robot program will automatically start every time your Raspberry Pi is turned on!


4. Run and Test Your Robot

4.1 Manual Test

Run your Python script:

python3 python.py

Expected output:

Connected to /dev/ttyUSB0
Flask server running at 0.0.0.0:5000

If you see this, your Pi has found the USB Gateway and is running the robot web server.

4.2 Open Web Control Interface

On your phone or computer browser (same Wi-Fi):

http://smd-robot.local:5000

You should see:

  • 🟒 Buttons to move the robot forward/backward/turn

  • πŸŽ› Sliders to control pan/tilt servos

  • πŸ“ Sensor readout (ultrasonic distance)

  • πŸ”˜ Linear motor control (if connected)


Problem
Cause
Solution

USB Gateway not found

Faulty cable or power

Try different port or cable

No /dev/ttyUSB*

USB Gateway not recognized

Reboot Pi, reinsert device

SMDs unresponsive

RJ11 cables disconnected

Ensure cables are seated tightly

Motors don’t move

Modules not connected via RJ45

Check RJ45 cables and IDs

Script crash

Python package missing

Run pip install again

Web not loading

Flask not running

Run script manually or check logs


6. Final Checklist

Before moving forward:

πŸŽ‰ Congratulations! You now have a complete robot platform ready to expand and explore!

PreviousCoding GuideNextRobot with Arduino Setup Guide

Last updated 1 day ago

Visit:

Download from:

Download from:

(USB-A on one end, RJ11 port on the other)

2x with wheels (for driving)

2x (for pan/tilt)

1x (distance measurement)

5. Troubleshooting Table ()

πŸ”΄
https://www.python.org
https://code.visualstudio.com
https://www.raspberrypi.com/software
USB Gateway Module
DC motors
Servo motors
Ultrasonic sensor
SMD Red Troubleshooting Guide