On command, it will move the program counter to the start of the firmware code. This small system is primarily meant as a method to allow updates of the firmware without a programmer. When a board receives a packet, a small green LED will blink to indicate it has identified the message. This is designed to allow users to read/write variables as well as reprogram the board remotely. In both firmware and bootloader, the primary system is the communication code.
#CONTROL MOTOR DIRECTLY THROUGH BLDC TOOL MANUAL#
Memory is allocated primarily for firmware though two blocks are used to store the calibration and board id (refer to section 3.3 of reference manual for memory). To supplement missing features, the STM32 library has been included. The operating system allows for quick development and thread management which have been useful for this fast-paced project. This interfaces directly with the Recorder class in the firmware. These scripts start and read off an on-board buffer of the commutation at each control cycle. This is low frequency so use the recorder to get a better sense of the internal state of the motor driver. Plots the control target and the resulting quadrature/direct current commands. This script lets a user read from any of the sensors on-board the device. Description of what arguments each mode takes can be found with the '-h' option.Ĭontrol_motor.py 1,2,3 torque 0.5,0.25,0Ĭontrol_motor.py 1,2,3 current , A substantial starting point is 0.5 and increase above this with proper supervision! A negative command will reverse the direction. Use this script to spin a motor with a given current command. Modify the contents of the script to adjust tunings! Run this script after there's a calibration on the board.
#CONTROL MOTOR DIRECTLY THROUGH BLDC TOOL UPDATE#
Update Motor Calibration Constants (PID and Limits)
To calibrate the motor board, a motor must first be attached without a load for optimal calibration. Most scripts have been fitted with argparse which will give a description of the arguments when given the '-h' option. They interface using our custom communications protocol. They can debug, program, and run the boards. These scripts are made to remotely interface with the boards. (when running the arm, this is done automatically by the ROS control stack) Python Scripts Cat /sys/bus/usb-serial/devices/ttyUSB /latency_timer