
Usbhid testfixture
shraken/usbhid_buddy
Hardware, firmware, and software for the USBHID DAQ 'Buddy' device

Hardware, firmware, and software for the USBHID DAQ 'Buddy' device
Usbhid daq is an open-source printed circuit board by shraken, from the shraken/usbhid_buddy repository on GitHub. It is a 4-layer board of 63.9 × 37.1 mm with 73 parts on 66 nets, routed with 1,042 tracks and 136 vias.
It is built around the C8051F380-GQ, 74AHC1G125GW and TLV5630IPW, with the TPS60241DGK, 23LC1024-I/ST and MCP1802T-3302I/OT among its other parts. Its parts include 17 resistors, 16 capacitors, 11 diodes, 8 ICs and 4 connectors.
Buddy is a free, open source, and low-cost data acquisition (DAQ) instrument. It has 8 configurable IO that can be configured for ADC, DAC, PWM, or counter operation. The device uses USB HID with a custom descriptor for communication with the hidapi library on the host system. The device can be configured as either a host polled or asynchronous update mode for maximum flexibility. Buddy works on linux, windows, and macOS systems.
Usage of docker is recommended for building the entire project. A CMakeList file is provided in the head directory to build the project and generate all support files (documentation, coverage reports).
docker build -t buddy_docker .
docker run -v /path/to/usbhid_buddy:/docker -it buddy_docker /bin/bashthis will launch a Docker bash shell and then you build.
cd /docker
mkdir -p build
cd build
cmake ..
makeThe firmware is written in C for the Silicon Labs C8051F380/EFM8UB2 chip and is in the fw directory. The
firmware requires a Keil C51 compiler to be used for building.
The open-source gboot bootloader written by Gabriele Gorla of gglabs (http://gglabs.us) is used for the buddy device.
The hardware is developed using the KiCad EDA tool. The manafacturing, source, and schematic files are provided in the hw/ directory.
The pin mapping for the standard Bus Pirate 10-pin harness is provided below:
| Color | Mapping | Pin # |
|---|---|---|
| Brown | IN7 | 2 |
| Red | GND | 1 |
| Orange | IN6 | 4 |
| Yellow | IN5 | 3 |
| Green | IN0 | 6 |
| Blue | IN4 | 5 |
| Purple | IN2 | 8 |
| Grey | IN1 | 7 |
| White | 3.3V | 10 |
| Black | IN3 | 9 |
The host software uses the free and open source hidapi library for driverless operation. The examples provided build with the hidapi libray itself and are tested on Linux, Windows, and mac OS systems.
For building the host examples, the hidapi submodule must be cloned with the following command:
git submodule update --init
or when cloning the buddy repo with:
git clone --recursive https://github.com/shraken/usbhid_buddy.git
The tests directory contains the unit tests. The Catch2 test
framework is used for all unit tests. To manually build and run the unit test, run the following:
cd tests/
mkdir -p build
cd build
cmake ..
make
./testLibBuddyThe build server runs gcov/lcov to generate the coverage figure. You can collect these results manually
by running the following (from the build directory in tests):
lcov -c -d CMakeFiles -out cov.info
genhtml cov.info -o out
open out/index.html| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | D_Schottky_x2_Serial_AKC | TO_SOT_Packages_SMD:SOT-23 | D4, D5, D6, D7, D8, D9, D10, D11 |
| 8 | TEST_1P | test_pads:TESTPAD_SMALL | W1, W3, W4, W5, W6, W7, W8, W9 |
| 6 | 10k | Resistors_SMD:R_0603_HandSoldering | R6, R7, R10, R15, R16, R17 |
| 6 | 1k | Resistors_SMD:R_0603_HandSoldering | R2, R3, R5, R8, R9, R14 |
| 5 | 100nF | Capacitors_SMD:C_0603_HandSoldering | C1, C3, C6, C7, C13 |
| 4 | 1uF | Capacitors_SMD:C_0805_HandSoldering | C2, C4, C5, C9 |
| 3 | 0R | Resistors_SMD:R_0603_HandSoldering | R4, R12, R13 |
| 2 | 0.1uF | Capacitors_SMD:C_0603_HandSoldering | C11, C16 |
| 2 | 1uF | Capacitors_SMD:C_0603_HandSoldering | C8, C14 |
| 2 | 74AHC1G125 | TO_SOT_Packages_SMD:SOT-353_SC-70-5_Handsoldering | U7, U8 |
| 2 | LED | LEDs:LED_0603 | D1, D2 |
| 2 | SKRKAEE010 | tacticle:SKRKAEE010 | SW1, SW2 |
| 1 | 0R_NM | Resistors_SMD:R_0603_HandSoldering | R11 |
| 1 | 100R | Resistors_SMD:R_0603_HandSoldering | R1 |
| 1 | 100nF | Capacitors_SMD:C_0603 | C12 |
| 1 | 10uF | Capacitors_SMD:C_0603_HandSoldering | C15 |
| 1 | 1206L050/15YR | Resistors_SMD:R_1206 | F1 |
| 1 | 23LC1024-I/ST | Housings_SSOP:TSSOP-8_4.4x3mm_Pitch0.65mm | U6 |
| 1 | 4.7uF | Capacitors_SMD:C_0603_HandSoldering | C10 |
| 1 | C8051F380 | Housings_QFP:LQFP-48_7x7mm_Pitch0.5mm | U2 |
| 1 | CONN_01X02 | Socket_Strips:Socket_Strip_Straight_1x02 | P1 |
| 1 | CONN_01X03 | Socket_Strips:Socket_Strip_Straight_1x03 | P2 |
| 1 | CONN_01X03 | Connectors_Molex:Molex_PicoBlade_53261-0371 | P3 |
| 1 | CONN_02X05 | Socket_Strips:Socket_Strip_Angled_2x05 | P4 |
| 1 | LTST-C195KGJRKT | led:LTST-C195KGJRKT | DN1 |
| 1 | MCP1802T-3302I/OT | TO_SOT_Packages_SMD:SOT-23-5 | U1 |
| 1 | MICRO-B_USB | usb:microb_usb_top_mount | USB1 |
| 1 | PRTR5V0U2X,215 | esd_protection:PRTR5V0U2X,215 | D3 |
| 1 | REF3325AIDBZR | TO_SOT_Packages_SMD:SOT-23 | U5 |
| 1 | TLV5630 | Housings_SSOP:TSSOP-20_4.4x6.5mm_Pitch0.65mm | U3 |
| 1 | TPS60241 | switching_charge_pump:VSSOP8-DGK | U4 |
The 69 most common of 73 parts.

shraken/usbhid_buddy
Hardware, firmware, and software for the USBHID DAQ 'Buddy' device

shraken/usbhid_buddy
Hardware, firmware, and software for the USBHID DAQ 'Buddy' device

shraken/usbhid_buddy
Hardware, firmware, and software for the USBHID DAQ 'Buddy' device


leafai-io/leaf-node-v3.x
Modular node for sensor monitoring and device control in grow environments.




gmaxdragon/Seizo-Noise
A massive PCB for a speaker for my robotic arm with a microphone built into it and a ton of other GPIO ports.

OrbitalCommons/gumstick
Gumstick: ESP32 + iCE40UP5K FPGA module (v1 DF40 board-to-board, v2 M.2 gold-finger draft) and its programming carrier. KiCad 10.

It measures 63.9 × 37.1 mm and has 4 copper layers, 1.6 mm thick.
73 parts, built around the C8051F380-GQ, 74AHC1G125GW, TLV5630IPW and TPS60241DGK. 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 shraken/usbhid_buddy repository on GitHub, at the commit this page was made from: the board is hw/v0.4/source/usbhid_daq.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Its repository states no licence, so its author keeps all rights: ask shraken before reusing the design.