With the DC Bricklet 2.0 you are able to control one DC brushed motor (max. 28V and 5A (peak)) over USB. With the provided API for many programming languages you can control the direction, velocity and acceleration of the connected motor.
Besides methods to control the connected motor the API provide the possibility to measure current consumption and the voltage of the power supply. In case of overtemperature and overcurrent callbacks can be triggered. These can be used to react properly in your own program to these events.
The drive mode can be switched between Drive/Brake and Drive/Coast (see Drive Modes).
|Current Consumption||50mW (10mA at 5V) without motor|
|Maximum Motor Current||
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|
|Dimensions (W x D x H)||40 x 40 x 15mm (1,57 x 1,57 x 0,59")|
The following picture depicts the different connection possibilities of the DC Bricklet 2.0.
To test a DC Bricklet 2.0 you need to have Brick Daemon and Brick Viewer installed. Brick Daemon acts as a proxy between the USB interface of the Bricks and the API bindings. Brick Viewer connects to Brick Daemon. It helps to figure out basic information about the connected Bricks and Bricklets and allows to test them.
Connect the DC Bricklet 2.0 to a Brick with a Bricklet Cable. Connect a DC brushed motor and a suitable power supply to the Bricklet and a suitable power supply.
If you connect the Brick to the PC over USB, you should see a new tab named "DC Bricklet 2.0" in the Brick Viewer after a moment. Select this tab.
After this test you can go on with writing your own application. See the Programming Interface section for the API of the DC Bricklet 2.0 and examples in different programming languages.
Before you can test your Bricklet you need to enable the driver chip by ticking the "Enable" checkbox. You have four sliders to control the velocity (forward and backward), the acceleration, deceleration and the PWM frequency which is used by the driver chip to control the connected motor.
On the right you see the input voltage and the current consumption. Below you find a graphical representation of the velocity of the motor.
Below the sliders you can test the "Full Brake" and change the driving modes (see here for more information).
There are two possible modes of motor controls:
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.
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".
The red error LED has three different states:
If an over-temperature or -current event occurs the motor will stop running and the driver will be turned off. You need to explicitely call the enable function to start the driver again.
See Programming Interface for a detailed description.
|Visual Basic .NET||API||Examples||Installation|