Table of Contents
|
Overview
The WIOpico supports up to 8 H-Bridges on the I/O1 and I/O2 connector.
The IN1 and IN2 are used to control PWM and polarisation.
Use cases:
- DC motors
- LEDs
The PWM frequency is HW=100Hz or SW=10...100Hz for all 8 channels.
Required versions | |
---|---|
WIO | 911+ |
Rocrail | 2.1.4592+ |
Setup
All ports for the H-Bridges must be set to output to avoid a sensor event burst.
PWM Activation
Hardware PWM:
In the WIO dialog under Settings in the Extra field, enable the Hardware PWM 100Hz option.
Software PWM:
Activate the Software PWM 10…100Hz option.. The corresponding frequency is entered in the Control menu in the Steps field.
Master-Slave Concept
If multiple WIO devices are used for track PWM control, the PWM signal must be synchronized.
For this purpose, one WIO takes on the role of the Master, while the others act as Slaves.
- On the Master, the Preload PWMPair setting must be enabled in the settings.
- On the Slave devices, the Sync Slave option must be activated in the Extras section.
To transmit the PWM frequency, a cable connection must be established. For this purpose, the GND and GP28 of the involved WIO devices are connected together.
Wiring
Use cases
Output
Interface tab
Attribute | Usage | Value |
---|---|---|
Node ID | WIO ID | 1…255 |
Address | H-Bridge channel | 1…8 |
Gate | Polarisation | 0 or 1 |
Parameter | Dutycycle | 0%…100% |
Value | accelleration | 0…100 |
Type | H-Bridge | Value |
Text slider
General Tab
Attribute | Usage | Value |
---|---|---|
Type | Slider | - |
Min. | Minimal dutycycle | 0%…100% |
Max. | Maximal dutycycle | 0%…100% |
Refresh | acceleration | 0…10 |
Interface Tab
Attribute | Usage | Value |
---|---|---|
Node ID | WIO ID | 1…255 |
Address | H-Bridge channel | 1…8 |
Options | H-Bridge | - |
Actions
Using "regval" you can set a value via a parameter, and "stop" stops the rotation.
The "regdir" parameter (0 or 1) controls the rotation direction.
Track Driver
All 8 channels on the same WIOpico are in sync.
Special care must be taken if a loco runs in an other WIOpico H-Bridge because the PWM is not in sync between multiple WIOpicos.
Running between two L298N H-Bridges should be 1-4 and 2-3 parallel to avoid large current and damage:
Locomotive Interface Tab
Attribute | Usage | Value | Example | Remark |
---|---|---|---|---|
Address | 0 | |||
Protocol | Analog | |||
Mass | accelleration and kickstart timer (10ms ticks) | 0…100 | 10 | |
Step range | Left = Minimal dutycycle = Vmin | 0%…90% | 15% | |
Step range | Right = Maximal dutycycle = Vmax | 0%…90% | 55% | The 90% max value is needed to provide a pause. Value > 90% will be overwritten with 90%. |
Kick start | V0 startup dutycycle (disabled if zero) | 0%…100% | 25% |
Example values depends on motor type and voltage.
Rocrail properties Automatic Tab
Attribute | Usage | Value |
---|---|---|
Block → Link analog blocks | Off |
Block Track Driver Tab
Attribute | Usage | Value |
---|---|---|
Enable | Enable track driver functionality | On |
Reset | Reset to V0 on free | On |
Linked blocks | On | |
Node ID | WIO ID | 1…255 |
Address | H-Bridge channel | 1…8 |
Switch Track Driver Tab
Attribute | Usage | Value |
---|---|---|
Enable | Enable track driver functionality | On |
Node ID | WIO ID | 1…255 |
Address | H-Bridge channel | 1…8 |
Notes:
- All block and switch tracks must be isolated.
- The GCA94 is recommended for detecting current. (One wire looped 3 times in the coil.)