Skip to content

Latest commit

 

History

History
361 lines (348 loc) · 14.9 KB

module_detection.md

File metadata and controls

361 lines (348 loc) · 14.9 KB

Pimoroni Yukon - Module Detection

This is the module detection documentation for the Pimoroni Yukon, a high-power modular robotics and engineering platform, powered by the Raspberry Pi RP2040.

How it Works

Yukon detects which modules are attached to it by reading the state of each slot's ADC and SLOW IO pin prior to module initialisation and power-up. This forms an "address" that is used to verify that the module attached to a slot matches what the code has been configured with, preventing unexpected or potentially dangerous behaviour.

IO States

Below are the states that the two ADC pins and three SLOW IO pins support.

Pin States Disconnected State
ADC1 LOW or FLOAT or HIGH FLOAT
ADC2 LOW or FLOAT or HIGH HIGH (due to thermistor 5.1k pull-up)
SLOW1 LOW or HIGH HIGH (due to IO expander pull-up)
SLOW2 LOW or HIGH HIGH (due to IO expander pull-up)
SLOW3 LOW or HIGH HIGH (due to IO expander pull-up)

Also shown is the state these pins will have if they are left disconnected, such as when a slot is empty. This "address" should be avoided by any custom module.

Multiple Addresses

If a module does not have a single state it can start in, or it retains a state from a previous power-up, then it will need to be assigned multiple addresses. All modules that feature an onboard thermistor automatically take up three addresses minimum to account for the different temperatures the sensor can read during detection. Similarly, any modules that expose an ADC pin to the user will automatically require addresses to cover the full voltage range of that pin, with the worst case being 9 addresses if both ADC1 and ADC2 are user accessible.

Address Table

Here is the current address list for Yukon modules produced by Pimoroni.

>
ADC1ADC2SLOW1SLOW2SLOW3ModuleCondition (if any)
LOW LOW 0 0 0 Quad Servo Direct A1 low, A2 low
FLOAT A1 low, A2 mid
HIGH A1 low, A2 high
FLOAT LOW A1 mid, A2 low
FLOAT A1 mid, A2 mid
HIGH A1 mid, A2 high
HIGH LOW A1 high, A2 low
FLOAT A1 high, A2 mid
HIGH A1 high, A2 high
LOW LOW 0 0 1 Big Motor + Encoder No Fault
FLOAT
HIGH
FLOATLOW001
FLOATFLOAT001
FLOATHIGH001
HIGH LOW 0 0 1 Dual Motor
FLOAT
HIGH
LOWLOW010
LOWFLOAT010
LOWHIGH010
FLOATLOW010
FLOATFLOAT010
FLOATHIGH010
HIGH LOW 0 1 0 Quad Servo Regulated Power Not Good
FLOAT
HIGH
LOW LOW 0 1 1 Big Motor + Encoder Faulted
FLOAT
HIGH
FLOAT LOW 0 1 1 Audio Amp Mono
FLOAT
HIGH
HIGH LOW 0 1 1 Quad Servo Regulated Power Good
FLOAT
HIGH
LOW LOW 1 0 0 Bench Power Output Discharged
FLOAT
HIGH
FLOAT LOW Output Discharging
FLOAT
HIGH
HIGHLOW100
HIGHFLOAT100Reserved
HIGHHIGH100Serial Bus Servo
LOWLOW101Reserved
LOWFLOAT101RM2 Wireless
LOWHIGH101Reserved
FLOAT LOW 1 0 1 Dual Switched Output
FLOAT
HIGH
HIGHLOW101
HIGHFLOAT101
HIGHHIGH101
LOWLOW110
LOWFLOAT110
LOWHIGH110Proto PotentiometerMin Position
FLOATLOW110
FLOATFLOAT110
FLOATHIGH110Proto PotentiometerBetween Min and Max
HIGHLOW110
HIGHFLOAT110Reserved
HIGHHIGH110Proto PotentiometerMax Position
LOW LOW 1 1 1 LED Strip
FLOAT
HIGH
FLOATLOW111
FLOATFLOAT111
FLOATHIGH111Empty Slot
HIGHLOW111Reserved
HIGHFLOAT111Reserved
HIGHHIGH111Reserved