diff --git a/docs/electrical.md b/docs/electrical.md new file mode 100644 index 0000000..c2db537 --- /dev/null +++ b/docs/electrical.md @@ -0,0 +1,46 @@ +# TeraHz Electrical Guide +This section briefly explains the neccessary electrical connections between the +Raspberry Pi and the sensors you'll need to make to ensure correct and safe +operation. + +As mentioned before, TeraHz requires 3 sensors to operate. The simpler UVA/UVB +sensor and the ambient light analyzer connect to the Raspberry's SMBus (I2C) +bus, while the spectrometer connects via high-speed UART. + +![pinout](imgs/raspi-pinout.png) + +## PCBs vs breakout boards & jumpers +The Raspberry Pi GPIO port includes enough power pins to require only jumper +cables to connect the sensors to the Raspberry Pi. However, this is not a great +idea. During development, jumper cables have repeatedly been proven to be an +unreliable nuisance, and their absolute lack of rigidity helped me fry one of my +development Raspberry Pis. For this reason, I wholeheartedly recommend using a +simple PCB to route the connections from the Pi to the sensors. At this time, +there is no official TeraHz PCB, but it shall be announced and included in the +project when basic testing will be done. + +GPIO can be routed to the PCB with a standard old IDE disk cable, and terminated +with another 40-pin connector at the PCB. Sensor breakouts should be mounted +through standard 0.1" connectors, male on the sensor brakout and female on the +PCB. A shitty addon header and a shitty addon header v1.69bis can't hurt, either. + +## SMBus sensors +SMBus is a well-defined version of the well-known I2C bus, widely used +in computer motherboards for low-band bandwidth communication with various ICs, +especially sensors and power-supply related devices. This bus is broken out on +the Raspberry Pi GPIO port as the "I2C1" bus (see picture). + +Pins are familiarly marked as SDA and SCL, the same as with classic I2C. They +connect to the SDA and SCL pins on the VEML6075 and APDS-9301 sensor. + +## UART sensor +Spectrometry sensor attaches through the UART port on the Raspberry pi (see picture). + +The Tx and Rx lines must cross over, connecting the sensor's Tx line to the +computer's Rx line and vice versa. + +## Power supply +As the sensors require only a small amount of power, they can be powered directly from the Raspberry Pi itself, leeching power from the 3.3V lines. + +## Ground +There's not a lot to say here, connect sensor GND to Pi's GND. diff --git a/docs/hookup.md b/docs/hookup.md deleted file mode 100644 index e69de29..0000000 diff --git a/docs/imgs/raspi-pinout.png b/docs/imgs/raspi-pinout.png new file mode 100644 index 0000000..f657d35 Binary files /dev/null and b/docs/imgs/raspi-pinout.png differ diff --git a/mkdocs.yml b/mkdocs.yml index b7406f7..a362201 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,6 +1,9 @@ site_name: TeraHz Documentation theme: readthedocs nav: - - 'index.md' - - 'build.md' - - 'dependencies.md' +- Start page: 'index.md' +- Building manually: + - Build guide: 'build.md' + - Latest dependencies: 'dependencies.md' +- Expert\'s guide: + - Electrical connections: 'electrical.md'