add scripts

This commit is contained in:
2024-02-28 15:33:58 -05:00
parent 0efe375e0a
commit 5869772066
4 changed files with 46 additions and 0 deletions

View File

@@ -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).

12
scripts/dependencies.sh Executable file
View File

@@ -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

View File

@@ -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)

View File

@@ -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)