Adjusting Vref In OnStep Mounts Via UART
Can Vref Be Set via UART on OnStep? An Exploration
Hello, Sam! It's fantastic that you're diving into the nitty-gritty of your Juwei 17 mount and looking to optimize its performance. Your question about adjusting the Vref (reference voltage) through UART (Universal Asynchronous Receiver/Transmitter) control on an OnStep-based system is a great one, and it touches upon a key area for fine-tuning the motor control of your mount. Let's break down this topic to understand how it works and what possibilities are available.
Firstly, what is Vref and why does it matter? In the context of your stepper motor drivers, Vref is essentially the voltage that sets the current limit for the motor coils. Think of it as a dial that controls how much power is delivered to the motors. The manufacturer of your Juwei 17 likely sets this value to a certain level to balance performance, heat generation, and motor longevity. However, as you rightly point out, this setting may not always be optimal for every mount or every situation. It might be set conservatively to ensure reliability across a broad range of user environments. By adjusting Vref, you can potentially increase the torque available from your motors, which can be particularly beneficial if you're using a heavier telescope setup or if you're experiencing issues like missed steps. However, there's a trade-off: increasing Vref also increases the current, which can lead to more heat and, if pushed too far, potential damage to the motor drivers.
Now, let's address your core question: Can Vref be changed via UART in an OnStep setup? The short answer is: it depends. The ability to adjust Vref through UART isn't a standard feature implemented in all OnStep configurations, but it's certainly within the realm of possibility. The key lies in the specific stepper motor driver chips used on your Juwei 17 board and how the OnStep firmware has been configured.
Many modern stepper motor drivers, like the popular DRV8825 or A4988, use a simple method to set the current limit. The Vref voltage is manually adjusted by a small potentiometer (a tiny adjustable resistor) on the driver board. In this case, there's no direct UART control over Vref; you'd need to manually adjust the potentiometer using a small screwdriver. However, some advanced drivers, and more sophisticated control systems, might offer a digital interface, including UART, that allows for remote adjustment of the current limit. This is often achieved through a digital-to-analog converter (DAC) that translates a digital value (sent via UART) into an analog voltage that sets the Vref. If your board uses such drivers, and if the OnStep firmware is programmed to support this functionality, then yes, you might be able to change Vref through UART. This would typically involve sending specific commands over the serial connection (UART) to the board. These commands would instruct the driver to set a new Vref value. You'd likely need to refer to the documentation for your specific motor driver chips and the OnStep firmware you are using to determine the exact commands and the supported range of Vref values. If your board uses drivers without digital control, then you won't be able to change Vref through UART. You must manually adjust the potentiometer on the driver board. Even in such cases, the OnStep firmware may still expose the Vref setting through the user interface, but this is merely for informational purposes and does not provide control capability.
To figure out what the situation is for your board, first identify the stepper motor driver chips used on your Juwei 17 board. You can usually find the chip's markings printed directly on the chip itself. Once you know the chip model, look up its datasheet online. The datasheet will provide detailed information about how to set the current limit (Vref). Next, check the OnStep firmware you're using. Reviewing the firmware configuration and documentation may provide insight into any implemented UART control features. You may need to modify the firmware or flash a new version to enable such functions. If you're comfortable with electronics and firmware modifications, you might even be able to develop your own custom firmware to enable UART control of Vref.
Investigating Juwei 17 Board and UART Control
Let’s get deeper into how you can practically approach modifying your Juwei 17 board. The first, and most crucial step, is to inspect the board itself. Physically examine the stepper motor driver chips. Are there tiny potentiometers near each of the driver chips? If so, this is a strong indication that Vref is set manually. If you see no potentiometers, look closely for any other components that might indicate digital control, such as a DAC chip. Next, check the connections to the motor drivers. Find out which pins of the microcontroller are connected to the motor driver’s “Vref” input. The specific details of the motor driver chips used on your board are extremely important. Download the datasheets and understand the current setting mechanism of each of them. Some drivers, such as the DRV8825, use a simple method. You measure the voltage on a specific pin (Vref) and use it to calculate the current limit. Others might be more complex, perhaps utilizing a digital interface. Knowing your driver chip is necessary for understanding whether UART control is an option.
Next, you have to explore the OnStep firmware. Does the OnStep firmware you are using already support the adjustment of Vref? Look into the firmware's configuration files, control options, and the general structure. You might find a setting or command related to Vref. This could involve modifying or adding code to the firmware. Familiarize yourself with the firmware's structure, including how it interacts with the stepper motor drivers. The OnStep project is open-source. Many users have likely explored similar modifications. Seek out relevant posts on forums or other online communities for OnStep or related projects. You might find other users who have already addressed the issue, or you can ask questions to get help.
If the drivers on your board don't support UART control, you'd need to modify your board to achieve UART control. This is much more challenging and requires a good understanding of electronics and microcontrollers. You'd need to design a circuit to convert UART commands into analog signals to control the Vref voltage of the drivers. This could involve adding a DAC chip and connecting it to the microcontroller on your board. Then, you'd need to modify the OnStep firmware to send commands via UART to control the DAC and adjust the Vref values.
Even if UART control isn't directly available, you might still want to monitor the motor current. This could provide insight into the performance of your mount and help you determine whether the current setting needs adjustment. Some OnStep configurations provide a way to monitor the motor current through the firmware. Use a multimeter to measure the current supplied to the stepper motors. This can give you direct feedback on how the motor is behaving. Carefully monitor the motor temperature while operating at different Vref settings. A hot motor may indicate that the current limit is too high, while a cold motor may indicate that it is too low.
Remember to proceed carefully and take safety precautions when working with electronics. Always disconnect the power supply from the board before making any adjustments or modifications. If you are not familiar with electronics, it might be advisable to consult with someone who is experienced in this area. Incorrect modifications could damage your board.
Troubleshooting and Further Steps
If you find that your board does support UART control of Vref, there are a few practical steps you should take to ensure that you get the most out of this adjustment. First, test the adjustment across the operational range. Carefully adjust the Vref through UART and observe how the motors behave. Start with small adjustments and monitor for any changes. Check the responsiveness of the mount, the smoothness of its movements, and the overall accuracy. If your mount shows signs of improved tracking, that suggests the adjustment is beneficial. Make sure to calibrate the mount after the Vref adjustment. Recalibrate the mount to ensure that the tracking accuracy is still optimal. When adjusting Vref, be careful about the motor temperature. Excessive current can cause the motors to overheat. If you notice a significant increase in the motor temperature after the adjustment, reduce the Vref. Check the manual of your mount for any specific recommendations about the Vref adjustment. Some manufacturers will provide a recommended range of Vref settings based on the size of the telescope and the type of motor used.
Document your changes and results. Note the original Vref settings and your adjustments, along with the impact on the mount’s performance. This documentation will be invaluable as you experiment and fine-tune your mount. If you're encountering any issues, here’s a quick troubleshooting guide. If the motor is missing steps, this is a sign that the current is too low. Increase the Vref slightly. If the motor is running hot, this suggests that the current is too high. Decrease the Vref. If the mount is vibrating, this could be a sign of a resonance problem or the need for fine-tuning the motor control. If you encounter any problems, always consult the documentation of your motor driver and the OnStep firmware. If you are not sure how to adjust the Vref, consult a more experienced user, as this could help you avoid potentially damaging the components.
Ultimately, the ability to control Vref via UART in your OnStep setup depends on the hardware (the motor driver chips) and the firmware (the OnStep implementation) on your Juwei 17 board. By carefully examining your board, researching the motor driver datasheets, and exploring the OnStep firmware, you can determine if this feature is available. If it’s not readily available, it might be possible to modify the firmware or board to achieve this functionality, but such modifications should be done with extreme care and appropriate experience. Remember to proceed cautiously, document your changes, and prioritize the safe and reliable operation of your mount. The goal is to optimize the mount's performance without compromising its longevity or safety.
For further reading and community support, consider checking out the OnStep Google Groups and related forums. You will find a wealth of information, from experienced users, as well as answers to questions that may arise during your experiments. These forums are a great place to ask questions and discuss modifications.
External Links:
- OnStep Google Groups: https://groups.google.com/g/onstep