vault backup: 2026-07-11 16:59:05

This commit is contained in:
John Lyon-Smith
2026-07-11 16:59:05 -07:00
parent b0318f13ae
commit ecb462a16b
82 changed files with 1970 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 KiB

BIN
Assets/Image 1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 901 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 KiB

View File

@@ -0,0 +1,3 @@
## References
- ![[4-way_switch_wiring 1.png]]

View File

@@ -0,0 +1,16 @@
---
tags:
- resource
created: 2026-01-03 12:21
---
## Summary
The 555 timer is a common chip used in the construction of timer circuits.
## Notes
## References
- [555 Adjustable Delay on Off Timer Circuit : 8 Steps - Instructables](https://www.instructables.com/555-Adjustable-Delay-on-Off-Timer-Circuit)
- [The 555 Timer IC Lecture](https://www.me.psu.edu/cimbala/me345/Lectures/The_555_Timer_IC.pdf)

View File

@@ -0,0 +1,21 @@
---
created: 2025-07-23
tags:
- resource
---
## Summary
A 4 channel analogue to digital converter board.
## Notes
There is a Rust crate for interfacing to the board. Requires calibration when based on the input signal. Default address for the board is 0x48 (see section 7.5.1.1 of the data sheet)
## References
- [`ads1x1x` crate](https://crates.io/crates/ads1x1x)
- [How to use ADS1115 16-Bit ADC Module with Raspberry Pi](https://how2electronics.com/how-to-use-ads1115-16-bit-adc-module-with-raspberry-pi)
- [Amazon: ADS1115 Analog-to-Digital Converter 16 Bit ADC 4](https://www.amazon.com/Converter-Programmable-Amplifier-Development-Compatible/dp/B08QD2C42R)
- https://www.ti.com/lit/ds/symlink/ads1115.pdf
- [Using the second (I2C 0) port on a Raspberry Pi - YouTube](https://www.youtube.com/watch?v=FUAiELC76aw)
- [Several I2C Devices, how to wire them? - Raspberry Pi Forums](https://forums.raspberrypi.com/viewtopic.php?t=371894)
- [[Odin's Dilemma Human Chain Puzzle]]

View File

@@ -0,0 +1,10 @@
## References
- [Ethernet - Arduino Reference](https://www.arduino.cc/reference/en/libraries/ethernet)
- [A complete guide to running Rust on Arduino - LogRocket Blog](https://blog.logrocket.com/complete-guide-running-rust-arduino)
- [Arduino - Turn LED ON and OFF With Button - The Robotics Back-End](https://roboticsbackend.com/arduino-turn-led-on-and-off-with-button)
- https://github.com/avrdudes/avrdude
- [Adding the #[no_std] attribute - The AVR-Rust Guidebook](https://book.avr-rust.org/005.2-adding-no-std-attribute.html)
- [GitHub - osx-cross/homebrew-avr: Homebrew AVR Toolchain](https://github.com/osx-cross/homebrew-avr)
- [A complete guide to running Rust on Arduino - LogRocket Blog](https://blog.logrocket.com/complete-guide-running-rust-arduino/)

View File

@@ -0,0 +1,15 @@
---
tags:
- resource
created: 2025-01-04 17:20
---
## Summary
What's the best A3 Inkjet printer
## References
- [A Paper Sizes - A0, A1, A2, A3, A4, A5, A6, A7, A8, A9, A10](https://www.papersizes.org/a-paper-sizes.htm)
- https://thedroidguy.com/best-printers-for-architects-1160434
- [Epson P800 Vs Canon Pro 1000 | Best A2 Photo Printer](https://www.architecturelab.net/epson-p800-vs-canon-pro-1000-best-a2-photo-printer)
- [🖨️ Best Printer for Art Prints: 14 Artists' Picks in 2025 (Budget, A3, Giclee, Fine Art)](https://artsideoflife.com/best-printer-art-prints)

View File

@@ -0,0 +1,16 @@
## 4017B Chip
[cd4017b.pdf](cd4017b.pdf)
## LM555
[lm555.pdf](lm555.pdf)
## Arduino
[Arduino-Nano-Datasheet.pdf](Arduino-Nano-Datasheet.pdf.md)
## Potentiometers
[Preset Potentiometer (Trimpot).pdf](Preset%20Potentiometer%20(Trimpot).pdf)

View File

@@ -0,0 +1,18 @@
---
tags:
- resource
created: 2025-05-04 19:57
---
## Summary
How to use hardware and software to debounce switches.
## Notes
## References
- https://logiswitch.com/wp-content/uploads/LS10-Series-ICs-Technical-Details.pdf
- https://www.digikey.com/en/products/detail/LS18-S/2978-LS18-S-ND/13540839
- https://www.digikey.com/en/articles/how-to-implement-hardware-debounce-for-switches-and-relays

View File

@@ -0,0 +1,38 @@
---
tags:
- resource
created: 2026-05-30 11:26
---
## Summary
One channel is inverted in differential signaling to provide exceptional **noise immunity** and to **double the signal strength.**
In differential signaling, the data is transmitted across two separate conductors: one carries the original signal, and the other carries an inverted (mirror-image) copy. Here is why this is done:
1. Superior Noise Cancellation
External electrical interference (like electromagnetic noise from nearby wires or power supplies) usually affects both wires in a pair equally. This is known as **common-mode noise**.
- At the receiving end, a differential amplifier subtracts the two signals to determine the true data.
- Because the noise exists equally on both wires, the subtraction mathematically cancels the noise out completely.
2. Doubled Signal Strength
When the receiver subtracts the inverted signal from the original signal, it yields double the voltage difference.
- For example, if the original signal is \(+1V), the inverted signal is \(-1V).
- The voltage difference is: \(+1V - (-1V) = 2V).
- This creates a stronger overall signal, making it much easier to detect data accurately even in noisy environments or over very long distances.
3. Reduced Electromagnetic Interference (EMI)
Because the two wires run tightly parallel to each other, the equal and opposite magnetic fields they generate cancel each other out. This prevents the cables from radiating their own electronic noise, allowing for high-speed transmission with minimal cross-talk.
The two differential wires are **twisted** so that any EMI signal reaches both wires at essentially the same time. This is referred to as a **twisted pair**.
Differential signalling does not affect noise cancellation. [Balanced lines](https://en.wikipedia.org/wiki/Balanced_line "Balanced line") with differential receivers will reject noise regardless of whether the signal is differential or single-ended, but since balanced line noise rejection *requires* a differential receiver, differential signalling is often used on balanced lines.
## References
- [Why Twisted Pair?](https://www.youtube.com/watch?v=RVzM-b3okH0)
- [Differential Signaling]()

View File

@@ -0,0 +1,8 @@
# Digital Oscilliscope
[](https://www.siglenteu.com/operating-tip/adding-mso-logic-analyzer-capability-sds1004x-e-series-oscilloscopes/)
[](https://www.thegeekpub.com/243253/the-best-benchtop-power-supplies-for-hobbyists/)
[](https://www.calculator.net/voltage-drop-calculator.html)

View File

@@ -0,0 +1,4 @@
# Electrical Connectors
[Identify Electrical Connectors - Tutorial Australia](https://core-electronics.com.au/guides/identify-electrical-connectors/)

View File

@@ -0,0 +1,8 @@
# Embedded Rust
- [`awesome-embedded-rust` with lots of links to embedded Rust stuff](https://github.com/rust-embedded/awesome-embedded-rust)
- [`rppal` that implements `embedded-hal` traits](https://docs.rs/rppal/latest/rppal/)
- [`embedded-hal` traits](https://github.com/rust-embedded/embedded-hal)
- [Example of using Rust to develop flashing LED](https://www.freecodecamp.org/news/embedded-rust-programming-on-raspberry-pi-zero-w/) (uses `rust_gpiozero` crate)
- [Rust MFRC522 driver](https://gitlab.com/jspngh/rfid-rs) for RFID chip reading

View File

@@ -0,0 +1,48 @@
---
tags:
- resource
created: 2025-04-24 12:26
---
## Summary
Notes about the [EPLZON DC 5V-36V 15A 400W MOSFET Transistor Trigger Switch Drive Module](https://www.amazon.com/dp/B09LLR675M) available on Amazon.
## Notes
The article [Dual MOSFET Switch Module WORTH IT OR NOT? - Codrey Electronics][1] describes the board and it's strengths and shortcomings.
The circuit diagram is shown here:
![[Dual MOSFET Switch Module.png]]
The board has two [AOD4184A MOSFET's][2] in parallel.
Key points to note:
1. The switch is triggered from the J1 pin and grounded on the J4 pin
2. Power flows through VIN+ to VOUT+ then is actually switched between VOUT- and VIN-
3. Adding the [flyback diode][3] is important for solenoids to prolong the life of the switch
4. It would be a good board to re-design our own version of to include the 2 resistors and the flyback diode that he mentions in the article
>If you use a standard MOSFET, a 3.3V gate signal won't open the "channel" completely. This causes the MOSFET to have a high R_DS(on), meaning it will heat up rapidly, limit the amount of current your load can draw, and potentially burn out.
## References
- [Dual MOSFET Switch Module WORTH IT OR NOT? - Codrey Electronics](https://www.codrey.com/electronics/dual-mosfet-switch-module)
- [Driving Parallel MOSFETS](https://www.ti.com/lit/ab/slvaf39a/slvaf39a.pdf)
- [Flyback diode - Wikipedia](https://en.wikipedia.org/wiki/Flyback_diode)
- [MOSFET selection for 3.3VDC](https://forum.digikey.com/t/guide-to-selecting-and-controlling-a-mosfet-for-3-3-vdc-logic-applications/42606)
- [AOD4184A datasheet](https://www.aosmd.com/sites/default/files/res/datasheets/AOD4184A.pdf)
- [SIHLR024 datasheet](https://www.vishay.com/docs/91322/sihlr024.pdf)
- [SiHLU024 DigiKey](https://www.digikey.com/en/products/detail/vishay-siliconix/sihlu024-ge3/16397615)
- [FDN337N datasheet](https://www.onsemi.com/pdf/datasheet/fdn337n-d.pdf)
- [AO3400 datasheet](https://www.aosmd.com/res/datasheets/AO3400.pdf)
- [AO3400-202604 datasheet](https://www.goodworksemi.com/wp-content/uploads/2026/03/GK-SOT-23_AO3400-202604.pdf) <- current favorite
- [IRLZ44NPbF datasheet ](https://www.infineon.com/assets/row/public/documents/24/49/infineon-irlz44n-datasheet-en.pdf) Through hole for better heat dissipation
- [IRLML2502PbF](https://www.infineon.com/assets/row/public/documents/24/49/infineon-irlml2502-datasheet-en.pdf)
- [MOSFET gate resistor](https://www.build-electronic-circuits.com/mosfet-gate-resistor/)
- [YouTube - AO3040 board build](https://www.youtube.com/watch?v=9XFCOGmvo1E&t=230s)
We could increase the 3.3V input signal to 5V using an NPM transistor, as in this circuit:
![[Screenshot 2026-05-30 at 5.58.28 PM.png]]

View File

@@ -0,0 +1,446 @@
---
tags:
- resource
created: 2026-07-02 17:17
---
## Summary
## Notes
To interface the **FPM10A** (or AS608) fingerprint sensor with a Raspberry Pi in Rust, you use the **`rppal`** crate to communicate via UART. The sensor uses a byte-oriented packet protocol (prefixed with `0xEF 0x01` and a checksum). [[1](https://docs.rs/rppal/latest/rppal/uart/index.html), [2](https://users.rust-lang.org/t/good-gpio-crate-for-raspberry-pi-with-example-reading-code/104744), [3](https://www.scribd.com/document/418930331/FPM10-R305-Fingerprint-Sensor-Interfacin), [4](https://doc.grablo.co/en/docs/user-manuals/i-o-device/as608-fpm10a-fingerprint-sensor/), [5](https://docs.rs/rppal)]
1. Wiring the Sensor
The FPM10A uses standard TTL serial, so you need to shift to 3.3V logic for the Raspberry Pi. Connect the pins as follows: [[1](https://www.robotechbd.com/product/sensors/fpm10a-fingerprint-reader-module-3-3v-5v/?srsltid=AfmBOor0OAfLEf3pAxrEbpz1neXPG8k-dPymfhFZ0llotH9e4It2jZFJ), [2](https://forum.arduino.cc/t/fpm10a-fingerprint-sensor-question/490666)]
- **Sensor VCC** → Raspberry Pi **3.3V or 5V** (Sensor supports 3.6V - 6.0V, but the Pi's TX pin should be level-shifted if you power the sensor at 5V)
- **Sensor GND** → Raspberry Pi **GND**
- **Sensor TX** (White wire) → Raspberry Pi **GPIO15 / RXD**
- **Sensor RX** (Green wire) → Raspberry Pi **GPIO14 / TXD** [[1](https://cdn.awsli.com.br/945/945993/arquivos/FPM10A-DY50.pdf), [2](https://www.duino.lk/product/fpm10a-fingerprint-reader-sensor-module-optical/?srsltid=AfmBOoq2IUprS8MVhONDDppy6MYp9jdws_0AJJ3jnk1tCjE7ZTJjCIAS), [3](https://embedgyan.wordpress.com/2020/06/21/guide-to-fingerprint-sensor-module-with-arduino-fpm10a/), [4](https://dronebridge.gitbook.io/docs/dronebridge-for-raspberry-pi/getting-started), [5](https://www.robotechbd.com/product/sensors/fpm10a-fingerprint-reader-module-3-3v-5v/?srsltid=AfmBOor0OAfLEf3pAxrEbpz1neXPG8k-dPymfhFZ0llotH9e4It2jZFJ)]
2. Rust Configuration
Add `rppal` to your `Cargo.toml` dependencies: [[1](https://crates.io/crates/rppal), [2](https://cdn.awsli.com.br/945/945993/arquivos/FPM10A-DY50.pdf)]
toml
```
[dependencies]
rppal = "0.22"
```
Use code with caution.
Because the FPM10A defaults to a baud rate of **57600**, configure your `Uart` peripheral settings using `rppal::uart::Uart`: [[1](https://docs.rs/rppal/latest/rppal/uart/struct.Uart.html), [2](https://cdn.awsli.com.br/945/945993/arquivos/FPM10A-DY50.pdf), [3](https://doc.grablo.co/en/docs/user-manuals/i-o-device/as608-fpm10a-fingerprint-sensor/)]
rust
```
use rppal::uart::{Uart, Parity};
use std::time::Duration;
fn main() -> Result<(), Box<dyn std::error::Error>> {
// 57600 is the default FPM10A baud rate.
let mut uart = Uart::new(57600, Parity::None, 8, 1)?;
// Set read timeouts to prevent blocking indefinitely
uart.set_read_mode(1, Duration::from_millis(500))?;
// Send your command packets here (e.g., Handshake, Get Image, Search)
Ok(())
}
```
Use code with caution.
3. FPM10A Protocol Basics
Because the FPM10A is a slave device, you must send command packets and parse the returned packets. A standard command follows this structure: [[1](https://www.youtube.com/watch?v=m6Vm32fOkUI), [2](https://www.aliexpress.com/item/1005009144306444.html)]
1. **Header**: `0xEF, 0x01`
2. **Address**: `0xFF, 0xFF, 0xFF, 0xFF` (Default address)
3. **Package Identifier**: `0x01` (Command Packet)
4. **Package Length**: 2 bytes (Length = Length of remaining data + 2 for Checksum)
5. **Instruction Code**: (e.g., `0x01` for Handshake, `0x0C` for Store)
6. **Parameters**: Variable
7. **Checksum**: 2 bytes (Sum of Package Identifier, Length, Instruction Code, and Parameters) [[1](https://forum.arduino.cc/t/fpm10a-library-problems/491794), [2](https://www.robotechbd.com/product/sensors/fpm10a-fingerprint-reader-module-3-3v-5v/?srsltid=AfmBOor0OAfLEf3pAxrEbpz1neXPG8k-dPymfhFZ0llotH9e4It2jZFJ)]
A handshake command would look like this:
\(\text{Header (2)} + \text{Address (4)} + \text{ID (1)} + \text{Length (2)} + \text{Cmd (1)} + \text{Checksum (2)}\) [[1](https://www.scribd.com/document/418930331/FPM10-R305-Fingerprint-Sensor-Interfacin)]
Would you like to see a code implementation for a specific FPM10A command, or do you need help setting up your **Raspberry Pi OS UART configuration** (using `raspi-config`) before writing the code? [[1](https://crates.io/crates/rppal)]
Here is a complete, production-ready Rust example using `rppal` to **enroll (program)** a fingerprint and then **search (check)** for a match.
Implementation Strategy
The FPM10A requires a multi-step sequence for both operations:
- **Enrollment:** Capture image 1 → Generate character file 1 → Capture image 2 → Generate character file 2 → Combine templates → Store template to a specific ID slot.
- **Searching:** Capture image → Generate character file → Search the database flash memory for a match.
Complete Rust Code
rust
```
use rppal::uart::{Parity, Uart};
use std::error::Error;
use std::thread::sleep;
use std::time::Duration;
// --- FPM10A Configuration Constants ---
const DEFAULT_ADDR: [u8; 4] = [0xFF, 0xFF, 0xFF, 0xFF];
const PACKET_COMMAND: u8 = 0x01;
// --- FPM10A Instruction Codes ---
const CMD_GETIMAGE: u8 = 0x01;
const CMD_IMAGE2TZ: u8 = 0x02;
const CMD_REGMODEL: u8 = 0x05;
const CMD_STORE: u8 = 0x06;
const CMD_SEARCH: u8 = 0x04;
// --- Error Helper ---
fn handle_confirmation_code(code: u8) -> Result<(), String> {
match code {
0x00 => Ok(()),
0x01 => Err("Error receiving packet".to_string()),
0x02 => Err("No finger on sensor".to_string()),
0x03 => Err("Failed to enroll finger".to_string()),
0x0a => Err("Failed to combine character files".to_string()),
0x0b => Err("Addressing ID is out of range".to_string()),
0x1d => Err("Failed to operate flash memory".to_string()),
_ => Err(format!("Unknown confirmation error: 0x{:02X}", code)),
}
}
// --- Protocol Packet Builder and Parser ---
fn send_command(uart: &mut Uart, cmd: u8, params: &[u8]) -> Result<Vec<u8>, Box<dyn Error>> {
let length = (params.len() + 3) as u16; // length = len(cmd + params + checksum)
let len_high = (length >> 8) as u8;
let len_low = (length & 0xFF) as u8;
// Calculate Checksum: sum of packet identifier, length bytes, command, and params
let mut checksum: u32 = PACKET_COMMAND as u32 + len_high as u32 + len_low as u32 + cmd as u32;
for &p in params {
checksum += p as u32;
}
let sum_high = ((checksum >> 8) & 0xFF) as u8;
let sum_low = (checksum & 0xFF) as u8;
// Build the frame
let mut packet = vec![0xEF, 0x01]; // Header
packet.extend_from_slice(&DEFAULT_ADDR);
packet.push(PACKET_COMMAND);
packet.push(len_high);
packet.push(len_low);
packet.push(cmd);
packet.extend_from_slice(params);
packet.push(sum_high);
packet.push(sum_low);
// Flush and write
uart.flush(rppal::uart::Queue::Both)?;
uart.write(&packet)?;
// Read Response Frame Header (minimum response size is 12 bytes)
let mut response = vec![0u8; 12 + params.len()];
let bytes_read = uart.read(&mut response)?;
if bytes_read < 12 || response[0] != 0xEF || response[1] != 0x01 {
return Err("Invalid response packet header from sensor".into());
}
Ok(response)
}
// Helper to poll for a finger until one is placed on the glass
fn wait_for_finger(uart: &mut Uart, prompt: &str) -> Result<(), Box<dyn Error>> {
println!("{}", prompt);
loop {
if let Ok(resp) = send_command(uart, CMD_GETIMAGE, &[]) {
if resp[9] == 0x00 { // Confirmation code is at index 9
return Ok(());
}
}
sleep(Duration::from_millis(200));
}
}
/// Enrolls a new finger into the specified ID slot (e.g., 0 to 162)
fn enroll_finger(uart: &mut Uart, id_slot: u16) -> Result<(), Box<dyn Error>> {
// 1. First image capture
wait_for_finger(uart, "Place your finger on the sensor...")?;
send_command(uart, CMD_IMAGE2TZ, &[0x01])?; // Convert to character file buffer 1
println!("First scan successful. Remove finger.");
sleep(Duration::from_secs(2));
// 2. Second image capture
wait_for_finger(uart, "Place the SAME finger on the sensor again...")?;
send_command(uart, CMD_IMAGE2TZ, &[0x02])?; // Convert to character file buffer 2
println!("Second scan successful.");
// 3. Combine buffers 1 and 2 into a reference model template
println!("Creating model template...");
let resp = send_command(uart, CMD_REGMODEL, &[])?;
handle_confirmation_code(resp[9])?;
// 4. Store template in specified ID slot
let id_high = (id_slot >> 8) as u8;
let id_low = (id_slot & 0xFF) as u8;
println!("Saving template to ID slot {}...", id_slot);
let resp = send_command(uart, CMD_STORE, &[0x01, id_high, id_low])?;
handle_confirmation_code(resp[9])?;
println!("Fingerprint successfully programmed to ID #{}!", id_slot);
Ok(())
}
/// Checks the sensor for a valid live finger and searches the internal database
fn identify_finger(uart: &mut Uart) -> Result<(), Box<dyn Error>> {
wait_for_finger(uart, "Place finger on the sensor to authenticate...")?;
// Convert live image to character buffer 1
send_command(uart, CMD_IMAGE2TZ, &[0x01])?;
// Search database using buffer 1 (Params: buffer id, start index high/low, count high/low)
println!("Searching fingerprint database...");
let resp = send_command(uart, CMD_SEARCH, &[0x01, 0x00, 0x00, 0x00, 0xA3])?;
match handle_confirmation_code(resp[9]) {
Ok(_) => {
// Index 10-11: Found Page ID, Index 12-13: Match Score
let match_id = ((resp[10] as u16) << 8) | (resp[11] as u16);
let score = ((resp[12] as u16) << 8) | (resp[13] as u16);
println!("✅ ACCESS GRANTED! Found Match ID: #{} with score: {}", match_id, score);
}
Err(_) => {
println!("❌ ACCESS DENIED! Fingerprint not recognized.");
}
}
Ok(())
}
fn main() -> Result<(), Box<dyn Error>> {
// Open system UART (typically /dev/ttyS0 or /dev/ttyAMA0 on Raspberry Pi)
let mut uart = Uart::new(57600, Parity::None, 8, 1)?;
uart.set_read_mode(1, Duration::from_millis(1000))?;
// Step 1: Program a fingerprint into slot #1
enroll_finger(&mut uart, 1)?;
sleep(Duration::from_secs(2));
// Step 2: Loop checking for validation
loop {
if let Err(e) = identify_finger(&mut uart) {
println!("Error during processing: {}. Retrying...", e);
}
sleep(Duration::from_secs(3));
}
}
```
Use code with caution.
Visual Map of the Search Packet Response
When decoding the response of the `CMD_SEARCH` (`0x04`) function payload, keep these indices in mind when working with the byte array:
text
```
Response Byte Index:
[0, 1] -> Header (0xEF, 0x01)
[2..5] -> Device Address
[6] -> Packet Identifier
[7, 8] -> Packet Length
[9] -> Confirmation Code (0x00 = Match Found)
[10, 11] -> Found ID Slot (High byte, Low byte)
[12, 13] -> Match Score (High byte, Low byte)
```
Use code with caution.
Here is the code to delete fingerprints from the FPM10A's internal database.
The sensor uses the **DeleChar** instruction code (`0x0C`). It requires you to pass the starting memory slot ID and the number of consecutive templates you want to clear out.
Rust Implementation For Deletion
Add this function to your existing codebase. It includes two common use-case implementations: deleting a single target ID slot or wiping a sequential block of memory.
rust
```
// --- Add this to your Instruction Codes constants ---
const CMD_DELECHAR: u8 = 0x0C;
/// Deletes a specific number of fingerprints starting from a defined page ID slot.
///
/// * `uart` - Mutable reference to the initialized Rppal Uart peripheral.
/// * `start_id` - The memory slot index where deletion begins (e.g., 1).
/// * `count` - How many consecutive templates to wipe (use 1 to clear only the start_id).
fn delete_fingerprints(uart: &mut Uart, start_id: u16, count: u16) -> Result<(), Box<dyn Error>> {
let start_high = (start_id >> 8) as u8;
let start_low = (start_id & 0xFF) as u8;
let count_high = (count >> 8) as u8;
let count_low = (count & 0xFF) as u8;
println!("Attempting to delete {} slots starting from ID #{}...", count, start_id);
// Params array format required by FPM10A: [PageID High, PageID Low, Number of templates High, Number of templates Low]
let params = [start_high, start_low, count_high, count_low];
// Send command and wait for response packet
let resp = send_command(uart, CMD_DELECHAR, &params)?;
// Byte index 9 holds the confirmation status code
match handle_confirmation_code(resp[9]) {
Ok(_) => {
println!("🗑️ Successfully deleted {} template(s) from memory!", count);
Ok(())
}
Err(e) => {
// Standard sensor error 0x15 means it failed to clear the slots (e.g., already empty)
if resp[9] == 0x15 {
return Err("Failed to delete templates. The requested slots might already be empty.".into());
}
Err(format!("Deletion failed: {}", e).into())
}
}
}
```
Use code with caution.
How to use it in `main()`
You can call the function depending on whether you want to delete a specific user fingerprint or completely purge a range of data:
rust
```
fn main() -> Result<(), Box<dyn Error>> {
let mut uart = Uart::new(57600, Parity::None, 8, 1)?;
uart.set_read_mode(1, Duration::from_millis(1000))?;
// Use Case 1: Delete exactly one fingerprint stored at ID slot #5
if let Err(e) = delete_fingerprints(&mut uart, 5, 1) {
println!("Error: {}", e);
}
// Use Case 2: Bulk delete slots 10 through 29 (20 slots total)
// if let Err(e) = delete_fingerprints(&mut uart, 10, 20) {
// println!("Error: {}", e);
// }
Ok(())
}
```
Here is the code to **wipe the entire flash database** and to **query the sensor's index table** to see exactly which slots are open and available.
1. New Command Constants
Add these additional instruction codes to your global definitions: [[1](https://forum.arduino.cc/t/how-to-call-functions-from-a-library/1184306)]
rust
```
const CMD_EMPTY: u8 = 0x0D; // Empties the entire template flash library
const CMD_READINDEXTABLE: u8 = 0x1F; // Reads the database occupancy index table
```
Use code with caution.
2. Rust Code Implementation
The `CMD_READINDEXTABLE` function returns the occupancy of the database as a bitmask array. It takes a single index page identifier (typically `0x00` or `0x01` depending on whether your sensor holds more than 256 templates). Each byte returned represents 8 slots. **A bit set to `1` means the slot is full; a bit set to `0` means the slot is free.** [[1](https://www.freecodecamp.org/news/how-bloom-filters-work-build-one-from-scratch-python/), [2](https://www.signalhk.com/pdf/PDFIDW8F02ZL1.pdf)]
rust
```
/// Erases every single fingerprint profile stored in the flash module database.
fn empty_database(uart: &mut Uart) -> Result<(), Box<dyn Error>> {
println!("⚠️ WARNING: Requesting complete fingerprint database format...");
// CMD_EMPTY takes no extra parameters
let resp = send_command(uart, CMD_EMPTY, &[])?;
match handle_confirmation_code(resp[9]) {
Ok(_) => {
println!("🧹 Success! The entire fingerprint database has been completely emptied.");
Ok(())
}
Err(e) => Err(format!("Formatting failed: {}", e).into()),
}
}
/// Queries the internal memory index map and prints out all unallocated/free slot IDs.
fn print_free_slots(uart: &mut Uart) -> Result<(), Box<dyn Error>> {
println!("🔍 Fetching memory allocation table...");
// We request Index Page 0 (covering slots 0 to 255)
// Parameter 0x00 instructs the sensor to return the map of the first 256 IDs.
let resp = send_command(uart, CMD_READINDEXTABLE, &[0x00])?;
handle_confirmation_code(resp[9])?;
// The data packet containing the index starts at byte index 10 in our response frame.
// There are 32 bytes returned in total (32 bytes * 8 bits = 256 slots evaluated).
let bitmask_bytes = &resp[10..42];
let mut free_slots_count = 0;
print!("Free Slot IDs: ");
for (byte_idx, &byte) in bitmask_bytes.iter().enumerate() {
for bit_idx in 0..8 {
let slot_id = (byte_idx * 8) + bit_idx;
// Check if the bit at the current index position is 0 (Unallocated)
let is_allocated = (byte >> bit_idx) & 0x01;
if is_allocated == 0 {
print!("{} ", slot_id);
free_slots_count += 1;
}
}
}
println!("\n📊 Summary: Found {} total vacant slots out of the first 256.", free_slots_count);
Ok(())
}
```
Use code with caution.
3. Usage inside `main()`
You can execute these actions within your `main` runtime thread depending on what operation sequence you require:
rust
```
fn main() -> Result<(), Box<dyn Error>> {
let mut uart = Uart::new(57600, Parity::None, 8, 1)?;
uart.set_read_mode(1, Duration::from_millis(1000))?;
// Action 1: Print available memory slots before modification
print_free_slots(&mut uart)?;
// Action 2: Factory reset / wipe everything (Uncomment to execute)
// empty_database(&mut uart)?;
Ok(())
}
```
Use code with caution.
## References
- [Sparkfun Datasheet](https://cdn.sparkfun.com/assets/b/6/2/5/8/Fingerprint_sensor_module_User_Manual_v1.0_2019-1-22--.pdf)

View File

@@ -0,0 +1,27 @@
## Suppliers
- [Mouser](https://www.mouser.com/)
- [Cloom Custom Wiring Harnesses](https://customwiringloom.com/)
## Soldering
- [Soldering Perfboard](https://www.instructables.com/Using-Perfboard/)
## Connectors & Cables
- [Fitting Duport Connectors](https://www.instructables.com/Fitting-Dupont-Connectors/)
- IDC stands for Insulation Displacement Connector
## Electronics Learning Material
- [Kirchoffs Circuit Laws](https://en.wikipedia.org/wiki/Kirchhoff's_circuit_laws)
- [LED Series Resistor Calculator | DigiKey Electronics](https://www.digikey.com/en/resources/conversion-calculators/conversion-calculator-led-series-resistor)
- [Types of Switches](https://www.electricaltechnology.org/2014/11/types-of-switches-electrical.html#relay-as-a-switch)
## Breadboarding
- [How to attach an IDC connector to a breadboard](https://www.youtube.com/watch?v=b1_eRYr-t-I)
- [Using Arduino with Node-RED to create a Simple Web Dashboard - YouTube](https://www.youtube.com/watch?v=ryEFNy1E_LU)
- [Interfacing CD74HC4067 16-Channel Multiplexer with Arduino](https://electropeak.com/learn/interfacing-cd74hc4067-16-channel-analog-digital-multiplexer-with-arduino)
- [MegaMUX - 32 Channel Multiplexer Breakout - Share Project - PCBWay](https://www.pcbway.com/project/shareproject/MegaMUX___32_Channel_Multiplexer_Breakout.html)

74
Notes/Electronics/I2C.md Normal file
View File

@@ -0,0 +1,74 @@
---
tags:
- resource
created: 2026-03-08 20:22
---
## Summary
Notes on the I2C communication protocol.
## Notes
### Using Cat6 Cable
For the best results running I2C signals over Cat6 cable, use a **shielded Cat6 cable** and pair each signal line (SDA/SCL) with a dedicated Ground (GND) wire in the same twisted pair. Lower your clock speed (e.g., to \(100kHz) or lower), and use active terminators or bus extenders if the distance exceeds 2 meters.
Follow this configuration, optimize your signals, and use active buffers for long runs to ensure reliability.
1. Pinout and Wiring Configuration
Use one of the standard twisted-pair configurations to isolate the data lines from cross-talk and noise.
- **Pair 1:** SDA + Ground
- **Pair 2:** SCL + Ground
- **Pair 3:** \(V_{DD}\) (Power) + Ground
- **Pair 4:** Unused (Can be connected to Ground for extra shielding)
_Why this works:_ By twisting SDA and SCL with their respective Ground returns, you create a pseudo-differential pair. This guarantees noise immunity from external electromagnetic interference (EMI).
2. Signal Optimization
Because I2C was originally designed for short, PCB-level distances (<1m), using a cable introduces bus capacitance, which degrades the rising edge of your signal.
- **Reduce the Clock Speed:** Drop your I2C frequency from (400kHz to 100kHz) or (10kHz) to prevent communication dropouts.
- **Adjust Pull-Up Resistors:** Standard I2C requires pull-up resistors. Over a long cable, the higher capacitance slows down data transitions. You may need to use stronger pull-up resistors (lower resistance value, down to (approx. 1 KΩ - 2.2KΩ) depending on your bus capacitance.
- **Add Series Resistors:** Add a small resistor (100Ω) to the SDA and SCL lines on both ends of the cable to dampen signal reflections.
3. Bus Extenders for Extended Distances
If your distance exceeds 2 to 3 meters, the bus capacitance of Cat6 (typically 50pF to 52pF per meter) will exceed the I2C standard of (400pF).
For distances between 5 and 50 meters, utilize specific hardware rather than running raw I2C:
- **LTC4311:** An active terminator IC that actively pulls up and terminates the signal.
- **PCA9615 / PCA9600:** Differential I2C bus extenders that convert the signal to a differential format. This allows I2C signals to safely travel up to 100 meters.
For tips on how to correctly terminate wires inside a standard RJ-45 plug to build your extension cables:
### 4 wire
Using standard I2C over a long 4-wire twisted pair cable (like Ethernet) causes signal degradation, capacitance issues, and crosstalk. For reliable operation, use differential I2C extenders (e.g., [PCA9615 I2C Buffer](https://www.nxp.com/docs/en/data-sheet/PCA9615.pdf)). Otherwise, map standard I2C strictly as: **Pair 1** (SDA + Power/GND) and **Pair 2** (SCL + Power/GND).
Standard I2C uses non-differential, single-ended signals. Twisting the wrong wires together creates significant crosstalk and capacitive coupling. To minimize signal corruption:
- **Never twist SDA and SCL together:** Twisting your two data lines together is the fastest way to cause I2C communication failures.
- **Twist with a Return Path:** Twist the **SCL** line with a Ground (**GND**) wire, and twist the **SDA** line with a Voltage (**\(V_{CC}\)**) wire.
- **Reduce Clock Speed:** Drop the I2C clock frequency (e.g., down to \(100\text{ kHz}\) or lower) to compensate for cable capacitance and avoid signal reflections.
#### Extending I2C Long Distances (Differential Signaling)
If you need to run your I2C bus over long distances (beyond a few feet), standard I2C will fail. You should convert the single-ended I2C signal into a differential signal using a buffer IC like the **PCA9615**.
- **How it works:** It takes standard I2C and translates it into 4 differential lines.
- **Wiring:** The 4-wire twisted pair is mapped as two separate differential pairs:
1. `SCL_A` and `SCL_B` (Clock Pair)
2. `SDA_A` and `SDA_B` (Data Pair)
- **Benefit:** Differential signaling cancels out electromagnetic interference, allowing you to run I2C reliably across \(30\text{ meters}\) (\(100\text{ feet}\)) or more.
## References
- [Differential signalling with I2C](https://hackaday.com/2017/03/31/an-introduction-to-differential-i%C2%B2c/)
- [AdaFruit I2C Active Terminator](https://cdn-learn.adafruit.com/downloads/pdf/adafruit-ltc4311-i2c-extender-active-terminator.pdf)
- [How I2C Works](https://learn.sparkfun.com/tutorials/i2c/all)
- [Differential I2C](duction-to-differential-i²c/)
- [[Differential Signalling]]
- [PCA9615](https://www.nxp.com/docs/en/data-sheet/PCA9615.pdf)

View File

@@ -0,0 +1,4 @@
# KiCad
Documentation - [https://kicad.github.io/](https://kicad.github.io/)

View File

@@ -0,0 +1,14 @@
---
tags:
- resource
created: 2026-07-08 17:24
---
## Summary
Each board contains four identical circuits using BSS138 MOSFETs. The ground pins are not connected to the circuit in any way and are not needed for it to function. A low level output is sinked through the corresponding input signal (MCU GPIO pin). A high level output is sourced through the corresponding Vin pin (LV or HV) through a 10k resistor. If an input is left floating, the corresponding output will go high. If using unidirectionally you can put a strong pull down resistor (1k) on the input side. A pull down on the output side will cause malfunction.
## References
![[level_shifter_circuit_diagram.jpg.jpg]]
![[level_shifter_board_pic.jpg]]

View File

@@ -0,0 +1,4 @@
# Magnetic Lock
[https://forums.raspberrypi.com/viewtopic.php?t=268354](https://forums.raspberrypi.com/viewtopic.php?t=268354)

6
Notes/Electronics/NFC.md Normal file
View File

@@ -0,0 +1,6 @@
NFC is different from RFID. Its way for two devices to communicate when in close proximity. NFC readers can also read RFID cards.
- [PN532 NFC/RFID card](https://www.adafruit.com/product/364)
- [GitHub - adafruit/Adafruit-PN532: Arduino library for SPI and I2C access to the PN532 RFID/Near Field Communication chip](https://github.com/adafruit/Adafruit-PN532/tree/master)

View File

@@ -0,0 +1,22 @@
---
tags:
- resource
created: 2025-07-06 23:38
---
## Summary
The PCA 9685 chip provides 16 channels of 12 bit PWM with a configurable PWM frequency for servo motor or LED control.
## Notes
Default I²C address for the PCA9685 board is 0x40.
## References
- https://crates.io/crates/pwm-pca9685 - supports setting address and
- [`pca9685_rppal`](https://crates.io/crates/pca9685-rppal) - only supports default address of 0x40 and hides the I2C interface!
- https://docs.rs/pca9685-rppal/0.1.0/pca9685_rppal/index.html
- https://github.com/jlyonsmith/pca9685-rppal
- https://www.adafruit.com/product/815
- https://cdn-shop.adafruit.com/datasheets/PCA9685.pdf
- https://learn.adafruit.com/16-channel-pwm-servo-driver/hooking-it-up
- https://blog.eldruin.com/pca9685-pwm-led-servo-controller-driver-in-rust

View File

@@ -0,0 +1,20 @@
---
tags:
- resource
created: 2025-07-20 12:21
---
## Summary
Resistors that change resistance based on the amount of light hitting them.
## Notes
Typically require an amplification circuit to interface to RPi.
## References
- [Photoresistors GL55-series comparison](https://ednieuw.home.xs4all.nl/Woordklok/LDR/GL55xxLDRs.html)
- https://www.handsontec.com/dataspecs/sensor/GL55-LDR.pdf
- [Getting Started With KY-037 Sound Sensor &amp; Raspberry Pi (P1) : 3 Steps - Instructables](https://www.instructables.com/Getting-Started-With-KY-037-Sound-Sensor-Raspberry)
![[GL55xx.pdf]]

View File

@@ -0,0 +1,12 @@
# Power Supplies
Power supply requirements for different boards.
## Arduino
[What power supply can I use with my Arduino board?](https://support.arduino.cc/hc/en-us/articles/360018922259-What-power-supply-can-I-use-with-my-Arduino-board)
## Raspberry Pi
[How to Power a Raspberry Pi: Pro Tips for Every Use](https://raspberrytips.com/how-to-power-a-raspberry-pi/)

View File

@@ -0,0 +1,16 @@
---
tags:
- resource
created: 2025-07-06 23:42
---
## Summary
RGB LED's come in two flavors, common anode and common cathode.
## Notes
## References
- https://www.build-electronic-circuits.com/rgb-led/

View File

@@ -0,0 +1,27 @@
---
tags:
- resource
created: 2026-05-29 18:26
---
## Summary
The RJ9 connector (often referred to as RJ10 or RJ22) is a4-position, 4-conductor (4P4C) modular plug standard used to connect telephone handsets to phone bases.
| Pin Number | Standard Handset Color | Description |
| ---------- | ---------------------- | ---------------------------- |
| **Pin 1** | Blue / White | Handset Receiver (RX) |
| **Pin 2** | Yellow / Black | Receiver / Microphone Ground |
| **Pin 3** | Green / Red | Microphone (TX) Ground |
| **Pin 4** | Red / Green | Microphone Power / TX |
#### Pinout Orientation
When looking at the gold pins of the male plug facing you (with the locking clip facing **down**), Pin 1 is on your **far left** and Pin 4 is on your **far right**. [[1](https://www.youtube.com/watch?v=miMuRXJVNYI&t=3)]
## Notes
## References

View File

@@ -0,0 +1,19 @@
---
tags:
- resource
created: 2025-05-01 15:11
---
## Summary
Raspberry Pi only supports a limited set of ethernet dongles. See the list. You must use Raspberry Pi OS and not Ubuntu/Debian.
The two that you can get on Amazon are:
- [TP-Link UE300](https://www.amazon.com/gp/product/B00YUU3KC6?smid=ATVPDKIKX0DER) - USB 3.0. Dongle is really short and hard to position, but it works.
- [TRENDNet TU2-ET100](https://www.amazon.com/TRENDnet-Ethernet-Network-Compatible-TU2-ET100/dp/B00007IFED) - USB 2.0. Has a long ship time.
## References
- https://elinux.org/RPi_USB_Ethernet_adapters
- https://www.trendnet.com/products/product-detail?prod=290_TU2-ET100

View File

@@ -0,0 +1,57 @@
![Image.png](Resources/Electronics/Raspberry%20Pi%20GPIO%20Expanders.assets/Image.png)
- [The MegaMUX project shows how to multiplex 5 GPIO lines into 32 read/write channels](https://www.instructables.com/MegaMUX-32-Channel-Multiplexer-Tutorial/)
- [You can order the PCB board from PCBWay](https://www.pcbway.com/project/shareproject/MegaMUX___32_Channel_Multiplexer_Breakout.html?upId=0)
![Raspberry-Pi-GPIO-Layout-Model-B-Plus-rotated-2700x900.png](Raspberry-Pi-GPIO-Layout-Model-B-Plus-rotated-2700x900.png)
[](https://www.raspberrypi-spy.co.uk/2012/06/simple-guide-to-the-rpi-gpio-header-and-pins/)
## Small Batch PCB Manufacturers
- [OSHPark](https://oshpark.com/)
- [PCBWay](https://www.pcbway.com/project/)
- [PCBWay Gerber Viewer](https://www.pcbway.com/project/OnlineGerberViewer.html)
- [PCBWay 3D Model Viewer](https://www.pcbway.com/project/Online3DViewer.html)
- [How to order on PCBWay](https://www.youtube.com/watch?v=CpbV6PjRFWw)
- [CircuitMaker](https://circuitmaker.com/)
- [4PCB](https://www.4pcb.com/)
- [Technotronix](https://www.technotronix.us/)
## PCB Design Software
- [List of PCB design software](https://www.electroschematics.com/pcb-design-software/)
- [KiCad](https://www.kicad.org)
- [KiCad tutorial](https://www.youtube.com/watch?v=3FGNw28xBr0)
- [Getting Started in KiCad](file:///Applications/KiCad/KiCad.app/Contents/SharedSupport/help/en/getting_started_in_kicad.html)
- [KiCad documentation](https://docs.kicad.org/)
- [Top 15 Mistakes When Designing PCB](https://www.youtube.com/watch?v=hkSad4n76Lc)
- [How to rename a KiCad project](https://forum.kicad.info/t/how-to-rename-a-kicad-project/33194)
## Multiplexors
- [TI CD405xB CMOS Spec Sheet](https://www.ti.com/lit/ds/symlink/cd4051b.pdf)
## Dupont Connectors
- [How to find Duport connectors on DigiKey](https://forum.digikey.com/t/dupont-connectors-and-how-to-find-them-from-digi-key/3315)
## Ribbon Cables
- [Making flat ribbon cables at home](https://www.youtube.com/watch?v=40oXq8tCrBA)
- [Ribbon cable types](https://www.wiringo.com/ribbon-cable-3.html)
## References
- [Flat Ribbon Cables](https://www.digikey.com/en/products/filter/flat-ribbon-cables/472?s=N4IgjCBcoOwBxVAYygMwIYBsDOBTANCAPZQDa4AbAMwCsMFIAuoQA4AuUIAymwE4CWAOwDmIAL6EqYBtBApIGHAWJkQ1AJxwGhAExwwAFjAAGJqw6RufIaLESQNRCBZQwrF5B007QA)
- [AWG23-08/G-1/300 grey ribbon cable](https://www.digikey.com/en/products/detail/assmann-wsw-components/AWG28-08-G-1-300/2391671)
- [Expand Raspberry Pi GPIOs with I2C Port Expander](https://tutorials-raspberrypi.com/expand-raspberry-pi-gpios-with-i2c-port-expander/)
- [10 Best GPIO Extension Board For Raspberry Pi](https://wonderfulengineering.com/10-best-gpio-extension-board-raspberry-pi/)
- [Controlling 32 lights with the Raspberry Pi - Raspberry Pi Forums](https://forums.raspberrypi.com/viewtopic.php?t=77560)
- [rppal_mcp23s17 - Rust](https://docs.rs/rppal-mcp23s17/latest/rppal_mcp23s17)
- [GitHub - quartiq/mcp230xx: MCP23017/MCP23008 a 16-Bit/8-Bit I2C I/O Expander with I2C Interface](https://github.com/quartiq/mcp230xx)
- [Using GPIO Expander MCP23017 With Arduino (Get up to 128 GPIOs)](https://www.makerguides.com/using-gpio-expander-mcp23017-with-arduino)
- [How to use the MCP23017 Port Expander with the Raspberry Pi | The Pi Hut](https://thepihut.com/blogs/raspberry-pi-tutorials/how-to-use-the-mcp23017-port-expander)

View File

@@ -0,0 +1,4 @@
# Raspberry Pi HATS
[Best Raspberry Pi HATs 2023: Expansion Boards for Every Project](https://www.tomshardware.com/best-picks/best-raspberry-pi-hats)

View File

@@ -0,0 +1,14 @@
## References
- [Setup and example](https://www.freecodecamp.org/news/embedded-rust-programming-on-raspberry-pi-zero-w/)
- [Adding Ethernet to a Pi Zero - Raspberry Pi Spy](https://www.raspberrypi-spy.co.uk/2020/05/adding-ethernet-to-a-pi-zero/)
- https://www.mouser.com/ProductDetail/Raspberry-Pi/SC0065?qs=rQFj71Wb1eX99SHol2bUwA%3D%3D
- https://www.makeuseof.com/troubleshoot-raspberry-pi-leds-solid-flashing-meaning
- [https://bws428.github.io/assets/images/pi-zero-w-gpio-pinout.png](https://bws428.github.io/assets/images/pi-zero-w-gpio-pinout.png)
- [https://www.electrorules.com/wp-content/uploads/2022/01/R-Pi-Zero-Pinout.jpg](https://www.electrorules.com/wp-content/uploads/2022/01/R-Pi-Zero-Pinout.jpg)
- [https://raspberrytips.com/raspberry-pi-gpio-pinout/](https://raspberrytips.com/raspberry-pi-gpio-pinout/)
- [https://docs.golemparts.com/rppal/0.17.1/rppal/spi/](https://docs.golemparts.com/rppal/0.17.1/rppal/spi/)
- [Order in bulk from DigiKey](https://www.digikey.com/en/products/detail/raspberry-pi/SC0020/18150025)
- [Raspberry Pi Hardware](https://www.raspberrypi.com/documentation/computers/raspberry-pi.html)
- [50 of the most important Raspberry Pi Sensors and Components](https://tutorials-raspberrypi.com/raspberry-pi-sensors-overview-50-important-components/#other)

View File

@@ -0,0 +1,32 @@
---
tags:
- resource
created: 2025-01-16 13:05
---
## Summary
Information about the Raspberry Pi Pico 2.
## Abstract
There is a WizNet version that includes hardwired ethernet.
You can use Rust to develop Raspberry Pico applications.
The Pico does not run at full O/S. It is more closely related to an Arduino than an full
## References
- https://github.com/WIZnet-ioNIC/WIZnet-PICO-C/tree/main
- https://docs.wiznet.io/Product/Open-Source-Hardware/wiznet_ethernet_hat
- https://peppe8o.com/raspberry-pi-pico-ethernet-port-adding-the-wiznet-ethernet-hat
- https://eshop.wiznet.io/shop/module/w5100s-evb-pico
- [Running Rust Programs on Raspberry Pi Pico Alex Wilson](https://www.alexdwilson.dev/learning-in-public/running-rust-code-on-raspberry-pi-pico)
- https://github.com/rp-rs
- https://www.etechnophiles.com/raspberry-pi-pico-2-pinout-specs/
- https://www.raspberrypi.com/news/how-to-add-ethernet-to-raspberry-pi-pico/
- [Rust & Raspberry Pi Pico (Blink)](https://www.fullstacklabs.co/blog/rust-raspberry-pi-pico-blink)
- https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf
- https://github.com/rp-rs/rp-hal
- https://github.com/newAM/w5500-rs
- https://github.com/newAM/ambientsensor-rs/tree/main

View File

@@ -0,0 +1,37 @@
## One Sided Two Layer Board
1. Remove all components and measure them
2. Sand away the solder mask from PCB, both sides
3. Add all components, values, designators and packages to KiCad schema editor
4. Import all components to layout editor; hit F8 to keep syncing with the schema editor
5. Take photo of front/back of PCB
6. Flip back image to align with front when imported
7. Add images of front PCB in KiCad on user layer
8. Double click image and set scale factor to actual PCB height divided by original height of imported photo
9. Double click to lock image
10. Select the back layer of PCB
11. Import back photo an scale also
12. Align front and back images by hiding/showing front layer
13. Place all components using the front image as a guide
14. Switch to showing components in outline mode to help see traces
15. Hold Control key to select pads, switch to schematic editor and the connections will be highlighted; join them.
17. Keep traces same width; use Q key while routing a trace to change width, V to add a via
18. Mark and join all ground traces using a Ground symbol; add VCC markers as needed
19. Right click unused pads and select footprint editor; select unused pads and remove them
20. In schematic editor, select any unused pins and delete them
21. Continue adding all components until done
22. Use image outline to set a cut line for the board
23. Add a thermal zone assigned to ground and set thermal relief gap to match image; hit B to fill in zone
24. Add thermal via's underneath chips as needed
25. Trace connectors on underside of PCB
26. Note you can change trace thickness as you draw
27. Switch to other side/trace when routing using V in layout editor
## Notes
- Diodes have A for anode (positive side) and K for cathode (negative/ground side).
## References
- [Reverse Engineer PCB With KiCAD 7](https://www.youtube.com/watch?v=EUdbxKgsFl8)
- [PCBWay - PCB Prototype & Fabrication Manufacturer](https://www.pcbway.com)
- [KiCad 6: Ground Plane (Filled Zone)](https://www.youtube.com/watch?v=8NV5cuPbVm0&t=6s)
- [KiCad 6: Fix Silkscreen Clipped by Solder Mask](https://www.youtube.com/watch?v=dgQZIDaHSZU)

View File

@@ -0,0 +1,25 @@
---
tags:
- resource
created: 2025-11-06 17:37
---
## Summary
Notes on the use of the [rppal]() crate.
## Notes
### GPIO Pull Up/Pull Down Bias
The `rppal::gpio::InputPin::set_bias` method is used to configure the Raspberry Pi's **built-in pull-up or pull-down resistors** on an input pin. 
You should use `set_bias` when interfacing with digital input sensors or switches that do not have their own external pull-up/pull-down resistors. These internal resistors ensure the input pin has a defined logic level (either high or low) when the external component is disconnected or floating, preventing erratic readings caused by electrical noise. 
| When to Use | Typical Connection | |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- |
| **`Bias::PullUp`** | When the input is connected to ground (GND) to signal a "low" state (e.g., a button connecting the pin to GND). The resistor pulls the pin voltage up to 3.3V by default. | One side of a button to the GPIO pin, the other side to GND. |
| **`Bias::PullDown`** | When the input is connected to 3.3V to signal a "high" state (e.g., a sensor outputting 3.3V). The resistor pulls the pin voltage down to GND by default. | One side of a button to the GPIO pin, the other side to 3.3V. |
| **`Bias::Off`** | When the external circuit already provides a defined logic level (e.g., an active sensor with a strong output signal, or an external pull-up/pull-down resistor is used). | Active sensor output connected directly to the GPIO pin. |
## References

View File

@@ -0,0 +1,16 @@
---
tags:
- resource
created: 2025-07-26 16:20
---
## Summary
## Notes
## References
- [How to Use a Sound Sensor With Arduino : 5 Steps - Instructables](https://www.instructables.com/How-to-Use-a-Sound-Sensor-With-Arduino)

View File

@@ -0,0 +1,31 @@
# Switches and Relays
[](https://arduinogetstarted.com/tutorials/arduino-relay)
[](https://radiostud.io/howto-i2c-communication-rpi/)
Types of switches:
- Push on/off
- Toggle on/off
- Magnetic
- Capacitance
- Resistance
- Proximity
- Temperature
- Pressure
[](https://www.electronicshub.org/switches/)
[](https://electronics.stackexchange.com/questions/113574/understanding-a-circuit-for-reading-current-passing-through-human-bodies)
[](https://learn.adafruit.com/adafruit-4-channel-adc-breakouts/python-circuitpython)
[](https://www.instructables.com/Capacitive-Switch-for-Arduino/)
[](https://electronics.stackexchange.com/questions/444488/how-to-build-a-human-chain-detection-circuit)
[](https://www.youtube.com/watch?v=m5PfKb8p1YI)
[](https://forum.arduino.cc/t/human-chain-body-conductivity/634793)

View File

@@ -0,0 +1,27 @@
---
tags:
- resource
created: 2025-04-25 10:48
---
## Summary
USB connectors come in A, B and C standards.
*Need a table of the different standards, male/female version, micro and mini versions, plus special instances*
## Notes
### All
![[USB-ports-pinout_800x450-3353867086.jpg]]
### USB Micro A and USB Micro B
[USB-micro-A-and-B-pinout-134975395.webp](USB-micro-A-and-B-pinout-134975395.webp)
![[Micro-USB-Pinout.jpg]]
## References
- [Why do some USB Type B cables have an ID pinout but others have a DGND pinout?](https://electronics.stackexchange.com/questions/646803/why-do-some-usb-type-b-cables-have-an-id-pinout-but-others-have-a-dgnd-pinout-h)
- [USB - Wikipedia](https://en.wikipedia.org/wiki/USB)

View File

@@ -0,0 +1,11 @@
---
tags:
- resource
---
## Summary
UL certification is only required for items that plug into mains power. FCC certification is needed for anything that oscillates at >9KHz.
## References
- [Understanding Certifications for Electronic Hardware Products](https://predictabledesigns.com/understanding-certifications-for-electronic-hardware-products)

View File

@@ -0,0 +1,3 @@
- [How to Setup Vibration Sensors on the Arduino - Circuit Basics](https://www.circuitbasics.com/how-to-setup-vibration-sensors-on-the-arduino)

View File

@@ -0,0 +1,8 @@
## Goal
Create a light switch with a dimmer that can control 110 VAC or 220 VAC loads.
## References
- [Arduino Controlled Light Dimmer : 16 Steps - Instructables](https://www.instructables.com/Arduino-controlled-light-dimmer-The-circuit)
- https://www.aliexpress.us/item/2251832615710334.html

View File

@@ -0,0 +1,91 @@
---
active: false
tags: project
created: 2026-05-28 15:23
---
## Summary
Building an I2C temperature controller involves reading temperature from an I2C sensor (like an MCP9808 or DHT12) and using an Arduino to trigger a relay (for heaters/coolers) or adjust a fan. Use the standard `<Wire.h>` library for communication and control relays based on your temperature thresholds. 
Here is a straightforward guide to get your project running.
🛠️ Hardware Requirements
- **Microcontroller:** Arduino Uno or Nano
- **I2C Temperature Sensor:** MCP9808 (High precision) or DHT12
- **I2C Display (Optional):** 16x2 LCD with I2C backpack (PCF8574)
- **Control Element:** 5V Relay module (to switch a fan or heater)
- **Misc:** Breadboard, jumper wires, and 4.7kΩ pull-up resistors (if not built into your sensor modules) 
🔌 Wiring the Components
Connect your I2C devices to the Arduino's I2C bus. You will share these lines between the sensor and the display.
- **VCC**  Arduino 
- **GND**  Arduino 
- **SDA** Arduino Analog Pin (or the dedicated pin on newer boards)
- **SCL** Arduino Analog Pin (or the dedicated pin on newer boards)
- **Relay Signal Pin** Arduino Digital Pin 
Before running this code, ensure you have installed the **Adafruit MCP9808 Library** and the **LiquidCrystal_I2C Library** via the Arduino IDE Library Manager (`Sketch > Include Library > Manage Libraries`).
```
#include <Wire.h>
#include <Adafruit_MCP9808.h>
#include <LiquidCrystal_I2C.h>
// Create sensor and display objects
Adafruit_MCP9808 tempsensor = Adafruit_MCP9808();
LiquidCrystal_I2C lcd(0x27, 16, 2); // Set the LCD address to 0x27 for a 16 chars and 2 line display
const int RELAY_PIN = 7;
const float TARGET_TEMP = 25.0; // Target temperature in Celsius
const float HYSTERESIS = 0.5; // Prevents relay rapid switching (chattering)
void setup() {
Serial.begin(9600);
pinMode(RELAY_PIN, OUTPUT);
digitalWrite(RELAY_PIN, HIGH); // Default to OFF (Relays are often active LOW)
// Initialize I2C LCD
lcd.init();
lcd.backlight();
lcd.setCursor(0, 0);
lcd.print("I2C Temp Ctrl");
// Initialize sensor
if (!tempsensor.begin(0x18)) { // Default I2C address for MCP9808
Serial.println("Couldn't find MCP9808!");
while (1);
}
tempsensor.setResolution(3); // Set resolution to 0.0625°C
}
void loop() {
tempsensor.wake(); // Wake up sensor
float tempC = tempsensor.readTempC();
tempsensor.shutdown(); // Shutdown to save power/reduce self-heating
// Update Display
lcd.setCursor(0, 1);
lcd.print("Temp: ");
lcd.print(tempC);
lcd.print("C");
// Temperature Control Logic
if (tempC > (TARGET_TEMP + HYSTERESIS)) {
digitalWrite(RELAY_PIN, LOW); // Turn ON cooling/heating
}
else if (tempC < (TARGET_TEMP - HYSTERESIS)) {
digitalWrite(RELAY_PIN, HIGH); // Turn OFF cooling/heating
}
delay(1000); // Read temperature every second
}
```
## Tasks
## References

View File

@@ -0,0 +1,19 @@
---
active: false
tags: project
created: 2025-02-11 18:57
---
## Goal
Create digitally controlled potentiometer.
## Tasks
- [x] Research 2025-02-11 ✅ 2025-02-11
- [ ] Order parts 2025-02-11
- [ ] Breadboard a circuit 2025-02-11
- [ ] Test with 12V LED 2025-02-11
## References
- [Arduino With MCP4131 Digitally Controlled Potentiometer (DCP) : 8 Steps - Instructables](https://www.instructables.com/Arduino-With-MCP4131-Digitally-Controlled-Potentio)
- [Digital Variable Resistor using NE555 &amp; CD4017 IC](https://www.circuits-diy.com/digital-variable-resistor-using-ne555-cd4017-ic)
- [Arduino and MCP4131 digitally controlled potentiometer (DCP) - Hackster.io](https://www.hackster.io/umpheki/arduino-and-mcp4131-digitally-controlled-potentiometer-dcp-d35997)

View File

@@ -0,0 +1,69 @@
---
active: false
tags:
- project
- eg
created: 2025-08-08
completed: 2025-09-09
---
## Goal
Install a rack mounted server for Escape Gallery.
## To Do
- [x] Order used Dell R640 2025-08-22 ✅ 2025-08-22
- [x] Install in rack 2025-08-22 ✅ 2025-08-22
- [x] Adjust and fix-up the rack 2025-08-22 ✅ 2025-08-23
- [x] Create network cables 2025-08-31 ✅ 2025-08-31
- [x] Install network cables 2025-08-23 ✅ 2025-09-09
- [x] Install power cables 2025-08-23 ✅ 2025-09-09
- [x] Install and tidy all cables on rack 2025-08-22 ✅ 2025-09-09
- [x] Cut new top for the rack 2025-08-22 ✅ 2025-09-09
- [x] Configure the system RAID 2025-08-22 ✅ 2025-09-09
- [x] Test iDRAC interface 2025-08-23 ✅ 2025-09-09
- [x] Install Ubuntu on system 2025-08-22 ✅ 2025-09-09
## Notes
IPMI (==Intelligent Platform Management Interface==) is a standardized computer interface used for out-of-band management of computer systems. It allows for remote monitoring and management of servers, even when the main system is powered off or unresponsive. This is primarily achieved through a [Baseboard Management Controller (BMC)](https://www.google.com/search?client=firefox-b-1-d&cs=1&sca_esv=84a972cf9bb6250a&sxsrf=AE3TifMH8StQqpwwT6qFSJ0vmem-ifnEbQ%3A1754588176034&q=Baseboard+Management+Controller+%28BMC%29&sa=X&ved=2ahUKEwiZ2aWnnvmOAxXfOjQIHSSoNYgQxccNegQIBRAB&mstk=AUtExfAn7NkltD9c2Hl5f6c-b9QH-ZpnCOXseq62sbJvz26_opwj0re3BrR9XDlNuWBQY2n5PFxfdUOL8VPQuivWzkrXk3cfNfkGms5gLG_kGE7BeKi1KPct3LfwpawO6WsHvnk-QT8mr8X-VFW9wDDdvudTF73-JRryoUTis3_D_6DtirJxmzGkXtSL4YnvFzl6VIC5WoGdXbSh5kOvvOAfdBSaYvoANDpR8zz6Zt6VfM2q836KDAllYu-Y7F9gXoSl_ihkxOU2nkVBD74ot82vSDsk&csui=3), which acts as a separate, dedicated computer on the server's motherboard.
To install `ipmitool` on Ubuntu 24.04, follow these steps: Update package lists.
Code
```
sudo apt update
```
install ipmitool.
Code
```
sudo apt install ipmitool
```
- Install `openipmi` (optional, but recommended for full functionality):
Code
```
sudo apt install openipmi
```
Start the openipmi service (if installed).
Code
```
sudo systemctl start openipmi
```
After these steps, `ipmitool` will be installed and ready for use. You can verify the installation by running `ipmitool -V` to check its version.
## References
- [Dell R630 Fan Speeds | TrueNAS Community](https://www.truenas.com/community/threads/dell-r630-fan-speeds.95897)
- [Silence Your Dell PowerEdge Server](https://www.spxlabs.com/blog/2019/3/16/silence-your-dell-poweredge-server)
- [Dell PowerEdge R630 Owner's Manual](https://dl.dell.com/content/manual18909488-dell-poweredge-r630-owner-s-manual.pdf?language=en-us)
- [Dell iDRAC8 Manual](https://dl.dell.com/content/manual29462169-integrated-dell-remote-access-controller-8-version-2-75-75-75-user-s-guide.pdf?language=en-us)
- https://www.youtube.com/watch?v=3k-Bl3jJ8g8&t=192s

View File

@@ -0,0 +1,122 @@
---
active: false
created: 2024-06-01
tags:
- eg
- project
---
## Goal
Create an RPi puzzle breakout board that makes it easier to plug in different switches, RFID readers and I2C components.
![[Pasted image 20240618071431.png]]
Pin 1 on GPIO connector goes to Pin 1 on the breakout board.
## J9
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(3).png)
![[Ribbon_Cable_Orientation.png.png]]
## U1 Chip Output
We use a [CD4051B](https://www.ti.com/lit/ds/symlink/cd4051b.pdf) multiplexer chip to turn 3 GPIO lines (17, 27, 22) into 8 output control lines. The chip's INH (disable pin) is pulled low. GPIO20 provides the X input value (high or low depending the use case)
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image.png)
| Socket | Socket Pin | GPIO BCM | GPIO Pin | Action |
| ------ | ---------- | -------- | -------- | -------------------------------------- |
| X | 3 | 20 | 38 | Master enable switch (0 = off, 1 = on) |
| A | 11 | 17 | 11 | Refer to selector table |
| B | 10 | 27 | 13 | -"- |
| C | 9 | 22 | 15 | -"- |
### Selector table U1
| Reset | A (GPIO 17) | B (GPIO 27) | C (GPIO 22) |
| ----- | ----------- | ----------- | ----------- |
| J1 | 0 | 0 | 0 |
| J2 | 1 | 0 | 0 |
| J3 | 0 | 1 | 0 |
| J4 | 1 | 1 | 0 |
| J5 | 0 | 0 | 1 |
| J6 | 1 | 0 | 1 |
| J7 | 0 | 1 | 1 |
| J8 | 1 | 1 | 1 |
## J1 to J8
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(2).png)
| Socket | Socket Pin | GPIO BCM | GPIO Pin | Action |
| ------ | ---------- | -------- | -------- | ------------- |
| Jn | 1 | 8 | 24 | SDA/SPI0/CE0 |
| | 2 | 11 | 23 | SCK |
| | 3 | 10 | 19 | MOSI |
| | 4 | 9 | 21 | MISO |
| | 5 | | | Not connected |
| | 6 | | 25 | Ground |
| J2 | 7 | | | See U1 table |
| J3 | 7 | | | See U1 table |
| J4 | 7 | | | See U1 table |
| J5 | 7 | | | See U1 table |
| J6 | 7 | | | See U1 table |
| J7 | 7 | | | See U1 table |
| J8 | 7 | | | See U1 table |
| Jn | 8 | | 17 | 3V3 |
## J17 to J22
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(6).png)
| Socket | Socket Pin | GPIO BCM | GPIO Pin | Action |
| ------ | ---------- | -------- | -------- | ------ |
| J22 | 1 | 25 | 22 | I/O |
| | 2 | | 9 | Ground |
| J21 | 1 | 18 | 12 | I/O |
| | 2 | | 9 | Ground |
| J20 | 1 | 23 | 16 | I/O |
| | 2 | | 9 | Ground |
| J19 | 1 | 24 | 18 | I/O |
| | 2 | | 9 | Ground |
| J18 | 1 | 12 | 32 | I/O |
| | 2 | | 9 | Ground |
| J17 | 1 | 16 | 36 | I/O |
| | 2 | | 9 | Ground |
## J10 to J15
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(4).png)
| Socket | Socket Pin | GPIO BCM | GPIO Pin | Action |
| ------ | ---------- | -------- | -------- | ------ |
| J10 | 1 | 5 | 29 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J11 | 1 | 6 | 31 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J12 | 1 | 13 | 33 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J13 | 1 | 19 | 35 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J14 | 1 | 26 | 37 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J15 | 1 | 21 | 40 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
## J16
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(5).png)
| Socket | Socket Pin | GPIO BCM | GPIO Pin | Action |
| ------ | ---------- | -------- | -------- | ---------- |
| J16 | 1 | 2 | 3 | SDA1 / I2C |
| | 2 | 3 | 5 | SDL1 / I2C |
| | 3 | | 9 | Ground |
| | 4 | | 17 | 3V3 |

View File

@@ -0,0 +1,122 @@
---
active: false
created: 2025-04-29 08:16
tags:
- eg
- project
---
S## Goal
Create an RPi puzzle breakout board that makes it easier to plug in different switches, RFID readers and I2C components with connector pins holes aligned with red/yellow/black wires on commonly available leads.
![[Pasted image 20240618071431.png]]
Pin 1 on GPIO connector goes to Pin 1 on the breakout board.
![[GPIO_Board_v3.jpg]]
## J9
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(3).png)
![[Ribbon_Cable_Orientation.png.png]]
## U1 Chip Output
We use a [CD4051B](https://www.ti.com/lit/ds/symlink/cd4051b.pdf) multiplexer chip to turn 3 GPIO lines (17, 27, 22) into 8 output control lines. The chip's INH (disable pin) is permanently held low. GPIO 20 provides the X input value (high or low depending the use case)
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image.png)
| Socket | Socket Pin | BCM | Pin | Action |
| ------ | ---------- | --- | --- | -------------------------------------- |
| X | 3 | 20 | 38 | Master enable switch (0 = off, 1 = on) |
| A | 11 | 17 | 11 | Refer to selector table |
| B | 10 | 27 | 13 | Refer to selector table |
| C | 9 | 22 | 15 | Refer to selector table |
### Selector table U1
| Reset | RSTn | A (BCM 17) | B (BCM 27) | C (BCM 22) |
| ----- | ---- | ---------- | ---------- | ---------- |
| J1 | 0 | 0 | 0 | 0 |
| J2 | 1 | 1 | 0 | 0 |
| J3 | 2 | 0 | 1 | 0 |
| J4 | 3 | 1 | 1 | 0 |
| J5 | 4 | 0 | 0 | 1 |
| J6 | 5 | 1 | 0 | 1 |
| J7 | 6 | 0 | 1 | 1 |
| J8 | 7 | 1 | 1 | 1 |
## J1 to J8
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(2).png)
| Socket | Socket Pin | BCM | Pin | Action |
| ------ | ---------- | --- | --- | ------------- |
| Jn | 1 | 8 | 24 | SDA/SPI0/CE0 |
| | 2 | 11 | 23 | SCK |
| | 3 | 10 | 19 | MOSI |
| | 4 | 9 | 21 | MISO |
| | 5 | | | Not connected |
| | 6 | | 25 | Ground |
| J2 | 7 | | | See U1 table |
| J3 | 7 | | | See U1 table |
| J4 | 7 | | | See U1 table |
| J5 | 7 | | | See U1 table |
| J6 | 7 | | | See U1 table |
| J7 | 7 | | | See U1 table |
| J8 | 7 | | | See U1 table |
| Jn | 8 | | 17 | 3V3 |
## J17 to J22
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(6).png)
| Socket | Socket Pin | BCM | Pin | Action | Position |
| ------ | ---------- | --- | --- | ----------- | -------- |
| J22 | 1 | | 9 | Ground | |
| | 2 | 25 | 22 | I/O | |
| J21 | 1 | | 9 | Ground | |
| | 2 | 18 | 12 | I/O<br>PWM0 | |
| J20 | 1 | | 9 | Ground | |
| | 2 | 23 | 16 | I/O | |
| J19 | 1 | | 9 | Ground | |
| | 2 | 24 | 18 | I/O | |
| J18 | 1 | | 9 | Ground | |
| | 2 | 12 | 32 | I/O<br>PWM0 | |
| J17 | 1 | | 9 | Ground | |
| | 2 | 16 | 36 | I/O | |
## J10 to J15
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(4).png)
| Socket | Socket Pin | BCM | Pin | Action |
| ------ | ---------- | --- | --- | ----------- |
| J10 | 1 | 5 | 29 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J11 | 1 | 6 | 31 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J12 | 1 | 13 | 33 | I/O<br>PWM1 |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J13 | 1 | 19 | 35 | I/O<br>PWM1 |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J14 | 1 | 26 | 37 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J15 | 1 | 21 | 40 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
## J16
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(5).png)
| Socket | Socket Pin | BCM | Pin | Action | Wire Color |
| ------ | ---------- | --- | --- | ---------- | ---------- |
| J16 | 1 | | 9 | Ground | Black |
| | 2 | | 1 | 3V3 | Red |
| | 3 | 3 | 5 | SCL1 / I2C | White |
| | 4 | 2 | 3 | SDA1 / I2C | Yellow |

View File

@@ -0,0 +1,122 @@
---
active: false
created: 2025-05-03
tags:
- eg
- project
---
## Goal
Create an RPi puzzle breakout board that makes it easier to plug in different switches, RFID readers and I2C components. Must allow IRQ to be used on SPI interfaces.
![[Pasted image 20240618071431.png]]
Pin 1 on GPIO connector goes to Pin 1 on the breakout board.
[Protect digital inputs][1] externally to avoid blowing out RPi's
## J9
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(3).png)
![[Ribbon_Cable_Orientation.png.png]]
## U1 Chip Output
We use a [CD4051B](https://www.ti.com/lit/ds/symlink/cd4051b.pdf) multiplexer chip to turn 3 GPIO lines (17, 27, 22) into 8 output control lines. The chip's INH (disable pin) is permanently held low. GPIO 20 provides the X input value (high or low depending the use case)
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image.png)
| Socket | Socket Pin | GPIO BCM | GPIO Pin | Action |
| ------ | ---------- | -------- | -------- | ----------------------------- |
| RST | 3 | 20 | 38 | RST (0 = disable, 1 = enable) |
| A | 11 | 17 | 11 | Refer to selector table below |
| B | 10 | 27 | 13 | -"- |
| C | 9 | 22 | 15 | -"- |
### Selector table for U1
RST pins are pulled low to disable the reader. Use address pins A, B, C to target J1 thru J8 with RST on GPIO20 and pull it high to restart the reader.
| Reset | A (GPIO 17) | B (GPIO 27) | C (GPIO 22) |
| ----- | ----------- | ----------- | ----------- |
| J1 | 0 | 0 | 0 |
| J2 | 1 | 0 | 0 |
| J3 | 0 | 1 | 0 |
| J4 | 1 | 1 | 0 |
| J5 | 0 | 0 | 1 |
| J6 | 1 | 0 | 1 |
| J7 | 0 | 1 | 1 |
| J8 | 1 | 1 | 1 |
## J1 to J8
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(2).png)
| Socket | Socket Pin | GPIO BCM | GPIO Pin | Action |
| ------ | ---------- | -------- | -------- | ------------------------------------- |
| Jn | 1 | 8 | 24 | SDA/SPI0/CE0 |
| | 2 | 11 | 23 | SCK |
| | 3 | 10 | 19 | MOSI |
| | 4 | 9 | 21 | MISO |
| | 5 | 4 | 7 | IRQ |
| | 6 | | 25 | Ground |
| | 7 | 20 | 38 | RST (See U1 table above for selector) |
| | 8 | | 17 | 3V3 |
## J17 to J22
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(6).png)
| Socket | Socket Pin | GPIO BCM | GPIO Pin | Action |
| ------ | ---------- | -------- | -------- | ------ |
| J22 | 1 | | 9 | Ground |
| | 2 | 25 | 22 | I/O |
| J21 | 1 | | 9 | Ground |
| | 2 | 18 | 12 | I/O |
| J20 | 1 | | 9 | Ground |
| | 2 | 23 | 16 | I/O |
| J19 | 1 | | 9 | Ground |
| | 2 | 24 | 18 | I/O |
| J18 | 1 | | 9 | Ground |
| | 2 | 12 | 32 | I/O |
| J17 | 1 | | 9 | Ground |
| | 2 | 16 | 36 | I/O |
## J10 to J15
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(4).png)
| Socket | Socket Pin | GPIO BCM | GPIO Pin | Action |
| ------ | ---------- | -------- | -------- | ------ |
| J10 | 1 | 5 | 29 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J11 | 1 | 6 | 31 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J12 | 1 | 13 | 33 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J13 | 1 | 19 | 35 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J14 | 1 | 26 | 37 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
| J15 | 1 | 21 | 40 | I/O |
| | 2 | | 39 | Ground |
| | 3 | | 1 | 3V3 |
## J16
![Image.png](Attachments/Puzzle%20Breakout%20Board.assets/Image%20(5).png)
| Socket | Socket Pin | GPIO BCM | GPIO Pin | Action |
| ------ | ---------- | -------- | -------- | ---------- |
| J16 | 1 | | 9 | Ground |
| | 2 | | 1 | 3V3 |
| | 3 | 3 | 5 | SDL1 / I2C |
| | 4 | 2 | 3 | SDA1 / I2C |
## References
[1]: https://www.digikey.com/en/articles/protecting-inputs-in-digital-electronics

View File

@@ -0,0 +1,13 @@
## Goal
Create a handheld RFID reader.
## To Do
- [x] Connect LCD screen and get working 2024-06-02 ✅ 2024-06-02
- [x] Connect RFID reader and get working 2024-06-02 ✅ 2024-06-02
- [x] Connect RFID reader and LCD screen 2024-06-02 ✅ 2024-06-02
## References
- [LCD Display](https://pimylifeup.com/raspberry-pi-lcd-16x2/)
- [2 mfrc522 in one arduino](https://forum.arduino.cc/t/2-mfrc522-in-one-arduino-solved/416925/3)
- [Arduino - LCD I2C | Arduino Tutorial](https://arduinogetstarted.com/tutorials/arduino-lcd-i2c)

View File

@@ -0,0 +1,21 @@
---
active: false
tags: project
created: 2026-03-08 20:25
---
## Goal
Build an I2C based MFRC522 reader.
- Use RJ45 connectors
- Use DIP switches to set address
## Tasks
- [ ] Clone the SPI based board 2026-03-08
- [ ] Redesign the SPI based board to be I2C 2026-03-08
## References
- [DIP Switches for Setting I2C address](https://www.ctscorp.com/Files/DataSheets/Switches/DIP-Switches/CTS-Switches-DIP-219-Series-Datasheet.pdf)
- [DigiKey DIP switches](https://www.digikey.com/en/products/detail/cts-electrocomponents/219-5MST/223200)
- [MFRC522 Data Sheet](https://www.nxp.com/docs/en/data-sheet/MFRC522.pdf)
- [I2C Specification](https://www.nxp.com/docs/en/user-guide/UM10204.pdf)

View File

@@ -0,0 +1,97 @@
---
tags:
- project
- eg
active: false
created: 2024-02-06
---
## Goal
Reverse engineer MFRC522 RFID reader, create circuit design, add a ribbon cable connector, have RST pin be pulled low.
## To Do
- [x] Test MFRC522 in Rust crate 2024-09-29 ✅ 2025-05-02
- [x] Test the small picofarad capacitors to see what the values are 2024-10-28 ✅ 2025-03-02
- [x] Check that MFRC522 chips can be ordered on 2024-09-29 ✅ 2024-10-28
- [x] Decide on asymmetry of TX1/TX2 2024-10-03 ✅ 2024-10-28
- [x] See which side of TX the RX/VMID connects to on the actual board 2024-10-03 ✅ 2024-10-08
- [x] Add ribbon cable connector 2024-06-20 ✅ 2024-10-03
- [x] Give all capacitors and resistors their values in circuit 2024-09-29 ✅ 2024-10-03
- [x] Connect crystal 2024-09-29 ✅ 2024-10-03
- [x] Connect LED 2024-09-29 ✅ 2024-10-03
- [x] Connect antenna 2024-09-29 ✅ 2024-10-03
- [x] Ensure pull up resistor to disable board 2024-09-29 ✅ 2024-10-03
- [x] Pull capacitors off of a working board to figure out what values they are 2024-06-25 ✅ 2024-09-29
## Notes
MF522-AN chip is based on the original Philips MFRC522 chip. Every RFID chip has a unique ID. Additionally you can store encrypted data on many RFIDs as well.
- https://arduino.stackexchange.com/questions/54119/mfrc522-firmware-unknown - getting version 0xB2 for clone boards
- Holding the RST pin low disables the board. Board is reset by a positive edge and enabled when held high.
- [Instructables article on how to interface RPi to RC522](https://www.instructables.com/How-to-Interface-RFID-RC522-With-Raspberry-Pi/)
- [Donskytech article about using RPi with MFRC522 reader](https://www.donskytech.com/raspberry-pi-mfrc522-rfid-reader-spi/)
- [Tutorial that shows how to voltage regulate the 5V signals to 3.3V](https://arduinogetstarted.com/tutorials/arduino-rfid-nfc) and how to read on an Arduino. *Voltage regulation is not required - see note below*
- [Article about RC522 RFID modules](https://components101.com/wireless/rc522-rfid-module). Explains that the communication pins of the board are 5V tolerant so no need to voltage regulate as other articles describe
- [Enabling SPI interface on Raspberry Pi](https://learn.sparkfun.com/tutorials/raspberry-pi-spi-and-i2c-tutorial/all)
- [Another interesting RC522 / Arduino tutorial](https://www.instructables.com/How-to-Use-the-RFID-RC522-Module-With-Arduino/)
- [How to use an RFID RC522 with a Raspberry Pi](http://wiki.sunfounder.cc/index.php?title=How_to_Use_an_RFID_RC522_on_Raspberry_Pi)
- [And another that talks about tag memory and how it is organized](https://peppe8o.com/rfid-and-raspberry-pi-rc522-wiring-and-code-with-python/)
- This chap on StackExchange explains [how to attach multiple RC522 readers to one RPi by cycling the RST pins and multiplexing the SPI](https://raspberrypi.stackexchange.com/questions/31773/raspberry-pi-multiple-nfc-readers/137491#137491).
- [Full MFRC522 Specification](https://www.nxp.com/docs/en/data-sheet/MFRC522.pdf)
- [All the different types of RFID tags and the different standards for each country](https://blogs.bu.edu/llisa/everything-you-need-to-know-about-rfid-tags/)
- [Rust MFRC522 driver](https://gitlab.com/jspngh/rfid-rs) for RFID chip reading
- [SPI - Serial Peripheral Interface pinout for Raspberry Pi](https://pinout.xyz/pinout/spi)
- [DIY Smart Lock](https://www.makeuseof.com/tag/diy-smart-lock-arduino-rfid/)
- [Read two RFIDs from same SPID using OR gate](https://forum.arduino.cc/t/2-mfrc522-in-one-arduino-solved/416925/3)
- [MFRC522 Circuit Diagram](https://easyeda.com/editor#id=!b4aaa5775d8340e8a0fc626cdb0c1cbe)
- https://easyeda.com/editor#id=!488e1b7a8f9544599a7f8e41d1d6ccb9
- [Optimizing Read Range in RFID Systems](https://ww1.microchip.com/downloads/en/market_communication/optedn_ps.pdf)
- http://miniradiosolutions.com/wp-content/uploads/2015/09/NFC-Reader-Design-II-Antenna-design-considerations-Public.pdf
- https://5.imimg.com/data5/SELLER/Doc/2022/1/NB/OG/UX/1833510/rc522-reader-writer-module.pdf
![Image.png](Resources/Electronics/RFID%20and%20NFC.assets/Image.png)
The RST pin of the RC522 RFID module is level triggered. Low powers down the board, high powers up and causes a board reset.
![Image.png](Resources/Electronics/RFID%20and%20NFC.assets/Image%20(2).png)
![[RFID-Module-RC522-Kits-13-56-Mhz-6cm-With-Tags-SPI-Write-Read-for-Arduino-back.png]]
![[RFID-Module-RC522-Kits-13-56-Mhz-6cm-With-Tags-SPI-Write-Read-for-Arduino.jpg_.png]]
![[PICA0008.jpg]]
![[MFRC522-Back-Screen.jpeg]]
![[MFRC522-Front-Screen.jpeg]]
![[MFRC522-Back-Copper.jpeg]]
![[MFRC522-Front-Copper.jpeg]]
## References
- [RFID RC522 Schematic Resources](https://easyeda.com/modules/RFID-RC522-Schematic_488e1b7a8f9544599a7f8e41d1d6ccb9)
- https://easyeda.com/editor#id=!488e1b7a8f9544599a7f8e41d1d6ccb9
- https://easyeda.com/editor#id=!b4aaa5775d8340e8a0fc626cdb0c1cbe
- [How to Set Up a Raspberry Pi RFID RC522 Chip - Pi My Life Up](https://pimylifeup.com/raspberry-pi-rfid-rc522)
- [MFRC522 footprint and symbol by NXP USA Inc.](https://www.snapeda.com/parts/MFRC522/NXP%20USA/view-part/?ref=search&t=MFRC522)
- [mfrc522 - Rust](https://docs.rs/mfrc522/latest/mfrc522)
- [Resistor Sizes and Packages | Resistor Standards and Codes | Resistor Guide](https://eepower.com/resistor-guide/resistor-standards-and-codes/resistor-sizes-and-packages)
- [Learn by Example—Using an Impedance Smith Chart - Technical Articles](https://www.allaboutcircuits.com/technical-articles/learn-to-use-the-impedance-smith-chart-through-examples)
- [Review of R, X, and Z (Resistance, Reactance and Impedance) | Reactance and Impedance—R, L, And C | Electronics Textbook](https://www.allaboutcircuits.com/textbook/alternating-current/chpt-5/review-of-r-x-and-z)
- [Standard Inductor Values - RF Cafe](https://www.rfcafe.com/references/electrical/inductor-values.htm)
- [What is an SMD capacitor? Common capacitor values - SM Tech](https://somanytech.com/smd-capacitor-surface-mount-capacitor)
- [How to Calculate the Frequency of the Upper Sideband?](https://www.gauthmath.com/knowledge/How-to-calculate-the-frequency-of-the-upper-sideband--7389682134987374604)
![[RFID-Module-Circuit-Fixed.png]]
![[MFRC522.png]]
![[Design of Adaptive RFID Reader based on DDS and RC522 1.pdf]]
![[MFRC522 Antenna Design.pdf]]

View File

@@ -0,0 +1,21 @@
---
active: false
tags: project
created: 2026-03-02 10:03
---
## Goal
Create next generation prop controller hardware.
- Have RPi bolt onto the board
- Have 10 MOSFETS with 2 wire Molex connectors
- I2C with RJ45 connector
- Power LED
- 3.3VDC / 5VDC / 12VDC / 24VDC available to MOSFETs
## Tasks
- [x] Try importing a part from https://www.ultralibrarian.com/ into Fusion 2026-02-06 ✅ 2026-03-03
- [x] Figure out how to re-associate 3D models in imported Fusion projects ✅ 2026-03-03
## References

View File

@@ -0,0 +1,20 @@
---
created: 2025-08-17
tags:
- eg
- project
active: false
---
## Goal
Test PN532 boards alternative option to the RF522 boards.
## To Do
- [ ] Breadboard a circuit to tests the board 2024-06-25
- [ ] Order an I2C multiplexer board 2024-06-25
## References
- [PN532 NFC RFID Module — A Quick Introduction - ElectroSchematics.com](https://www.electroschematics.com/nfc-rfid-module-pn532)
- [Amazon.com: Haldzemo PN532 Reader Writer Module V3 IC Card with S50 White Blank Card compatible Arduino Raspberry Pi (2 Sets Kit) : Electronics](https://www.amazon.com/dp/B0BPR4DM19)
- [`pn532` crate](https://docs.rs/pn532/latest/pn532)

View File

@@ -0,0 +1,8 @@
## Goal
Create an automatic plant watering system
## References
- [Automatic Plant Watering System Using a Micro:bit](https://www.instructables.com/Automatic-Plant-Watering-System-Using-a-Microbit/)
- [Arduino Plant Watering System](https://www.instructables.com/Arduino-Plant-Watering-System/) This one looks the simplest.

View File

@@ -0,0 +1,9 @@
## Goal
Create a Flutter app that streams from a CS mounted Arducam RPi camera.
## References
- https://www.amazon.com/gp/product/B012ETE75I
- [libcamera](https://libcamera.org/index.html)
- [OctoPrint.org - A new camera stack for OctoPi](https://octoprint.org/blog/2023/05/24/a-new-camera-stack-for-octopi)
- [GitHub - ayufan/camera-streamer: High-performance low-latency camera streamer for Raspberry Pi's](https://github.com/ayufan/camera-streamer)

View File

@@ -0,0 +1,15 @@
---
active: false
tags: project
created: 2026-03-05 20:31
---
## Goal
Create a small microphone that streams over WiFi.
## Tasks
## References
- https://medium.com/@martin.hodges/setting-up-a-mems-i2s-microphone-on-a-raspberry-pi-306248961043
- https://www.instructables.com/Make-Your-Own-Spy-Bug-Arduino-Voice-Recorder/

View File

@@ -0,0 +1,42 @@
## Goal
Build a handheld device that can be used to test the 8 strand ribbon cables that connect the MRFC522 readers to the RPi breakout board.
## To Do
- [x] Design & print ribbon cable tester case bottom half 🔼 2024-05-15 ✅ 2024-06-07
- [x] Design & print ribbon cable tester case top half 🔼 2024-05-15 ✅ 2024-06-08
- [x] Design & print ribbon cable tester battery door 🔼 2024-06-08 ✅ 2024-06-08
- [x] Assembly the unit 2024-06-10 ✅ 2024-06-10
## Parts List
| **Part Code** | **Type** | **Value** | **Mfg Code** |
| ------------- | ------------------ | ----------- | ---------------------------------- |
| R1 | Resistor | 68 to 75 KΩ | |
| R2 | Resistor | 1 KΩ | |
| R3 | Resistor | 1 KΩ | |
| R4 | Resistor | 1 KΩ | |
| R5 | Resistor | 10 KΩ | |
| R6 | Resistor | 100 Ω | The ratio of R6:R7 is 1:3.3 (0.30) |
| R7 | Resistor | 330 Ω | |
| C1 | Ceramic Capacitor | 0.01 µF | 104 |
| C2 | Ceramic Capacitor | 10 µF | 106 |
| RV1 | Potentiometer | 100 KΩ | 104 |
| U1 | Integrated Circuit | LM555 | |
| U2 | Integrated Circuit | CD4017 | |
| D1 - D8 | 5mm LED | Red | |
| D9 - D16 | 5mm LED | Green | |
| D17 | 5mm LED | White | |
| J1 - J2 | IDC Socket | 8 pin | |
| | | | |
## Build Notes
- Overall current draw is 0.03 A so power is ~0.27W
## References
- [This is a good tutorial](https://www.nutsvolts.com/magazine/article/led-chaser-sequencer-circuits), but there is no capacitor to pin 5 of the LM555 as in all the other articles, which seems wrong.
- [LM555 datasheet](https://www.ti.com/lit/ds/symlink/lm555.pdf?ts=1715218052822&ref_url=https%253A%252F%252Fwww.google.com%252F)
- [4017B datasheet](https://www.ti.com/lit/ds/symlink/cd4017b.pdf?ts=1715285377632&ref_url=https%253A%252F%252Fwww.google.com%252F)
- The best [LM555 tutorial](https://www.nutsvolts.com/magazine/article/using-the-555-timer-ic-in-special-or-unusual-circuits). It actually works.

View File

@@ -0,0 +1,18 @@
---
active: true
tags: project
created: 2026-03-02 10:03
---
## Goal
Create a board for the touch circuit. Must have:
- ADC
- I2C
- Voltage divider
## Tasks
- [ ] Create a circuit diagram for the helm puzzle 2026-01-24
- [ ] Reverse engineer the ADC converter (with I2C) and add to touch circuit 2026-01-26
## References