#raspberry-pi #real-time #copper #middleware

cu-rp-sn754410-new

Rust library for controlling the SN754410 motor driver on the Raspberry Pi for Copper

5 unstable releases

0.5.1 Dec 5, 2024
0.5.0 Dec 2, 2024
0.4.1 Nov 15, 2024
0.4.0 Oct 29, 2024
0.3.1 Oct 12, 2024

#315 in Robotics

Download history 188/week @ 2024-10-09 24/week @ 2024-10-16 89/week @ 2024-10-23 62/week @ 2024-10-30 16/week @ 2024-11-06 118/week @ 2024-11-13 16/week @ 2024-11-20 121/week @ 2024-11-27 174/week @ 2024-12-04

430 downloads per month
Used in cu-rp-balancebot

Apache-2.0

250KB
2.5K SLoC

Copper Driver for the TI SN754410 Quadruple Half-H Driver

See the crate cu29 for more information about the Copper project.

Overview

The SN754410 is a quadruple half-H driver that can be used to drive motors, solenoids, and other inductive loads. It can drive up to 1A of current at 4.5V to 36V. The driver is capable of driving two motors in both directions using the 2 PWMs generators from the Raspberry Pi.

The SN754410 chip

Compatibility

OS: Linux on Rapsberry Pi.

hardware: Texas Instrument SN754410

It can drive a DC motors like the MG513P2012:

The MG513 motor

Wiring

Kicad diagram of the connections

Usage

Using this driver

Add the following to your Cargo.toml:

[dependencies]
cu-rp-sn754410 = "0.2.3"

In your Copper RON config file, add the following:

    tasks: [
        (
            id: "dst",
            type: "cu_rp_sn754410::SN754410",
        ),
    ]

There is no config for this driver.

When you connect this driver to the rest of the system you need to use the cu_rp_sn754410::MotorMsg message type.

    cnx: [
        (src: "src",  dst: "dst",   msg: "cu_rp_sn754410::MotorMsg"),
    ],

In this message the field current_power is the power that you want to apply to the motor. It is a value between -1.0f32 and 1.0f32. The negative values are for the reverse direction.

Dependencies

~10–22MB
~326K SLoC