Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retro Modules v1.0 proposal #12

Open
wants to merge 4 commits into
base: master
from
Open
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -0,0 +1,2 @@
.idea/*
*.env.dev.*
@@ -44,44 +44,75 @@ Getting Started
===============
Note: power contacts feature positive [DC](definitions/direct-current.yaml) unless stated otherwise.

Consider [DA-15 connectors](connectors/module/dsub-da-15/dsub-da-15.yaml), which were once called 'Game Ports'. Before USB, joysticks would generally be connected to computers via these connectors. Since they're so rare in modern computing, they are a perfect choice for the Maker Movement. That said, the connectors are still pretty easy to find & work with. Most electronics part stores will have a few DA-15 connectors for sale. A module can be as simple as a resistor & LED connected to two of the pins.
Many electronics part stores will have a few DE-9 connectors for sale. A
module can be as simple as a resistor & LED connected to two of the pins.

Adapt Your Microcontroller
--------------------------
The first step is to adapt your microcontroller board. Thankfully, you don't need to adapt the entire thing at once. Lets start with support for `pwm` modules by following the directives below. Start with a 5V Arduino & a female [DA-15 Connector](connectors/module/dsub-da-15/dsub-da-15.yaml).
The first step is to adapt your microcontroller board. Thankfully, you don't
need to adapt the entire thing all at once. Lets start with support for a
module requiring `pwm` functionality by following the directives below. Start
with a 5V Arduino & a `socket-style` [DE-9 Connector](connectors/module/dsub-de-9/dsub-de-9.yaml).

##### Arduino => PWM-Capable [DA-15 Connector](connectors/module/dsub-da-15/dsub-da-15.yaml)
* `D5` => [DA-15](connectors/module/dsub-da-15/dsub-da-15.yaml) pin 5
* `5V` => [DA-15](connectors/module/dsub-da-15/dsub-da-15.yaml) pin 9
* `common` => [DA-15](connectors/module/dsub-da-15/dsub-da-15.yaml) pin 10
* `common` => [DA-15](connectors/module/dsub-da-15/dsub-da-15.yaml) pin 12
##### Arduino => PWM-Capable [DE-9 Connector](connectors/module/dsub-de-9/dsub-de-9.yaml)
* `D5` => [DE-9](connectors/module/dsub-de-9/dsub-de-9.yaml) `pwm` contact
* `5V` => [DE-9](connectors/module/dsub-de-9/dsub-de-9.yaml) `digital-reference` contact
* `common` => [DE-9](connectors/module/dsub-de-9/dsub-de-9.yaml) `common` contact

Your First Retro Module
-----------------------
To make a module with a fading LED, follow the wiring directives below. Use a male [DA-15 Connector](connectors/module/dsub-da-15/dsub-da-15.yaml). Connect your module to the connector you made, above. Load the Arduino 'Fade' example sketch. Set the led variable to 5 & upload.
To make a module with a fading `led`, follow the wiring directives below. Use a
`pin-style` [DE-9 Connector](connectors/module/dsub-de-9/dsub-de-9.yaml).
Connect your module to the connector you made, above. Load the Arduino 'Fade'
example sketch. Set the `led` variable to `5` & upload.

##### [DA-15](connectors/module/dsub-da-15/dsub-da-15.yaml) <= LED
* `pwm` <= 330 ohm resistor <= LED anode
* `common` <= LED cathode
##### [DE-9](connectors/module/dsub-de-9/dsub-de-9.yaml) <= LED
* `pwm` <= 330 ohm resistor <= LED anode
* `common` <= LED cathode

Your Second
-----------
Now consider making a separate servo module. You will need a 5 volt 180 degree servo & another male [DA-15 Connector](connectors/module/dsub-da-15/dsub-da-15.yaml). Follow the wiring directives below. Load the Arduino 'Sweep' example sketch. Replace 9 with 5 in the sketch (e.g. `myservo.attach(5);`) & upload.
Now consider making a separate servo module. You will need a 5 volt 180 degree
servo & another `pin-style` [DE-9](connectors/module/dsub-de-9/dsub-de-9.yaml).
Follow the wiring directives below.
Load the Arduino 'Sweep' example sketch & upload.

##### [DA-15](connectors/module/dsub-da-15/dsub-da-15.yaml) <= Servo
* `pwm` <= Servo yellow/orange/white 'signal' wire
##### [DE-9](connectors/module/dsub-de-9/dsub-de-9.yaml) <= Servo
* `common` <= Servo brown/black 'common' wire
* `digital-reference` <= Servo red 'power' wire
* `pwm` <= Servo yellow/orange/white 'signal' wire

Note that we're connecting the power wire to the `digital-reference` pin. Since we're using a 5V microcontroller board, the `digital-reference` is roughly 5V. The board voltage regulator isn't designed to handle much, but it can probably drive a single small servo. If your microcontroller board were 3.3V, `digital-reference` would be roughly 3.3V. This pin, in more advanced modules, allows boards with differing logic levels to adapt.
Note that we're connecting the power wire to the `digital-reference` pin. The
board voltage regulator isn't designed to handle much, but it can probably
drive a single small servo.

Next steps
----------
Ponder adding potentiometers to each of the above modules, via the `adc-2` pin (A2 in Arduino parlance). These are basic, but fully usable interactive modules.

Consider chainability as well. 'Host' modules (which generally house an Arduino), should have one or more female connectors. 'Client' modules should have both a male & female connector. If a client module uses `adc-2` or `pwm` on the male connector, that pin should be absent from its female connector. The serial connections, as summarized below, should pass through each module no matter what. If you're putting your client modules in an enclosure, put a sticker on the module describing which (if any) non-serial pins are in use.

Take a look at I2C, SPI and CAN bus. There are many cheap I2C devices out there (accelerometers, LED displays, etc). Consider I2C & SPI for short to medium-range digital communication. CAN bus is better for longer distances & reliability. 1-Wire is also interesting & may prove most useful in the wearable realm.
If you have more time & resources, consider having 'proxy' microcontrollers in certain modules. Say you have a SPI-based MP3 player board, but you want to avoid using SPI pins. Build your module with a proxy microcontroller connected to the Retro Spec I2C bus, and only connect your MP3 player SPI wires to that internal microcontroller. You can then craft simple programs to serve as interfaces on the I2C bus. If you're comfortable with CAN bus... choose that instead of I2C.

Finally, take a look at [some host module ideas](modules/host) and [popular interfaces](connectors/module-internal).
Ponder adding potentiometers to each of the above modules, via the `adc-*` pins
(A2 in Arduino parlance).
These are basic, but fully usable interactive modules.

Consider "chainability" as well. 'Host' modules (which generally house an
Arduino), should have one or more `socket-style` connectors. 'Client' modules
should have both a `socket-style` & `pin-style` connector. If a client module
uses a non-serial contact (e.g. `pwm`) on the `pin-style` connector, that pin
should be absent from its `socket-style` connector. The serial connections, as
summarized below, should pass through each module no matter what. If you're
putting your client modules in an enclosure, put a sticker on the module
describing which (if any) non-serial pins are in use.

Take a look at I2C, SPI and CAN bus. There are many cheap I2C devices out there
(accelerometers, LED displays, etc). Consider I2C & SPI for short to
medium-range digital communication. CAN bus is better for longer distances &
reliability. The `one-wire-data` communication protocol is unique & may prove
useful in wearable modules and/or modules that need to send basic messages.

Consider having 'proxy' microcontrollers in certain modules. Say you have a
SPI-based MP3 player board, but you want to avoid using SPI pins among your set
of modules. Build your module with a proxy microcontroller connected to the I2C
contacts, and only connect your MP3 player SPI wires to that internal proxy
microcontroller. You can then craft simple programs to serve as interfaces on
the I2C bus. If you're comfortable with CAN bus... choose that instead of I2C.

If you have a few minutes to spare, take a look at [some 3D models](models),
[host module ideas](modules/host) and [popular interfaces](connectors/module-internal).
@@ -10,7 +10,7 @@ description: >
signals isolated from S/PDIF signals. S/PDIF is best transmitted via coaxial
cable & is not the most resilient of signals.
Modern smartphones do not feature CAN, S/PDIF, nor can they tolerate 30VDC.
With a relatively small enclosure, though, the power on the thirty-volts-max
With a relatively small enclosure, though, the power on the `forty-volts-max`
contact can be regulated to five volts (or be piped into a
`qualcomm-quick-charge-adapter`). The analog audio can be converted to S/PDIF
with a audio ADC chip. What about CAN? Well most smart devices can have basic
@@ -35,4 +35,4 @@ contacts:
2: controller-area-network-low
3: controller-area-network-high
4: common
5: thirty-volts-max
5: forty-volts-max
@@ -30,8 +30,8 @@ contacts:
5: i2c-data
6: digital-reference
7: pixel-data
8: thirty-volts-max
9: thirty-volts-max
8: forty-volts-max
9: forty-volts-max
10: spi-slave-select
11: spi-master-out-slave-in
12: spi-master-in-slave-out
@@ -11,7 +11,7 @@ aliases:
contacts:
tip:
- av-bus-mono
- speaker-x-positive
- speaker-channel-1-positive
sleeve:
- av-bus-common
- speaker-x-negative
- speaker-channel-1-negative
@@ -9,12 +9,15 @@ aliases:
- D-sub 9
- DB-9
contacts:
1: thirty-volts-max
1:
- pixel-data
- pwm
2: controller-area-network-low
3: controller-area-network-high
4: common
5: pixel-data
4: common-host-reset
5: fifteen-volts-max
6: digital-reference
7: i2c-clock
8: i2c-data
9: common
10: key
@@ -0,0 +1,33 @@
Enhanced Battery Connector
==========================
The typical series battery pack is just that: a simple set of batteries [wired
in series](https://en.wikipedia.org/wiki/Series_and_parallel_circuits#Series_circuits)
with some extra wires for monitoring things. This is pretty much the least
expensive way to manufacture batteries. Hobbyists prefer this approach due to
price & access to the raw components within the battery pack.

This connector is meant to be a very affordable complement to these batteries.

The idea is that you would be able to connect your battery to your charge
controller & the charge controller would load a preset based on the
[multi-cell battery resistor matrix](../../../definitions/multi-cell-battery-resistor-matrix.md).
The Enhanced Battery Connector supports up to six batteries wired in series
(e.g. 1S, 2S, 3S, 4S, 5S & 6S battery packs).

Examples
--------
* 1S LiPo battery pack:
* 1K Ohm resistor
* 6S Pb battery pack (e.g. a 12V lead acid battery):
* 1.6 Ohm resistor
* 6S LiIo battery pack:
* 160 Ohm resistor
* 6S LiPo battery pack:
* 1.6K Ohm resistor

Details
-------
Please refer to the
[DA-15](../../../connectors/module/dsub-da-15/dsub-da-15.yaml) or
[header-16](../../../connectors/module-internal/header-16/header-16.yaml)
spec for more details.
@@ -0,0 +1,22 @@
name: Header 16 Pin
summary: Enhanced Battery Connector
references:
- https://electronics.stackexchange.com/a/352440
buy:
- http://www.networkcables.com/proddetail.php?prod=CO19MS
contacts:
1: one-wire-data
2: id
3: series-sum
4: common
5: series-balance-ref-0
6: series-balance-ref-2
7: series-balance-ref-4
8: series-balance-ref-6
9: regulated-five-volts
10: common
11: series-sum
12: common
13: series-balance-ref-1
14: series-balance-ref-3
15: series-balance-ref-5
@@ -21,39 +21,50 @@ keywords:
- d-sub 25
- db-25
contacts:
1: digital-audio-spdif
1: spi-clock
2: controller-area-network-high
3: controller-area-network-low
4: i2c-clock
5: i2c-data
6: digital-reference
7: pixel-data
8: thirty-volts-max
9: thirty-volts-max
10: spi-slave-select
11: spi-master-out-slave-in
12: spi-master-in-slave-out
13: spi-clock
14: common-power-request
15: regulated-five-volts
16: av-bus-audio-mic
17: - av-bus-video-composite
- av-bus-video-component-pb
- common
18: - av-bus-video-separate-luminance
- av-bus-video-component-pr
- common
19: - av-bus-video-separate-chrominance
- av-bus-video-component-y
- common
20: common
21: - av-bus-common
- common
7: fifteen-volts-max
8:
- pixel-data
- pwm
9: forty-volts-max
10: forty-volts-max
11: av-bus-common
12:
- av-bus-audio-mic-left
- av-bus-audio-mic-1
13:
- av-bus-audio-mic-right
- av-bus-audio-mic-2
14: spi-master-out-slave-in
15: spi-master-in-slave-out
16: spi-slave-select
17:
- av-bus-video-composite
- av-bus-video-component-pb
- common
18:
- av-bus-video-separate-luminance
- av-bus-video-component-pr
- common
19:
- av-bus-video-separate-chrominance
- av-bus-video-component-y
- common
20: common-host-reset
21: common
22: common
23: - av-bus-audio-left
- common
24: - av-bus-audio-right
- common
25: - av-bus-audio-special-effects
- common
26: reserved
23: common-power-request
24:
- av-bus-audio-left
- av-bus-audio-channel-1
- common
25:
- av-bus-audio-right
- av-bus-audio-channel-2
- common
26: key
@@ -14,13 +14,14 @@ keywords:
- d-sub 9
- de-9
contacts:
1: thirty-volts-max
1:
- pixel-data
- pwm
2: controller-area-network-low
3: controller-area-network-high
4: common
5: pixel-data
4: common-host-reset
5: fifteen-volts-max
6: digital-reference
7: i2c-clock
8: i2c-data
9: common
10: reserved
@@ -14,7 +14,7 @@ keywords:
- d-sub 9
- de-9
contacts:
1: thirty-volts-max
1: forty-volts-max
2: controller-area-network-low
3: controller-area-network-high
4: common
@@ -23,4 +23,4 @@ contacts:
7: i2c-clock
8: i2c-data
9: common
10: reserved
10: key
@@ -7,4 +7,4 @@ contacts:
1: one-wire-data
2: pixel-data
3: common
4: thirty-volts-max
4: forty-volts-max
@@ -5,6 +5,6 @@ contacts:
1: one-wire-data
2: pixel-data
3: common
4: thirty-volts-max
4: forty-volts-max
5: controller-area-network-low
6: controller-area-network-high
@@ -45,7 +45,7 @@ legacy_colors:
contacts:
1: controller-area-network-low
2: pixel-data
3: thirty-volts-max
3: forty-volts-max
4: common
5: one-wire-data
6: controller-area-network-high
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.