diff --git a/elec/src/smart-knob.ato b/elec/src/smart-knob.ato index 2077f48..a4b8135 100644 --- a/elec/src/smart-knob.ato +++ b/elec/src/smart-knob.ato @@ -13,6 +13,7 @@ import VDiv from "generics/vdivs.ato" import Power from "generics/interfaces.ato" import Resistor from "generics/resistors.ato" import Capacitor from "generics/capacitors.ato" +import HalfBridge from "generics/mosfets.ato" module SmartKnob: base = new SmartKnobBase @@ -46,16 +47,20 @@ module SmartKnobBase: # BLDC CONTROLLER power_stage = new DRV8300 - # # power_stage.power_batt ~ usbc - # # power_stage.power_gate ~ - # # power_stage.power_vref = ~ - # # power_stage.enable.ic.io ~ + power_stage.power_gate ~ usbc.power #TODO: is 5V enough gate drive? + + ## CONTROL + power_stage.input_low_a.io ~ esp32s3.ic.IO15 + power_stage.input_high_a.io ~ esp32s3.ic.IO16 + power_stage.input_low_b.io ~ esp32s3.ic.IO17 + power_stage.input_high_b.io ~ esp32s3.ic.IO18 + power_stage.input_low_c.io ~ esp32s3.ic.IO35 + power_stage.input_high_c.io ~ esp32s3.ic.IO16 + + ## OUTPUTS + hba = HalfBridge - # # power_stage.phase_a ~ - # # power_stage.phase_b ~ - # # power_stage.phase_c ~ - # # power_stage.phase_a.gate_low # STRAIN SENSOR ## Resistor Wheatstone Bridge @@ -104,7 +109,7 @@ module SmartKnobBase: led1.power ~ usbc.power;led2.power ~ usbc.power;led3.power ~ usbc.power;led4.power ~ usbc.power;led5.power ~ usbc.power;led6.power ~ usbc.power;led7.power ~ usbc.power;led8.power ~ usbc.power;led9.power ~ usbc.power;led10.power ~ usbc.power; led1.dout~led2.din;led2.dout~led3.din;led3.dout~led4.din;led4.dout~led5.din;led5.dout~led6.din;led6.dout~led7.din;led7.dout~led8.din;led8.dout~led9.din;led9.dout~led10.din - # LCD CONNECTOR + #TODO: LCD CONNECTOR module SmartKnobScreen: lcd_power = new Power