Chip Award Winner
Product of the Year 2012
Chip Award

DC Brick

Features

  • Drives one brushed DC motor with max. 28V and 5A (peak)
  • Direction, velocity and acceleration controllable
  • Overtemperature and overcurrent events
  • Drive/Brake and Drive/Coast mode configurable
  • One USB port and two Bricklet ports

Description

The DC Brick is equipped with a 32-bit ARM microcontroller and is able to control one DC brushed motor bidirectional with max. 28V and 5A (peak). The current consumption and power supply voltage can be measured, velocity and acceleration of the motor can be controlled. In case of overtemperature and overcurrent callbacks are triggered. For battery driven applications an undervoltage callback is user configurable. Additionally, the drive mode can be switched between Drive/Brake and Drive/Coast (see Drive Modes).

It is compatible to other Tinkerforge Bricks and can be used within a stack. Two Bricklet ports can be used to extend the features of this device.

The DC motor can be powered by an external power supply connected directly to the Brick or by the stack internal power supply. If an external power supply is connected the Brick switches automatically to this power supply.

Controlling the device is possible in several ways. You can control it via a PC connection. This connection can be established directly with a USB cable or by other cable based (RS485, Ethernet) or wireless (WIFI) connections via an additional Master Brick with corresponding Master Extension (High Level Concept).

Since the firmware is open source it is possible to program the device directly (On Device Programming). Currently we are not offering an On Device API.

Technical Specifications

Property Value
Microcontroller ATSAM3S2B (128kB Flash, 32kB RAM)
Current Consumption 53mA
   
Maximum Motor Current
Peak: 5A
Continous: > 3A (depends on cooling)
Minimum/Maximum Input Voltage 6V/28V
   
PWM Frequency Configurable, 1-20kHz, default 15kHz
Velocity -32767 to 32767, full reverse to full forward, 0=stop
Acceleration 0 to 65535, velocity/s, increment for velocity/s
   
Bricklet Ports 2
Dimensions (W x D x H) 40 x 40 x 17mm (1.57 x 1.57 x 0.67”)
Weight 18g

Resources

Connectivity

The following picture depicts the different connection possibilities of the DC Brick.

DC Brick with caption

Test your DC Brick

To test the DC Brick you need to have the Brick Daemon and the Brick Viewer installed (for installation guides click here and here) and the Brick Viewer has to be connected to the Brick Daemon.

Connect a DC brushed motor to the Brick and a suitable power supply. Your setup should look as shown below.

DC Brick with motor

Now connect the Brick to the PC over USB, you should see a new tab named “DC Brick” in the Brick Viewer after a moment. Select this tab.

DC Brick in Brick Viewer

Before you can test your Brick you need to enable the driver chip by ticking the “Enable” checkbox. You have three sliders to control the velocity (forward and backward), the acceleration and the PWM frequency which is used by the driver chip to control the connected motor.

On the right you see the voltages of the two power sources and the current consumption. Below you find a graphical representation of the velocity of the motor. At the bottom you can configure the minimum motor voltage, which allows for undervoltage callbacks if the voltage is too low.

Below the sliders you can test the “Full Brake” and change the driving modes (see here for more information).

After this test you can go on with writing your own application. See the Programming Interface section for the API of the DC Brick and examples in different programming languages.

Power Supply

The connected motor can be powered through the black on-board power-connector or through a Power Supply in a stack. The Brick switches automatically to the on-board power-connector when a voltage above 1V is measured there.

Warning

Keep in mind that the Brick switches automatically. So e.g. if you have a stack and remove your external battery connected to the Brick it will use the stack power supply. If you then enable the motor it is driver with the voltage supplied by the stack which might be higher then your battery voltage

Drive Modes

There are two possible modes of motor controls:

  • Drive/Brake

    In this mode the motor is always either driving or braking, there is no freewheeling possible. A more linear correlation between PWM and velocity is an advantage of this mode. Therefore it is possible to accelerate more precise. Typically motors can be driven with slower velocities in this mode. Disadvantageous is a higher current consumption and a resulting faster heat-up of the driver chip.

  • Drive/Coast

    In this mode the motor is either driving or freewheeling. Advantageous is a lower current consumption and a resulting slower heat-up. The control of the velocity and acceleration is less precise, it can “lag behind”.

Error LED

The red LED is enabled if the supply voltage is below the minimum voltage (configurable) or the driver chip is in emergency shutdown state.

An emergency shutdown is triggered if either the current consumption is too high (above 5A) or the temperature of the driver chip is too high (above 175°C). These two possibilities are essentially the same, since the temperature will reach this threshold immediately if the motor consumes too much current.

To get the Brick operational again you have to increase the voltage or in the latter case you have to let the driver chip cool down and enable it again.

Programming Interfaces

High Level Programming Interface

See High Level Programming Interface for a detailed description.

Language API Examples Installation
Modbus API    
TCP/IP API    
C/C++ API Examples Installation
C# API Examples Installation
Delphi API Examples Installation
Java API Examples Installation
PHP API Examples Installation
Python API Examples Installation
Ruby API Examples Installation
VB.NET API Examples Installation

On Device Programming Interface

Note

Coming soon!

An API and documentation for direct on device programming (comparable to Arduino) is planned. You can however already use our firmware as a starting point for your own modifications (C knowledge required).

Creative Commons Licence The content of this page is licensed under Creative Commons Attribution 3.0 Unported License.