
Switch
byrantech/laptop
anyon_e, a highly integrated, high end, open source laptop. Attempt the impossible.

Board to Interface an SRX MAG ENCODER to a SPARK MAX and a roboRIO
Kobe is an open-source printed circuit board by Jagwires7443, from the Jagwires7443/SwerveSensorInterfaceBoard repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 50.8 × 17.8 mm with 6 parts on 19 nets, routed with 58 tracks and 0 vias.
It is built around the HCPL-7721-000E. Its parts include 3 connectors, 2 capacitors and 1 IC. It belongs with the robots and motor control and interfaces and adapters boards of this library.
Board to Interface an SRX MAG ENCODER to a SPARK MAX and a roboRIO
This small board (2.0" x 0.7") interfaces an SRX MAG ENCODER to a SPARK MAX (A/B incremental encoder inputs plus PWM absolute encoder input, although the latter is not yet supported by SPARK MAX) and to the roboRIO (PWM absolute encoder input used with a digital input; in software used with DutyCycle or DutyCycleEncoder). The sensor is powered by the motor controller, and the roboRIO is properly isolated. This is a good starting point for similar interface projects in the FRC (FIRST Robotics Competition) ecosystem.
These are the KiCad design files, including schematic symbols, PCB footprints, and 3-D models for all the components.
Note that a simpler way to handle this is to leave the SPARK MAX out of things and to simply connect pins 2 (+5V), 9 (PWM), and 10 (GND) from the SRX MAG ENCODER to a roboRIO digital input. Indeed, until REV addresses this bug (fixed for 2023), there's not much point in trying to use the SPARK MAX to directly handle closed-loop control. Here are links to parts (multiple suppliers) that are helpful with this approach: CABLE ASSEM .05" 10POS 3", 10-pin 2x5 Socket-Socket 1.27mm IDC (SWD) Cable - 150mm long, SRX / Gadgeteer Data Cable (4-pack), Talon SRX / Spark Max - 10 Pin Data Cable, SWD (2x5 1.27mm) Cable Breakout Board, Gadgeteer Breakout Module (5 Pack), SPARK MAX Data Port Breakout Board.
Also note that REV now uses pin 6 of the SPARK MAX data port for the PWM absolute encoder input, so this part of the PCB desgn is also out-of-date.
Working with the 0.05" headers and fine-pitch cables can be tough. Test that the motor runs as expected before connecting to the SPARK MAX. Then, be sure the SPARK MAX has been configured to "Alternate Encoder Mode" and this configuration has been saved. At this point, connect to the SPARK MAX and verify that the LED on the SRX MAG ENCODER is on (any color, the color only depends on the distance to the magnet). Be sure the LEDs on the SPARK MAX are as expected, and that you can still communicate with it via "REV Hardware Client". If not, power down and start looking for shorts or opens -- likely trouble spots are the solder connections on the board and the points where the connectors and cables join. At this point, power and ground are probably good.
Now, check that the motor still runs as expected. It is possible to short signals which are essential for the motor to run, so suspect a problem in this area if the motor no longer runs well. Even though these signals normally come in via the built-in signal cable from the (NEO) motor, these same connections are present at the "Data Port". Trouble in this area may also cause a "Sensor Fault". If things are all good so far, you can run the motor and should see changing values returned via GetPosition() and GetVelocity(). Finally, check the PWM absolute position signal using a DutyCycle object. Code to do these things is here. This code contains an extensive test mode (used with Shuffleboard) which will read and display all of the sensor data.
Another option for this type of board is to go surface mount. The boards REV itself has created seem to use an FLE-107-01-G-DV connector to directly plug into the SPARK MAX. Note this is actually a 14-pin connector -- the outer 4 pins are not used to make a connection, but to help to take up some of the excess space on each side of the 10 pins on the connector that is part of the SPARK MAX. The REV boards are shaped to match the outline of the end of the SPARK MAX where they plug in (roughly 1.16" wide by 0.75" to 0.90" tall, with a roughtly 0.14" by 0.25" notch on each side, roughly 0.14" from the top, with the connector centered roughly 0.18" below the bottom of the notch).
| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | RDE5C1H104J2K1H03B | RDE5C1H104J2K1H03B:CAP_RDE5C1H104J2K1H03B | C1, C2 |
| 2 | SHF-105-01-X-D-TH | SHF-105-01-X-D-TH:SAMTEC_SHF-105-01-X-D-TH | J1, J2 |
| 1 | HCPL-7721-000E | HCPL-7721-000E:DIL08 | IC1 |
| 1 | TSW-103-08-F-S-RA | TSW-103-08-F-S-RA:TSW-103-08-F-S-RA | J3 |
It measures 50.8 × 17.8 mm and has 2 copper layers, 1.6 mm thick.
6 parts, built around the HCPL-7721-000E. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the Jagwires7443/SwerveSensorInterfaceBoard repository on GitHub, at the commit this page was made from: the board is Kobe.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

byrantech/laptop
anyon_e, a highly integrated, high end, open source laptop. Attempt the impossible.


Jcparkyn/dpoint
Open-source digital stylus using camera tracking and inertial measurements

VoronDesign/Voron-Hardware
Cool Hardware designed by the Voron Design group

hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

Luos-io/luos_engine
Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.
