add scripts
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
[](https://github.com/VIPQualityPost/lemon-pepper-stepper/actions/workflows/design.yml)
|
||||||
|
[](https://github.com/VIPQualityPost/lemon-pepper-stepper/actions/workflows/documentation.yml)
|
||||||
|
|
||||||
# Lemon Pepper Stepper Driver
|
# 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.
|
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).
|
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
12
scripts/dependencies.sh
Executable 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
|
||||||
20
scripts/jlc_bom_formatter.py
Normal file
20
scripts/jlc_bom_formatter.py
Normal 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)
|
||||||
11
scripts/jlc_cpl_formatter.py
Normal file
11
scripts/jlc_cpl_formatter.py
Normal 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)
|
||||||
Reference in New Issue
Block a user