MustafaMulla29/rp2040-bldc-motor-controller

Hardware assembly metadata and PCB geometry for a controller board with a snap-off rotary-encoder section, plus four parallel 150 µF/50 V bulk electrolytic capacitors filtering the motor supply.

Version
2.0.40
License
unset
Stars
0

Use with the tscircuit CLI

tsci is the tscircuit CLI. Install it with npm install -g tscircuit.

tsci clone MustafaMulla29/rp2040-bldc-motor-controller  # download the package files into ./rp2040-bldc-motor-controller
tsci add MustafaMulla29/rp2040-bldc-motor-controller    # add it to your project as @tsci/MustafaMulla29.rp2040-bldc-motor-controller

In a cloned or new (tsci init) project: tsci dev starts a local preview, tsci build outputs Circuit JSON, and tsci push publishes to tscircuit.com.

dist/oled-shutdown-release/firmware.log

$ python3 -B -m unittest discover -s firmware -p 'test_*.py' -v
test_old_nvm_keeps_motor_off (test_diagnostic_lockout.DiagnosticLockoutTests) ... ok
test_runtime_corruption_keeps_motor_off (test_diagnostic_lockout.DiagnosticLockoutTests) ... ok
test_valid_pd_never_enables_motor (test_diagnostic_lockout.DiagnosticLockoutTests) ... ok
test_contact_bounce_returns_to_same_count (test_feedback.FeedbackTests) ... ok
test_direction_and_four_counts_per_cycle (test_feedback.FeedbackTests) ... ok
test_invalid_transition_does_not_invent_motion (test_feedback.FeedbackTests) ... ok
test_actual_board_and_mcf_bus_are_gated_by_runtime_profile (test_knob_app.AppTests) ... ok
test_board_pin_mapping_output_order_and_cleanup (test_knob_app.AppTests) ... ok
test_commissioned_entrypoint_drives_and_usb_stop_disarms (test_knob_app.AppTests) ... ok
test_fault_recovers_supervision_without_restart_or_timing_loop (test_knob_app.AppTests) ... ok
test_shipped_preview_entrypoint_cannot_enable (test_knob_app.AppTests) ... ok
test_adc_endpoints_deadband_and_monotonic_mapping (test_knob_control.KnobTests) ... ok
test_boot_with_held_arm_never_starts (test_knob_control.KnobTests) ... ok
test_button_bounce_does_not_arm_or_toggle_twice (test_knob_control.KnobTests) ... ok
test_fault_and_power_return_cannot_restart (test_knob_control.KnobTests) ... ok
test_filter_reduces_small_adc_jitter (test_knob_control.KnobTests) ... ok
test_gradual_increase_ceiling_and_immediate_zero (test_knob_control.KnobTests) ... ok
test_high_knob_rejects_arm_requires_fresh_press_at_zero (test_knob_control.KnobTests) ... ok
test_late_or_invalid_sample_disarms (test_knob_control.KnobTests) ... ok
test_second_press_disarms_without_waiting_for_knob (test_knob_control.KnobTests) ... ok
test_calibration_units_offsets_and_invalid_adc (test_knob_runtime.RuntimeTests) ... ok
test_each_power_fault_shuts_down_on_next_sample (test_knob_runtime.RuntimeTests) ... ok
test_invalid_profile_and_unprovisioned_pd_fail_before_drive (test_knob_runtime.RuntimeTests) ... ok
test_legacy_mct_register_fields_cannot_be_relabelled_as_mcf (test_knob_runtime.RuntimeTests) ... ok
test_mcf_bus_range_must_cover_every_qualified_voltage (test_knob_runtime.RuntimeTests) ... ok
test_missing_profile_previews_knob_but_never_enables (test_knob_runtime.RuntimeTests) ... ok
test_pd_mcf_exception_and_interrupt_fail_closed (test_knob_runtime.RuntimeTests) ... ok
test_power_loss_during_profile_read_is_resampled_before_arming (test_knob_runtime.RuntimeTests) ... ok
test_profile_mismatch_blocks_arm_and_rechecks_after_power_loss (test_knob_runtime.RuntimeTests) ... ok
test_slow_profile_read_trips_timing_and_leaves_pwm_zero (test_knob_runtime.RuntimeTests) ... ok
test_valid_profile_arms_zero_stops_and_requires_rearm_after_fault (test_knob_runtime.RuntimeTests) ... ok
test_voltage_selection_disarms_before_selector_and_checks_motor_range (test_knob_runtime.RuntimeTests) ... ok
test_busy_read_retries_address_without_resending_control (test_mcf8329.McfTests) ... ok
test_full_profile_and_rolling_verification_detect_drift (test_mcf8329.McfTests) ... ok
test_nacks_are_bounded_and_bus_is_released (test_mcf8329.McfTests) ... ok
test_read_only_allowlist_excludes_eeprom_commands (test_mcf8329.McfTests) ... ok
test_ti_read_frame_byte_order_ack_and_interbyte_delay (test_mcf8329.McfTests) ... ok
test_transfer_error_or_interrupt_always_releases_bus (test_mcf8329.McfTests) ... ok
test_busy_read_retries_address_without_resending_control (test_mct8329.MctTests) ... ok
test_full_profile_and_rolling_verification_detect_drift (test_mct8329.MctTests) ... ok
test_nacks_are_bounded_and_bus_is_released (test_mct8329.MctTests) ... ok
test_read_only_allowlist_excludes_eeprom_commands (test_mct8329.MctTests) ... ok
test_ti_read_frame_byte_order_ack_and_interbyte_delay (test_mct8329.MctTests) ... ok
test_ctrl_c_after_boost_enable_before_constructor_returns (test_oled_bringup.BringupTests) ... ok
test_ctrl_c_while_running (test_oled_bringup.BringupTests) ... ok
test_oled_nack_during_shutdown_still_disables_boost (test_oled_bringup.BringupTests) ... ok
test_pd_bus_error_after_initialization (test_oled_bringup.BringupTests) ... ok
test_pd_contract_lost_after_initialization (test_oled_bringup.BringupTests) ... ok
test_contract_lost_during_startup_disables_charge_pump (test_oled_ssd1306.OledTest) ... ok
test_contract_read_failure_after_start_disables_display (test_oled_ssd1306.OledTest) ... ok
test_controller_initialization_and_frame (test_oled_ssd1306.OledTest) ... ok
test_no_contract_never_enables_charge_pump_or_pixels (test_oled_ssd1306.OledTest) ... ok
test_expander_failure_is_reported_not_claimed_as_power_off (test_oled_ssd1309.OledTest) ... ok
test_hardware_reset_during_boost_settling_never_displays (test_oled_ssd1309.OledTest) ... ok
test_initial_expander_write_failure_still_attempts_cleanup (test_oled_ssd1309.OledTest) ... ok
test_interrupt_at_each_startup_delay_disables_boost (test_oled_ssd1309.OledTest) ... ok
test_lost_contract_before_display_on_disables_vcc (test_oled_ssd1309.OledTest) ... ok
test_no_pd_never_enables_vcc (test_oled_ssd1309.OledTest) ... ok
test_off_instance_cannot_resume_without_initialization (test_oled_ssd1309.OledTest) ... ok
test_oled_nack_does_not_prevent_boost_disable (test_oled_ssd1309.OledTest) ... ok
test_reset_between_preload_and_configuration_stays_off (test_oled_ssd1309.OledTest) ... ok
test_reset_during_runtime_requires_fresh_initialization (test_oled_ssd1309.OledTest) ... ok
test_sequence_and_native_i2c (test_oled_ssd1309.OledTest) ... ok
test_shutdown_order (test_oled_ssd1309.OledTest) ... ok
test_factory_runtime_profiles_and_corruption_rejected (test_pd_profile.PDProfileTests) ... ok
test_factory_to_9v_preserves_unrelated_fields (test_pd_profile.PDProfileTests) ... ok
test_partial_program_and_cold_start_without_runtime_writes (test_pd_profile.PDProfileTests) ... ok
test_power_only_pd_port_rejects_old_data_capability (test_pd_profile.PDProfileTests) ... ok
test_timeout_and_corrupt_write_release_test_mode (test_pd_profile.PDProfileTests) ... ok
test_20v_window_tolerates_cable_drop (test_power_policy.MotorPowerTests) ... ok
test_contract_loss_mismatch_and_insufficient_current (test_power_policy.MotorPowerTests) ... ok
test_off_fault_overcurrent_and_restart_require_arm (test_power_policy.MotorPowerTests) ... ok
test_stop_reason_names_the_u11_current_limit (test_power_policy.MotorPowerTests) ... ok
test_valid_9v_only (test_power_policy.MotorPowerTests) ... ok
test_board_pin_mapping_and_reset_off (test_status_led.StatusLedTest) ... ok
test_contract_loss_and_error_clear_ready_color (test_status_led.StatusLedTest) ... ok
test_absent_profile_fallback_and_stale_contract_time_out (test_voltage_selection.SelectionTests) ... ok
test_adc_dividers_have_20v_headroom (test_voltage_selection.SelectionTests) ... ok
test_all_profiles_read_back_and_leave_nvm_unchanged (test_voltage_selection.SelectionTests) ... ok
test_corrupt_profile_readback_never_sends_soft_reset (test_voltage_selection.SelectionTests) ... ok
test_failure_at_each_profile_write_keeps_selector_disarmed (test_voltage_selection.SelectionTests) ... ok
test_i2c_failure_leaves_disarmed (test_voltage_selection.SelectionTests) ... ok
test_low_voltage_and_current_stop_motor_not_restart (test_voltage_selection.SelectionTests) ... ok
test_motor_bus_becoming_live_aborts_negotiation (test_voltage_selection.SelectionTests) ... ok
test_no_writes_if_motor_bus_energized_or_setting_invalid (test_voltage_selection.SelectionTests) ... ok
test_pdo_wire_bytes_against_st_um2650_field_definitions (test_voltage_selection.SelectionTests) ... ok
test_profile_count_preserves_reserved_bits_and_reset_is_last (test_voltage_selection.SelectionTests) ... ok
test_source_3a_capability_accepts_2a_request_at_each_voltage (test_voltage_selection.SelectionTests) ... ok
test_successful_20_to_5_selection_never_arms (test_voltage_selection.SelectionTests) ... ok
test_unstable_contract_restarts_stability_timer (test_voltage_selection.SelectionTests) ... ok

----------------------------------------------------------------------
Ran 90 tests in 0.026s

OK
OLED shutdown failed: