loading

A Professional Manufacturer of Smart Interactive Screens For More Than 10 Years 

3dof ball on plate using closed loop stepper motors - touch screen history

3dof ball on plate using closed loop stepper motors  -  touch screen history

The on-board problem consists of a flat plate that needs to be placed.
The positioning of the ball can only be achieved by an unstable balance, in which any slight change in the angle of the plate causes the ball to accelerate continuously until it leaves the plate.
This system presents an interesting control problem because a closed loop control is required for stable ball positioning.
A good approximation method for controlling ball motion is to decoupling the x and y directions on the board.
This allows for two separate control loops.
A loop control x-
The position of the ball and the other control y-location.
Each control back route of the x-axis and y-axis consists of two parts;
Internal control loop and external loop.
The inner loop is responsible for running the stepping motor in the closed loop for angle control.
The motor angle is obtained by an orthogonal encoder on each step motor.
Provide the setting angle of the stepping motor from the outer ring, set the difference between the angle and the measuring angle to drive the speed of the stepping motor.
The actual ball position on the outer ring Control Board.
The input of the loop is the desired ball position and the feedback is the measured ball position.
Use 4-get the position of the ball
Wire resistance touch screen for ball rolling.
The difference and rate of change between the set position and the measured position determine the output angle input into the internal control loop.
Proportion of external control loop-derivative (PD)
The controller, and all that is needed for the inner loop is the proportional controller.
The output of the entire control system is the position of the ball on the board.
Control the position by adjusting the acceleration of the ball.
The acceleration of the ball is a function of the plate angle, and the plate angle is a function of the angle of the stepping motor.
Using a small angle approximation, a small change in the motor angle from the equilibrium state should result in a linear correlation change in the plate angle, resulting in a change in the acceleration of the ball.
Even at a larger angle, this basic approximation controls the ball well.
The design of the platform has three degrees of freedom.
The stepping motor adopts an equilateral triangle layout.
This configuration combines the x and y motion, but results in a simpler mechanical design to completely suppress the position of the platform.
The design also allows the platform to rotate around the position of the ball, not just the center.
This method should allow the ball to have more sudden acceleration changes, since the ball does not experience vertical displacement during the plate angle adjustment.
Currently, the platform is only programmed to rotate around the center.
The closed loop stepping motors are selected because they work with existing 3D printer electronics.
Adding feedback eliminates the inherent leakage problem of the stepping motor and allows for more precise microsteps with the control of the measuring angle, rather than the number of steps.
SolidWorks part models and drawings included are for reference only.
My purpose is to provide enough detail for someone to make a similar project, but not to make an accurate copy.
People should improve their design to suit their needs.
Generate machine code using the included SolidWorks Model and reference figure 1/4 "column.
The parts are cut using a 1/8 "two-slot carbide vertical mill" with a cutting depth of 1/2.
Machine code is generated using the included SolidWorks Model and reference drawing for 1/8 "aluminum sheet and acrylic sheet.
The parts are cut using a 1/8 "two-slot carbide vertical mill" with a cutting depth of 1/2.
A 1/8 carving position is used to cut the pattern on the top of the acrylic sheet.
When the completed item displays the revised kit, the motor arm and platform of the first version are displayed.
SolidWorks models for modifying parts are provided.
The control electronics consist of easily accessible parts: Arduino Mega 2560, ramp 1.
4 3D printer control boards and 3 DRV8825 stepper motor drivers.
These three stepping motors will be marked as A, B, and C.
Complete the ball position measurement using 8. 4 in. 4-
Wire resistance of touch screen.
The resident eTouch screen is an effective voltage divider that measures the x and y positions in sequence.
To get the location from the screen, 4 micro controller pins are required.
All bins must be bi-directional with low output impedance and high input impedance.
Two of these pins need to measure the analog voltage.
The top and bottom plates inside the touch screen are resistant and within the range of 1 k ohm, but when the screen is not touched, they are insulated from each other.
For X position measurement, two pins connected to the bottom of the screen are set to low impedance output.
One of the pins is set high and the other is set low.
This will generate potential at the bottom of the screen.
The pin connected to the top of the screen is set to a high impedance input and the analog value is recorded from one of the pins.
When the screen is now touched, the top of the screen is in contact with the bottom, generating a voltage divider and generating an analog voltage proportional to the touch position in the X direction.
The process is reversed to record the Y position of the touch.
Measurement is required only if the touch exists.
The third configuration is set to wait for the touch condition to enter the position measurement state only if the touch exists.
This is done by setting the top or bottom of the screen to the ground;
Set the connected pin to low output.
The other layer is connected to a high-impedance input with pull-up conditions on a connection pin.
Monitor the digital status of the pull-up pin until the touch on the screen pulls the layer low by connecting to another layer.
The stepping motor usually operates in an absolute way, tracking the number of steps sent to the motor to determine the movement of the motor.
This program has two unwanted qualities.
The most obvious thing is the loss.
If the motor encounters a load sufficient to stop motion, the actual position is lost because the steps of the command no longer match the position of the motor.
The less obvious problem is the generation and counting of motor steps when using microsteps at high speeds.
A typical stepping motor has 200 complete revolutionary steps.
If 32 micro-step controllers are used, this will translate into a complete revolution of 6400 steps.
When running the motor at 300 rpm, each motor requires an output of 32000 steps per second.
Running three motors will result in a logical change of almost 200 K per second.
Really do this
Time processing on 16 MHz 8-
The Bit micro-controller does not leave room for other tasks.
The solution is to uninstall the step generation to the hardware-level timer and compare registers when measuring motion directly using the encoder on the motor.
The closed-loop system can then be set and the input value represents the difference between the desired motor angle and the encoder measurement angle.
The output of the control loop will then set the RPM of the motor.
The required pulse sequence consists of three 16-
Bit hardware timer with three comparison registers.
The timer is set without pre-setting
Scaling produces a count rate of 16 MHz and resets when the count is equal to the comparison register.
Switch the corresponding output pin when the timer is reset to generate the pulse sequence required to move the stepping motor.
The frequency of the pulse sequence is set by the size of the comparison register and the rotation speed of the motor is determined.
The proportional output of the stepping motor control loop can now be entered into the comparison register to set the motor speed.
In this way, the generation of all stepping motor signals is done on the hardware level, allowing the micro-controller to freely complete other tasks. A proportional-derivative (PD)
In order to achieve the positioning of the nail ball, the control loop is realized.
An integral part was added but not needed.
The scale term in the control loop is only the difference between the instruction position and the measured ball position multiplied by the proportional gain.
The scale term causes the plate angle to move smoothly because the change in the position of the ball usually results in a large number.
This is not true when calculating a simple first-order derivative dx = [x(i)− x(i−1)]
/H, because the ball movement between the measurements is very small, the noise is relatively large.
Behavior can be improved by increasing the time between measurements, but the system response time becomes large.
The solution is to use more ball history to better predict the current speed.
A good approximation of ball motion is constant acceleration because the angle of the plate does not change drastically.
It is necessary to use only past measurements to predict the second-order exact template of the current derivative.
The template should have good noise suppression and time response behavior.
Pavel Holoborodko released such a list of templates for single-sided derivative estimation, from which a 16-point template was selected.
While maintaining a good system response time, the derivative obtained is much smoother than in simple cases.
The proportional and derivative components are added together so that the proportional partial tilt plate can accelerate the ball to the set position, and the derivative component tilt the plate to slow down the movement of the ball.
The size of each value can be set by adjusting the gain value until the system is severely dampened.
The platform angle representing the X and Y tilt needs to be converted into three stepping motor angles.
Project the x and y axes onto the three motor axes to determine the relative control weights.
This approach is only an approximation of the desired behavior, but can work as needed.
A consistent code execution rate is required.
This is done by using an interrupt routine that triggers every 1 ms from timer0.
Activate the code execution flag in the interrupt routine that allows different parts of the code to run.
The code requires several libraries, including: encoder, run median, run average, and PID.
Since the proportional part is used only for the angle control of the stepping motor, the PID library can be easily eliminated.
Initial calibration is required for the screen.
At the beginning of the code, you can enter the calibration value under "touch screen material.
Cancel the review "series. print(measured_x_pos)" and "Serial. println(measured_y_pos)
"Display the original screen reading at the bottom of the main loop.
Touch the screen at the sued position under the "touch screen material" section and enter the displayed value in the code.
After calibration, re-
Comment serial print.
During the operation, the value is adjusted using the orthogonal control knob.
The Arduino IDE serial monitor can be used to display values.
The first value shown is the main control loop time in the US.
The value should not exceed 5 MS as this is the call interval for the main loop.
Use the orthogonal button to advance to the next value.
The next three values are scale, derivative, and integral gain.
To achieve the desired tuning, these values can be adjusted using the knob.
The ball should quickly move to the set position with minimal overtones.
These values will be lost during the power cycle, so after tuning is done, they should be entered manually in the code.
Next you can adjust the offset values in the X and Y directions.
If the platform is not horizontal and integral gain is not used, the ball will be offset from the desired position.
When "0 mode" is set, change the offset value to center the ball on the platform.
Different ball patterns can be selected using the 8 patterns currently programmed using parametric equations.
The movement speed of the ball is also adjusted with the "pattern rate" variable;
The smaller number is equal to the faster movement of the ball.
The final value is the "pattern direction" that sets the direction of the ball's movement ".
The code provided is functional but is still in progress.
Improve and share at any time.
Don't forget to have fun!

GET IN TOUCH WITH Us
recommended articles
Knowledge INFO CENTER FAQ
The Future of Collaboration and Learning: Why Interactive Flat Panels Are a Game-Changer
In today’s fast-paced digital era, communication and collaboration tools have become more important than ever. From classrooms to boardrooms, the demand for smart, interactive technology is reshaping the way we learn, teach, and work. Among these innovations, interactive flat panels (IFPs) stand out as one of the most powerful solutions.
 Why Interactive Flat Panels Are Transforming Classrooms and Meeting Rooms
In today’s fast-paced digital world, communication and collaboration tools are more important than ever. Whether in a classroom or a corporate boardroom, Interactive Flat Panels (IFPs) are redefining how we share information, brainstorm ideas, and engage audiences.
Weatherproof & Brilliant: Why Choose Our Outdoor LCD Displays for Maximum Impact

In today’s fast-paced world, grabbing attention is more challenging than ever. Traditional advertising methods are no longer enough to stand out. That’s where Outdoor Digital Displays come in — delivering vibrant, dynamic content that captivates audiences in real time.

🔹 What Is an Outdoor Digital Display?
An Outdoor Digital Display is a weatherproof LED or LCD screen designed to operate in various environmental conditions — including sunlight, rain, wind, and extreme temperatures. These displays are commonly used in public spaces for advertising, wayfinding, and information broadcasting.
Unlock Engagement & Efficiency: The Power of Modern Indoor Digital Displays
In today's fast-paced, visually driven world, capturing attention and communicating effectively within your physical spaces is crucial. Static signs and printed posters simply can't keep up. That's where Indoor Digital Displays step in – transforming how businesses inform, engage, and influence audiences inside their walls.
The Future of Indoor Advertising: Why Digital Displays Are a Game-Changer
In today’s fast-paced world, businesses need innovative ways to capture attention and engage their audience. Traditional static signage is no longer enough—enter indoor digital displays, the modern solution for dynamic, eye-catching communication.
Revolutionize Your Work and Play with Our Portable Mobile Touch Screen
In today’s fast-paced, tech-driven world, flexibility and efficiency are no longer luxuries—they’re necessities. Whether you’re a digital nomad, a creative professional, or someone who values seamless multitasking, our Portable Mobile Touch Screen is designed to elevate your productivity and entertainment experience. Let’s explore why this innovative device deserves a spot in your tech arsenal.
Stop Wasting Budget on Outdated Tech: How Interactive Flat Panels Cut Costs by 40% in 3 Steps

In today’s fast-paced business and education landscapes, clinging to outdated technology like projectors, traditional whiteboards, or non-interactive displays isn’t just inefficient—it’s a financial drain. Studies show that organizations waste up to 15% of their annual IT budgets maintaining legacy systems, while struggling with compatibility issues, energy inefficiency, and productivity bottlenecks.

The solution? Interactive Flat Panels (IFPs). These smart displays aren’t just flashy upgrades—they’re proven cost-cutters. Here’s how to slash your operational expenses by 40% or more in just three actionable steps.
10 Hidden Features of Interactive Flat Panels You Didn’t Know Could Save Time & Money
Interactive Flat Panels (IFPs) have revolutionized classrooms, boardrooms, and collaborative spaces worldwide. While most users focus on their basic functions—touchscreen displays and presentation tools—these powerful devices are packed with underutilized features that can dramatically streamline workflows and cut costs. Below, we unveil 10 hidden gems that turn your IFP into a productivity powerhouse.
Interactive Flat Panel vs. Traditional Whiteboards: Which Saves More Time and Money?
In today’s evolving educational and corporate landscapes, choosing the right collaboration tool is critical. While traditional whiteboards have been classroom and boardroom staples for decades, interactive flat panels (IFPDs) are increasingly seen as the future of dynamic collaboration. But when it comes to saving time and money, which option truly delivers? Let’s break down the financial and operational impacts of both tools to help you decide.
How to Choose the Perfect Interactive Flat Panel: 7 Essential Factors for 2025
In today’s tech-driven world, interactive flat panels (IFPDs) have become indispensable tools for modern classrooms, boardrooms, and collaborative spaces. Whether you’re upgrading your office or building a smart classroom, selecting the right IFPD can transform productivity and engagement. Here’s a streamlined guide to help you make an informed decision:
no data
Established in Oct, 2016, focusing on the interactive high-tech products, specializing in the development of LCD touch screen monitor, interactive whiteboard, interactive learning software, infrared touch screen frame, interactive tablet … etc.
INFORMATION FOR INQUAIRY
Tel: +86 755 28281849
Wechat & whatsapp: +86 13582949978
Address:  Building #123, Mansheng Industrial District, Gongming Town, Guangming District, Shenzhen, China
Copyright © 2022 ITATOUCH| Sitemap
Customer service
detect