IO Config Editor: Difference between revisions

From RoboPad Wiki
Jump to navigation Jump to search
(Adds Pin descriptions and IO Unit descriptions for H-Bridge IO Units.)
(→‎IO Units: Re-orders to talk about general H-Bridge first and also adds description of a H-Bridge and links to wikipedia.)
Line 87: Line 87:
== IO Units ==
== IO Units ==
A variety of IO Units can be added that are suitable for a number of uses, all are listed here.
A variety of IO Units can be added that are suitable for a number of uses, all are listed here.
=== Actuators ===
=== Actuators ===
All actuators add input ports to the [[Chip Node]], allowing signals to be passed from the [[Nodegraph Editor|Node Graph]] to each actuator. On top of this, each actuator will create an output port on the Chip Node, usually labelled ending with ''"Armed"'' - this is an indicator of whether or not the actuator is '''armed'''. The signal to any specific actuator ''must'' pass through that actuator's configured '''safe value''' for it to be considered to be armed - then and only then will the actuator start to process new control signals. As an example, an servo attached using the "PWM Output" with a safety value set to 50% would require a near-50% signal to be sent to it's input before you will be able to see any change in the pin's output.
All actuators add input ports to the [[Chip Node]], allowing signals to be passed from the [[Nodegraph Editor|Node Graph]] to each actuator. On top of this, each actuator will create an output port on the Chip Node, usually labelled ending with ''"Armed"'' - this is an indicator of whether or not the actuator is '''armed'''. The signal to any specific actuator ''must'' pass through that actuator's configured '''safe value''' for it to be considered to be armed - then and only then will the actuator start to process new control signals. As an example, an servo attached using the "PWM Output" with a safety value set to 50% would require a near-50% signal to be sent to it's input before you will be able to see any change in the pin's output.


All actuators output '''3.3v'''.
All actuators output '''3.3 volts''' along their output pins.
 
==== Built-in H-Bridge Motor ====
[[File:Built-in H-Bridge Motor 2023-02-20-b.png|right|frameless|408x408px|The Built-In H-Bridge Motor IO Unit UI]]
The "Built-in H-Bridge Motor" IO unit is specifically designed to work only with the two built-in H-Bridges available on the RoboPad, allowing you to select motors to be attached to the ''M1'' and ''M2'' pin pairs on the board. By default, two of these are configured, one for M1 and one for M2. When in the [[emergency stop state]], these IO Units attempt to send a stop signal to any attached motors, not powering any associated pins.
 
* '''Name''': The name of this HBridge motor, basically only changes the name of the motor input on the Chip Node.
* '''Built-in Motor''': Which of the two built-in motor pins this H-Bridge Motor IO Unit references - M1 connects to the M1 pins, M2 to the M2 pins.
* '''Forward Scale''': Scales the forward signal (over 50%) before it is transmitted to the motor signal pins - if your motor drives forward faster than backwards, then you can lower this value.
* '''Backward Scale''': Scales the backward signal (below 50%) before it is transmitted to the motor signal pins - if your motor drives backwards faster than forwards, then you can lower this value.
 
==== H-Bridge Motor ====
==== H-Bridge Motor ====
[[File:H-Bridge Motor IO Unit Screenshot 2023-2-20.png|right|frameless|406x406px]]
[[File:H-Bridge Motor IO Unit Screenshot 2023-2-20.png|right|frameless|406x406px]]A [[wikipedia:H-bridge|H-Bridge]] is a simple, common circuit that can control the polarity of electricity to an attached electrical component - commonly a motor. In practice this means that a typical brushed DC motor's direction and speed can be controlled from one using two control signals.  While you can make one yourself [https://www.robotroom.com/BipolarHBridge.html using transistors] (that site also has a [https://www.robotroom.com/DPDT-Bidirectional-Motor-Switch.html useful example] using switches which might make the concept easier to understand too), they often come in integrated circuit (IC) form factors, such as the Texas Instruments ''L293D'', which packs two H-bridges and comes bundled with some additional features.
This is the generalised version of the "Built-in H-Bridge Motor", allowing for an external H-Bridge to be connected to the RoboPad. It's emergency stop state is also to stop all signals and power down associated pins.


Using this IO Unit, the RoboPad will send drive signals suitable for use with a H-bridge through the specified pins (''PinA'' and ''PinB''). It's emergency stop state is to stop all signals and power down associated pins.
* '''Name''': The name of this HBridge motor, basically only changes the name of the motor input on the Chip Node.
* '''Name''': The name of this HBridge motor, basically only changes the name of the motor input on the Chip Node.
* '''Pin A''': One of the two directional signals needed by H-Bridge chips.
* '''Pin A''': One of the two directional signals needed by H-Bridge chips.
Line 113: Line 102:
* '''Reverse Scale''': Scales the backward signal (below 50%) before it is transmitted to the motor signal pins - if your motor drives backwards faster than forwards, then you can lower this value.
* '''Reverse Scale''': Scales the backward signal (below 50%) before it is transmitted to the motor signal pins - if your motor drives backwards faster than forwards, then you can lower this value.


==== Built-in H-Bridge Motor ====
[[File:Built-in H-Bridge Motor 2023-02-20-b.png|right|frameless|408x408px|The Built-In H-Bridge Motor IO Unit UI]]The "Built-in H-Bridge Motor" IO unit is a specialised version of the "H-Bridge Motor" above, specifically designed to work only with the two built-in H-Bridges on the RoboPad, allowing you to select motors to be attached to the ''M1'' and ''M2'' pin pairs on the board. By default, two of these are configured, one for M1 and one for M2. When in the [[emergency stop state]], these IO Units attempt to send a stop signal to any attached motors, not powering any associated pins.
* '''Name''': The name of this HBridge motor, basically only changes the name of the motor input on the Chip Node.
* '''Built-in Motor''': Which of the two built-in motor pins this H-Bridge Motor IO Unit references - M1 connects to the M1 pins, M2 to the M2 pins.
* '''Forward Scale''': Scales the forward signal (over 50%) before it is transmitted to the motor signal pins - if your motor drives forward faster than backwards, then you can lower this value.
* '''Backward Scale''': Scales the backward signal (below 50%) before it is transmitted to the motor signal pins - if your motor drives backwards faster than forwards, then you can lower this value.
==== Unidirectional Brushless Motor ====
==== Unidirectional Brushless Motor ====
This page is still under construction, more to come soon...
This page is still under construction, more to come soon...

Revision as of 00:59, 22 February 2023

NOTICE: This page consists of information on a feature currently in Beta. Information is liable to change or be incomplete.

The Input/Output (IO) Configuration Editor page is the page where you can edit the physical IO configuration of the RoboPad board by configuring IO Units. You can, for instance, set one of the external pins to output a digital electronic signal, which can be controlled via the nodegraph. It is accessible via the Management Page.

The default IO Configuration Editor page as of 2023-02-19

Each IO Unit has a number of settings and will add it's own input and output ports to the Chip Node in the nodegraph. Importantly, for actuators, you are able to specify safe values - these are the values that the IO Unit will default to when the RoboPad looses connection to your phone or you are on any screen other than the controller screen (it's emergency stop state). It is very important that you understand how your safe values and IO Units in general interact with the physical circuitry you have added to your RoboPad - for instance, if you are adding an additional motor to your robot using a Generic PWM IO Unit, you will most likely want to ensure that it's safe value is set to 0 so that it will turn off in an emergency situation. Some IO Units do not have safe value settings (such as HBridge motors and unidirectional brushless motors) as all of these configurations are configured to turn off by default.


Changing the physical configuration of the RoboPad and the behaviour of it's pins using the IO Configuration Editor should be considered an advanced topic - ensure that you have read and fully understand everything on this wiki page and everything you are doing before attempting to change these settings.

Emergency Stop Behaviour When Changing IO Unit Configuration

It is also important to understand that IO Unit safe values remain configured on the pins they are set to, even when removed (using the red "x") until either another IO Unit is configured to use that pin or the device is reset. This has been done because it is not recommended, expected or suggested that a user would change the physical configuration of their RoboPad circuit without first powering it down. Therefore, the firmware assumes that the safest thing to do is retain the last set safe value for any given pin until it is told otherwise (or the device is power cycled, at which point unconfigured pins remain at a high-impedance state).

"Advanced Pins"

Some Pins - namely all pins that are not External 1 and External 2 (marked E1 and E2 respectively on the board) are considered Advanced Pins. This is because they may behave in a way outside of expected behaviour. For instance, many of these pins will output arbitrary signals within the first 500 milliseconds of RoboPad boot and as such should not be used for actuators that may cause harm if they were to unexpectedly move. Others (particularly the "Internal" pins) are already connected to some internal electronics on the RoboPad, such as the built-in HBridge that drives the default M1 and M2 outputs. In order to use these pins, you would have to remove the HBridge from the device (which is not advised and will void the product's guarantee).

Pins

Accessible pins, as they are seen on the RoboPad.

All pins are capable of driving a small current at 3.3v to external circuitry, below is a list of the different pin names and how they might be used.

Pin names, IDs and additional information
Pin Name ID on Board Information
External 1 E1 Non-advanced pin.
External 2 E2 Non-advanced pin.
TX T The "Transmit" pin when manually reprogramming the RoboPad.

Subject to pseudo-random signal state for the first 500ms after RoboPad boot.

RX R The "Recieve" pin when manually reprogramming the RoboPad.

Subject to pseudo-random signal state for the first 500ms after RoboPad boot.

Safeboot SB Pulled low through an on-board 10kΩ resistor, and meant to be connected to the 3.3v pin (pulling it high) at the 4 seconds after boot point to enable safeboot.

Subject to pseudo-random signal state for the first 500ms after RoboPad boot.

Program Enable PE Used along with the TX and RX pins to manually reprogram the RoboPad.

Subject to pseudo-random signal state for the first 500ms after RoboPad boot.

Unset When "Unset" is available, the pin may optionally be non-configured. Choosing this option means no pin is used for the particular option.
Drive Enable Internal An internal pin used to enable or disable the built-in HBridge chip.

Subject to pseudo-random signal state for the first 500ms after RoboPad boot.

Drive Pin 1

Forward

Internal An internal pin attached to the built-in HBridge chip.

Subject to pseudo-random signal state for the first 500ms after RoboPad boot.

Drive Pin 1

Backward

Internal An internal pin attached to the built-in HBridge chip.

Subject to pseudo-random signal state for the first 500ms after RoboPad boot.

Drive Pin 2

Forward

Internal An internal pin attached to the built-in HBridge chip.

Subject to pseudo-random signal state for the first 500ms after RoboPad boot.

Drive Pin 2

Backward

Internal An internal pin attached to the built-in HBridge chip.

Subject to pseudo-random signal state for the first 500ms after RoboPad boot.

IO Units

A variety of IO Units can be added that are suitable for a number of uses, all are listed here.

Actuators

All actuators add input ports to the Chip Node, allowing signals to be passed from the Node Graph to each actuator. On top of this, each actuator will create an output port on the Chip Node, usually labelled ending with "Armed" - this is an indicator of whether or not the actuator is armed. The signal to any specific actuator must pass through that actuator's configured safe value for it to be considered to be armed - then and only then will the actuator start to process new control signals. As an example, an servo attached using the "PWM Output" with a safety value set to 50% would require a near-50% signal to be sent to it's input before you will be able to see any change in the pin's output.

All actuators output 3.3 volts along their output pins.

H-Bridge Motor

H-Bridge Motor IO Unit Screenshot 2023-2-20.png

A H-Bridge is a simple, common circuit that can control the polarity of electricity to an attached electrical component - commonly a motor. In practice this means that a typical brushed DC motor's direction and speed can be controlled from one using two control signals. While you can make one yourself using transistors (that site also has a useful example using switches which might make the concept easier to understand too), they often come in integrated circuit (IC) form factors, such as the Texas Instruments L293D, which packs two H-bridges and comes bundled with some additional features.

Using this IO Unit, the RoboPad will send drive signals suitable for use with a H-bridge through the specified pins (PinA and PinB). It's emergency stop state is to stop all signals and power down associated pins.

  • Name: The name of this HBridge motor, basically only changes the name of the motor input on the Chip Node.
  • Pin A: One of the two directional signals needed by H-Bridge chips.
  • Pin B: One of the two directional signals needed by H-Bridge chips, signalling the opposite direction from that signalled in Pin A.
  • Enable Pin: If set to a value other than "Unset", a high signal will be transmitted whenever the H-Bridge is in use; to be connected to a H-Bridge chip's "enable" pin(s).
  • Forward Scale: Scales the forward signal (over 50%) before it is transmitted to the motor signal pins - if your motor drives forward faster than backwards, then you can lower this value.
  • Reverse Scale: Scales the backward signal (below 50%) before it is transmitted to the motor signal pins - if your motor drives backwards faster than forwards, then you can lower this value.

Built-in H-Bridge Motor

The Built-In H-Bridge Motor IO Unit UI

The "Built-in H-Bridge Motor" IO unit is a specialised version of the "H-Bridge Motor" above, specifically designed to work only with the two built-in H-Bridges on the RoboPad, allowing you to select motors to be attached to the M1 and M2 pin pairs on the board. By default, two of these are configured, one for M1 and one for M2. When in the emergency stop state, these IO Units attempt to send a stop signal to any attached motors, not powering any associated pins.

  • Name: The name of this HBridge motor, basically only changes the name of the motor input on the Chip Node.
  • Built-in Motor: Which of the two built-in motor pins this H-Bridge Motor IO Unit references - M1 connects to the M1 pins, M2 to the M2 pins.
  • Forward Scale: Scales the forward signal (over 50%) before it is transmitted to the motor signal pins - if your motor drives forward faster than backwards, then you can lower this value.
  • Backward Scale: Scales the backward signal (below 50%) before it is transmitted to the motor signal pins - if your motor drives backwards faster than forwards, then you can lower this value.

Unidirectional Brushless Motor

This page is still under construction, more to come soon...