diff --git a/README.md b/README.md index ed3617a..416d312 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![Hardware Design](https://github.com/VIPQualityPost/lemon-pepper-stepper/actions/workflows/design.yml/badge.svg?branch=main)](https://github.com/VIPQualityPost/lemon-pepper-stepper/actions/workflows/design.yml) +[![Assembly Documentation](https://github.com/VIPQualityPost/lemon-pepper-stepper/actions/workflows/documentation.yml/badge.svg)](https://github.com/VIPQualityPost/lemon-pepper-stepper/actions/workflows/documentation.yml) + # Lemon Pepper Stepper Driver Small, all in one hybrid stepper + BLDC driver, designed to mount to the back of NEMA 14/17 size stepper motors. The board supports up to 48V @ 1.5A with a choice of either step-dir, CAN bus, I2C, UART or USB input. Additionally, there are 5 GPIO broken out that can be used for a second encoder (AB hardware encoder or I2C), endstops or other general purposes. Current sensing is also included on-board. The boards can easily be assembled by JLC and the design has been cost-optimized, coming in at about $20 per board fully assembled (minus connectors, which need to be modified to sit flat on motor back). diff --git a/scripts/dependencies.sh b/scripts/dependencies.sh new file mode 100755 index 0000000..4e6a4a7 --- /dev/null +++ b/scripts/dependencies.sh @@ -0,0 +1,12 @@ +#!/bin/bash +set -e +set -v + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + +sudo add-apt-repository --yes ppa:kicad/kicad-8.0-releases +sudo apt-get update -qq +sudo DEBIAN_FRONTEND=noninteractive apt install --install-recommends kicad kicad-packages3d- kicad-demos- +sudo DEBIAN_FRONTEND=noninteractive apt install python3 pip + +sudo python3 -m pip install pandas \ No newline at end of file diff --git a/scripts/jlc_bom_formatter.py b/scripts/jlc_bom_formatter.py new file mode 100644 index 0000000..6a6258d --- /dev/null +++ b/scripts/jlc_bom_formatter.py @@ -0,0 +1,20 @@ +import pandas as pd +import os, sys, csv + +def footprintFix(fpName): + propertiesList = fpName.split('_') + + if len(propertiesList) == 4: + if any(rcl in propertiesList[0] for rcl in ["Resistor", "Capacitor", "Inductor", "Diode"]): + # For things like R/C/L, return something like C0402 + return propertiesList[1][-1] + propertiesList[2] + + # Strip out library name from FP. + return fpName.split(":")[-1] + +bom_file = pd.read_csv(sys.argv[1]) + +bom_file.columns = ['Designator', 'Value', 'Footprint', 'JLCPCB'] +bom_file['Footprint'] = bom_file['Footprint'].apply(lambda x: footprintFix(x)) + +bom_file.to_csv(sys.argv[2], index=False) diff --git a/scripts/jlc_cpl_formatter.py b/scripts/jlc_cpl_formatter.py new file mode 100644 index 0000000..ab3cb60 --- /dev/null +++ b/scripts/jlc_cpl_formatter.py @@ -0,0 +1,11 @@ +import pandas as pd +import os, sys, csv + +cpl_file = pd.read_csv(sys.argv[1]) + +cpl_file.columns = ['Designator', 'Val', 'Package', 'Mid X', 'Mid Y', 'Rotation', 'Layer'] +cpl_file = cpl_file.reindex(columns=['Designator', 'Mid X', 'Mid Y', 'Layer', 'Rotation']) +cpl_file.drop([0,1,2,3,4,5]) +cpl_file['Layer'] = "T" + +cpl_file.to_csv(sys.argv[2], index=False)