JOY-iT MOTOPI Motor Control for Raspberry Pi Owner’s Manual

June 9, 2024
JOY-It

MOTOPI
Motor control for the Raspberry Pi

GENERAL INFORMATION

Dear customer,
Thank you for purchasing our product. In the following, we will show you which things should be noted during the use. Should you encounter any unexpected problems, do not hesitate to contact us

GENERAL

The MotoPi board is an expansion board for the control and use of up to 16 PWM controlled servomotors.
The board can be supplied additionally by 4.8 – 6 V so that the ideal supply of the motors is always ensured and even greater projects can be supplied by enough power.
It is for example perfectly suited for the control of the Joy-IT robot arm.

Article number: Robot02
The robot arm made of aluminium gets its movement from 6 separately controllable 20 kg motors. It is mounted on a based rotary plate (360°). The base plate is made out of 4.5 mm thick acryl and has mounting holes for all common singleboard-computer and microcontollers.

TECHNICAL DATA & SAFETY INSTRUCTIONS

The MotoPi board is equipped with 16 channels for 5V servomotors as well as a possibility for connecting an additional capacitor.
Moreover, the board has 4 analog, 2 digital and a I2C connection facility.
The power supply is ensured by a 5 V coaxial power connector or via a power supply between 4.8 and 6 V.
It is also additionally equipped with a quartz oscillator to keep frequencies as precisely as possible and deviations as small as possible.

On the backside of the board, the numeration of the channels can be read.
The 3 pins of each channel are from top to bottom the connection for ground, voltage and signal [GND | V+ | PWM]. The board can be plugged on the GPIO pins of the Raspberry Pi and the cable of your 5V servomotors can be connected with the pins of the channels. An additional power supply via a cable or a 5V coaxial power connector is mandatory necessary to operate.
To prevent sudden voltage drops, the board has a capacitor. If in special cases this is not enough, you can connect an additional capacitor parallel via the according connection.
The power supply must be adjusted to the power of the connected motors. If the power supply is insufficiently dimensioned, the motors will stutter instead of moving smoothly. We recommend the use of our 4.8 power supply RB-Netzteil2 which offers a 24 W continuous output. After pinning the expansion board on your Raspberry Pi, connecting an additional power supply and connecting the servomotors, the board is ready to use.
Safety instructions
To prevent inverse polarity, please note the markings on the board from the according input (+ and – symbol).
An inverse polarity can cause damage to your board, the connected Raspberry Pi and other peripheries!
The motors you connect and the movement they generate can be dangerous. Therefore, we recommend sufficient safety distance or rather to take measurements so that no one can get in touch with the moving parts.

INSTALLATION OF THE RASPBERRY PI

If you already use the latest Raspbian version on your Raspberry Pi, you can skip the next step and start the next step.
The latest image of the operating system can be downloaded from the Raspberry Pi website.
With the help of the Win32-Disk-Imager, you can copy the downloaded image on your SD card.
Choose therefore, like shown in the picture below the image and your SD card.
After that, you can start the writing process with Write.

If this step is successfull, you can put the SD card into yor Raspberry Pi and continue to the next step.

INSTALLATION OF THE MODULE

To use the board properly, you should activate the two functions on your
Raspberry Pi: I2C and SPI
Therefore, open the configuration menu of the Raspberry Pi with the following command: sudo raspi-config
In the just opened window, navigate to the menu point Interfacing Options.

Enable the function SPI.

Confirm the next windows all with Yes or rather Ok.

Afterwards, you must enable the function I2C.

Confirm the next windows all with Yes or rather Ok.

Leave the configuration menu with Finish and restart your Raspberry Pi.

Since the MotoPi is equipped with an additional crystal oscillator, a special program library is required. This is based on the Adafruit_PCA9685 Python library but it is specially adjusted for our board.
We recommend using unconditionally and exclusively our own adjusted library. This library can be downloaded here First, install the previously required libraries using the following com- sudo apt-get update sudo apt-get install python3-pip sudo pip3 install smbus
Copy the unzipped library completely on your Raspberry Pi and navigate in the terminal into this folder. With the following command you can install the library.
sudo python3 setup.py install
Now Navigate into the folder examples and start the code example like described below. cd examples sudo python3 simpletest.py
This test script shows the fundamental functions of the motor control and the motor which is connected to the first channel, will move repeatedly from one direction to the other.

CONTROLL OF THE ADDITIONAL CONNECTIONS

After the restart, you must install the necessary drivers and modules.
Therefore perform the following commands:
sudo apt-get update sudo pip install spidev sudo pip install wiringpi A restart is now required again. sudo reboot After the restart, the connections are ready to use.
Please note that the first pin of the digital connection is connected with the GPIO pin 27 and the second pin to the GPIO pin 22.
CODE EXAMPLE TO USE THE DIGITAL CONNECTIONS
Here, you have a short code example for controlling the digital connections.
For that, we use the LK-Button1 with a LK-Cable-20 from our LinkerKit series.

import RPi.GPIO as GPIO from time import sleep

Initialize button to digital pin 22 button = 22

GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(button, GPIO.IN, pull_up_down=GPIO.PUD_UP) while True:
if GPIO.input(button) == GPIO.HIGH:

Do something print(“I do something”) else:

Do something else

print(“I do something else”)

CODE EXAMPLE TO USE THE DIGITAL CONNECTIONS

Consecutively, you have a short code example for controlling the digital connections. For that, we use the LK-Joystick with a LK-Cable-20 from our LinkerKit series.

Note that if not all connection are taken, the free pins can issue false values.
import spidev import time import sys spi = spidev.SpiDev() spi.open(0,0) spi.max_speed_hz = 2000000 def readadc(adcnum): if adcnum >7 or adcnum <0: return-1 r = spi.xfer2([1,8+adcnum <<4,0]) adcout = ((r[1] &3) <<8)+r[2] return adcout  while True: if len(sys.argv) >1: for i in range(len(sys.argv)):
if i == 0: print(“_\n”)
else:
adc_channel = int(sys.argv[i]) print(“Channel ” + str(adc_channel)) value=readadc(adc_channel) volts=(value*3.3)/1024 print(“%4d/1023 => %5.3f V” % (value, volts)) print(” “) print(“__
\n”) time.sleep(1.5)
else:
print(“_____\n”)
print(“Channel 0”)
value=readadc(0)
volts=(value3.3)/1024
print(“%4d/1023 => %5.3f V” % (value, volts))
print(“Channel 1”)
value=readadc(1)
volts=(value
3.3)/1024
print(“%4d/1023 => %5.3f V” % (value, volts))
print(“Channel 2”)
value=readadc(2)
volts=(value3.3)/1024
print(“%4d/1023 => %5.3f V” % (value, volts))
print(“Channel 3”)
value=readadc(3)
volts=(value
3.3)/1024

OTHER INFORMATION

Our Information and Take-back Obligations according to the
German Electronic Law (ElektroG)
Symbol on Electrial and Electronic Products:
This crossed-out bin means that electrical and electronic products do not belong into the household waste. You must hand over your old appliance to a registration place. Before you can hand over the old appliance, you must remove used batteries and replacement batteries which are not enclosed by the device.

Return Options:
As the end user, you can hand over your old appliance (which has essentially the same functions as the new one bought with us) free of charge for disposal with the purchase of a new device.
Small devices, which do not have outer dimensions bigger than 25 cm can be handed in for disposal independently of the purchase of a new product in normal household quantities.

  1. Possibility of return at our company location during our opening hours Simac Electronics Handel GmbH, Pascalstr. 8, D-47506 Neukirchen-Vluyn
  2. Possibility of return nearby We will send you a parcel stamp with which you can send us your old appliance free of charge. For this possibility, please contact us via e-mail at service@joy-it.net or via telephone.

Information about Package:
Please package your old appliance safe for transport. Should you not have suitable packaging material or you do not want to use your own material, you can contact us and we will send you an appropriate

SUPPORT

If any questions remained open or problems may arise after your purchase,we are available by e-mail, telephone and ticket support system to answer these.
E-Mail: service@joy-it.net
Ticket-system: http://support.joy-it.net
Telephone: +49 (0)2845 98469 – 66 (10 – 17 o’clock)
For further information visit our website: www.joy-it.net

www.joy-it.net
Pascalstr. 8 47506 Neukirchen-Vluyn
www.joy-it.net
SIMAC Electronics GmbH
Pascalstr. 8 47506 Neukirchen-Vluyn

Documents / Resources

| JOY- iT MOTOPI Motor Control for Raspberry Pi [pdf] Owner's Manual
MOTOPI, Motor Control for Raspberry Pi, MOTOPI Motor Control for Raspberry Pi, MOTOPI Motor Control
---|---

References

Read User Manual Online (PDF format)

Loading......

Download This Manual (PDF format)

Download this manual  >>

Related Manuals