Tumgik
bitfoiceletronic · 8 months
Text
Make your 3D printer quiet---silent stepper driver chip TMC2130TMC2208
3D printing (3DP) is a type of rapid prototyping technology. It is a technology that uses adhesive materials such as powdered metal or plastic to construct objects by printing layer by layer based on digital model files. One form of the final product is created through additive manufacturing technology, where successive layers of material are given a form to create a three-dimensional object. This process is often called "rapid prototyping" because it quickly builds the final physical product, or prototype, that goes into design. The printer takes digital data from a computer-aided design (CAD) program, 3D graphics or animation software, scans and opens the final product into a usable physical model.
Traditional stepper motor drivers are noisy and are not suitable for the user experience of desktop devices. Another problem is that conventional stepper motor drivers have jitter problems, especially at low speeds. The jitter passes through the timing belt. Faults will appear in the quality of the final print. The stability and operating accuracy of the stepper motor directly affect the performance of the 3D printer.
Conventional stepper motor drives cannot solve the noise and jitter problems
The reasons are as follows
The vibration of the stepper motor mainly comes from two aspects: one is the step resolution (step step) of the stepper motor; the other is the undesirable mode response from chopping and pulse width modulation (PWM).
Of course, the step angle and subdivision of the stepper motor will affect the vibration of the motor, but in this article we will not talk about the factors of subdivision and motor step angle, because these two factors cannot completely solve the vibration of the stepper motor, but only improve it. .
Another source of noise and vibration is the traditional chopping method and pulse width modulation (PWM) mode. Since the relatively coarse step resolution is the main factor in generating vibration and noise, we usually ignore the effects caused by chopping and PWM. question.
The traditional constant PWM chopper mode is a current-controlled PWM chopper mode. This mode has a fixed relationship between fast decay and slow decay. At its maximum value, the current will reach the specified target current, which ultimately results in The average current is smaller than the expected target current. In a complete electrical cycle, when the current direction changes, there is a smooth transition period at the zero crossing of the sine wave. This will affect the current in the coil to be zero within a short transition period. That is to say, the motor has no torque at all at this time, which causes the motor to swing and vibrate, especially at low speeds.
Compared to the constant chopper mode, TRINAMIC's SpreadCycle PWM chopper mode automatically configures a hysteresis attenuation function between slow and fast attenuators. The average current reflects the configured normal current and there is no transition at the zero crossing point of the sinusoid. period, this reduces the fluctuations of current and torque, making the current waveform closer to a sine wave. Compared with the traditional constant chopper mode, the motor controlled by the SpreadCycle PWM chopper mode runs much more smoothly.
This is very important when the motor goes from standstill or low speed to medium speed.
In traditional stepper motor drive solutions, there will be an excess current, or current dead zone, when the current crosses the zero point. At this time, there is no current in the motor coil. This is a major factor causing motor vibration.
Trinamic is a global leader in embedded motor and motion control. Main products include dedicated motion control integrated chips, intelligent motor drivers and embedded microsystems. Trinamic's engineers have decades of experience solving real-world problems, designing solutions for areas such as 3D printing, desktop manufacturing, medical devices, laboratory automation and surveillance cameras. [email protected] trinamic has developed a patented technology spreadcycle to ensure a smooth transition of stepper motors without dead zone current when crossing zero. Using its TMC2100, TMC2130, and TMC2208 stepper motor driver chips, there is almost no jitter. The video below is an analysis of its technology
How to make a stepper motor completely silent?
SpreadCycle
Although high subdivision can solve the low-frequency vibration in most cases; advanced current control PWM chopper mode such as TRINAMIC's SpreadCycle algorithm, these functions in hardware greatly reduce vibration and jitter, which also satisfies most requirements. It is also suitable for high-speed motion applications. However, there will still be audible noise and vibration in the chopper mode based on current control, mainly due to the desynchronization of the motor coil, the adjustment noise of a few millivolts on the sense resistor and the PWM time base. Errors, these noises and vibrations are not allowed in some high-end applications, slow running or medium-speed motion applications, and any noise and situations where noise is not allowed.
TRINAMIC's StealthChop algorithm is also implemented through hardware, fundamentally making the stepper motor silent. But how does the Stealthchop function affect the stepper motor? Why does the motor not produce noise and vibration? Stealthchop uses a voltage modulation mode based on current feedback. For example, SpreadCycle has a completely different approach. Instead, it uses a new technology based on voltage chopper mode, which ensures silent and smooth motion of the motor.
TMC5130 - a small, compact stepper motor drive control chip with StealthChop mode. TRINAMIC has improved the modulation mode. In order to minimize the impact of current fluctuations on dynamic performance, TMC5130 uses current feedback to control voltage modulation, which Allows the system to adapt to the parameters and operating voltage of the motor. Small oscillations caused by the direct current control loop algorithm are eliminated.
Figure 10 and Figure 11 show Stealthchop in voltage control mode and SpreadCycle in current control mode.
The zero-crossing effect in StealthChop mode is perfect: when the current signal changes from positive to negative or negative to positive, there will be no transition area but a continuous crossing of zero. Because the current is modulated according to the PWM duty cycle It is controlled by Ratio. At 50% PWM duty cycle, the current is 0. StealthChop adjusts the PWM duty cycle to adjust the motor current. The PWM frequency is a constant. In contrast, the current-controlled chopper adjusts the motor by regulating the frequency. Current, the fluctuation of current here is relatively large. In addition, the fluctuation of current will generate eddy current in the permanent magnet rotor of the motor, which will lead to the loss of power consumption of the motor.
The sound emitted by these PWMs with changing frequencies is within the audible range and will emit a hissing sound, and the electronic stator will produce greater noise due to magnetostriction, which will in turn cause vibrations in the mechanical system. StealthChop A fixed chopping frequency will not have these problems. There is no change in chopping frequency except the change of the microstrip phase sequence distributor when the motor is running.
In addition to the unavoidable sound of the friction of the steel balls in the motor bearings, StealthChop can drive the motor to work at an extremely fine sound, and can control the motor sound below 10dB decibels, and the noise is much lower than the traditional current control method. We It is known from physics that a 3dB decibel reduction will reduce the noise level by half. The following video is a performance comparison of TRINAMIC products TMC2100, TMC2130 and A4988
What has changed for stepper motors?
Nowadays, the stepper motor is still a very economical motor. It has been used for many years and still uses the same materials, production processes and assembly techniques as before.
But compared to the past, stepper motors are now driven by simpler control units, more advanced algorithms and more highly integrated microelectronics, allowing the original motor to unleash greater potential. There is more information in the drive circuit close to the motor It is acquired and processed in the drive current in real time to optimize motor control. StealthChop is a perfect example. Its algorithm is closely related to PWM chopper. In addition, this information can also be fed back to the higher application control layer, while traditional All of TRINAMIC's stepper drive solutions are one-way (pulse/direction), and all TRINAMIC's intelligent stepper motor drive solutions are two-way communication. These interfaces can also monitor different statuses and diagnostic information. This can increase the reliability of the system and provide system performance.
StealthChop silent drive technology is very suitable for 3D printing, desktop CNC, high-end CCTV, in vitro diagnostic equipment, medical testing equipment, etc.
0 notes
bitfoiceletronic · 1 year
Text
An introduction of a simple intelligent robot design and application
With the continuous development of microelectronics technology, the integration level of microprocessor chips is getting higher and higher, and single-chip microcomputers can already integrate CPU, memory, timer/counter, parallel and serial interfaces, watchdog, front-end It is easy to combine computer technology with measurement control technology to form a so-called "intelligent measurement control system". This impels robot technology to also have developed by leaps and bounds, and now people can design and manufacture simple and easily intelligent robots with some special functions fully.
  Design thinking and overall plan
 1.1 Design idea of simple intelligent robot
 The robot can walk along the guideline in any area, automatically bypass obstacles, and can walk along the light source under the guidance of the light source. At the same time, it can detect metal pieces buried in the ground, send out sound and light indication information, and can store and display the number of detected metal pieces and the distance between each metal piece and the starting line in real-time, and can stop at a designated place to display the entire operation process.
 1.2 Overall Design Scheme and Block Diagram
 This design uses AT89C51 single-chip microcomputer for detection and control. Infrared photoelectric sensors are used to detect black lines and obstacles on the road, metal sensors are used to detect metal iron sheets under the road, photoelectric code discs are used to measure distances, photoresistors are used to detect and judge the location of garages, and PWM technology is used to dynamically control the rotation direction and speed of motors. Through software programming, the control of the robot's travel, obstacle avoidance, and stop, as well as the storage and display of detection data are realized. We maximize the use of all the resources of the 51 single-chip microcomputers by optimizing the combination of the circuit. Port P0 is used for digital tube display, port P1 is used for PWM drive control of the motor, and ports P2 and P3 are used for data acquisition and interrupt control of sensors. The advantage of doing this is obvious: the internal resources of the one-chip computer are fully utilized, and the cost of the overall design is reduced.
Tumblr media
    2 The hardware composition and principle of the system
 The hardware part of this system is composed of a single-chip microcomputer unit, sensor unit, sensor unit, power supply unit, sound and light alarm unit, keyboard input unit, motor control unit, and display unit.
  2.1 SCM unit
 This system uses AT89C51 single-chip microcomputer as the central processing unit. His main task is to scan the signal input by the keyboard to start the robot, continuously read the data collected by the sensor during the walking of the robot, process the obtained data, and generate PWM pulses with different duty ratios according to different situations to control the motor At the same time, the relevant data is sent to the display unit for a dynamic display, and an audible and visual alarm signal is generated. Among them, the P0 port is used for digital tube dynamic display, P1.0~P1.5 controls two motors, P1.6 and P1.7 are independent keyboard interfaces, the P2 port is connected to a sensor, P3.2 is connected to photoelectric code for mileage Disk, P3.7 is connected to the sound and light alarm unit, P3.4, P3.5, P3.6 are connected to light-emitting diodes for displaying the number of metal sheets.
    2.2 Motor control unit
 This robot uses a dual-motor dual-wheel-driven trolley as its base. His two motors independently control the wheels on the left and right sides, and the turning function is realized by the difference in the speed of the motors on both sides, and it can also be turned on the spot, which is easy to control. However, the traditional trolley is driven by a power motor and a steering motor, and the turning angle is difficult to control, which is inconvenient to use.
The motor control circuit adopts an H-type drive circuit composed of high-power paired tubes BD139 and BD140, and the single-chip microcomputer generates PWM pulses with different duty ratios to adjust the motor speed. Since this circuit works in the saturated or cut-off state of the transistor, it avoids the tube consumption of the transistor when working in the linear amplification region, and can maximize the efficiency; the H-type circuit ensures that the motor speed and direction can be controlled simply; The speed and stability of the switch can also fully meet the needs, and the whole set of drive circuit is a widely used motor drive technology.
  2.3 Sensor unit
 The entire robot uses a total of 9 sensors, which are distributed in different parts of the entire robot and cooperate with each other to play different roles.
  Each sensor is described as follows:
 Sensor 1 The metal detection sensor placed directly in front of the robot and facing down is used to detect metal.
  Sensor 2 is an ultrasonic sensor placed directly in front of the robot to detect obstacles. The ultrasonic wave generates a 40 kHz square wave signal at 555, which is sent out through the ultrasonic transmitter. The transmitting head sends out signals continuously. When encountering an obstacle, the signal will be reflected back, so that the receiving head will receive the signal and send the signal to the microcontroller for corresponding judgment and processing.
  Sensor 3 An infrared photoelectric sensor placed directly in front of the robot and facing down, used to detect the stop line. The signal sent out by the infrared transmitting tube is reflected by different reflective media, and a corresponding judgment is made according to whether the infrared receiving tube receives the signal.
 Sensors 4 and 5 are infrared photoelectric sensors placed under the base of the robot and are used to detect the guiding lines on the ground. The principle is the same as that of sensor 3.
 Sensors 6 and 7 are the photoresistive sensors placed directly in front of the robot to find the light source. When there is a light source in front of the robot, the size of the photoresistor will change. After comparing the changes of the two sensors, they will be sent to the single-chip microcomputer, and the single-chip microcomputer will generate a corresponding adjustment signal to make the robot walk in the direction of the light intensity.
 Sensor 8 The ultrasonic sensors placed on both sides of the rear of the robot facing outwards are used for turning when the robot encounters an obstacle and judging whether the robot completely bypasses the obstacle. The principle is the same as that of sensor 2.
 Sensor 9 The photoelectric code disc placed directly behind the robot is used for mileage measurement. With the help of the mouse principle, he selected a small plastic wheel with a diameter of 2.6 cm to make a self-made photoelectric code disc. After polishing, the circumference was 8 cm, and then Punch 8 equidistant holes on the small wheel, the distance measurement accuracy can reach 1 cm, which is enough to meet the requirements, and the photoelectric sensors are installed on both sides, and they are installed at the rear of the vehicle to make it consistent with The driving of the car is synchronized. According to the actual situation, the distance between the self-made holes cannot be equal, but after specific measurement, the photoelectric code disc can ensure that 50 pulses can be generated when driving 50 cm, so it is used as the reference unit for calculating the distance. In the straight track area, the distance from the center line of the iron sheet to the starting line can be calculated from the number of pulses generated by the circuit.
  In addition, in order to clearly and intuitively observe the working status of each sensor, a working indicator light is specially designed for each sensor in the circuit to display the working status of each sensor in real time.
0 notes
bitfoiceletronic · 1 year
Text
How to use LM358 to design a single power supply circuit?
LM358 is a dual-operational amplifier with a wide range of applications. It has the advantages of a low price and a wide voltage range. A single-power-to-dual-current circuit composed of LM358 The single-power-to-dual-current circuit composed of operational amplifiers is shown in the figure below, which can convert 40V DC voltage into ±15V DC voltage. When the load current is 200mA, the voltage stability is not less than 0.1%. The circuit consists of a voltage divider, a voltage follower, and a shunt regulator. R1, Rw, and R3 form a voltage divider, which divides the 40V DC, take it out from the Rw boom and sends it to the non-inverting input of the op-amp. Since the inverting input terminal of the operational amplifier is connected to the ground wire, the operational amplifier forms a voltage follower circuit through the b-e junction of VT1 and VT2. VT1 and VT2 are -15V and +15V voltage regulator tubes respectively. The voltage drop generated by the op-amp output on R3 is used as the emitter junction bias voltage of VT1 and VT2 so that VT1 and VT2 are in the conduction state, and the positive and negative voltage of the output can be adjusted by adjusting the boom of RW. When using this circuit, the input DC power supply must be suspended, that is, neither end can be grounded.
Tumblr media
0 notes
bitfoiceletronic · 1 year
Text
PNP VS NPN: Working principle
The triode is the most important device in an electronic circuit, and its main function is current amplification and switching.
There are two types of triodes: germanium tubes and silicon tubes. Each of them has two structural forms, NPN and PNP, but the most commonly used transistors are silicon NPN and PNP. Both of them have the same working principle except for the polarity of the power supply.
The common triodes are 9012, s8550, 9013, bd140 and s8050. The main function of the triode in the single-chip microcomputer application circuit is the switching function. Among them, 9012 and 8550 are pnp transistors, which can be used universally. Among them, 9013 and 8050 are npn type transistors, which can be used universally.
The NPN transistor consists of two N-type semiconductors and one P-type semiconductor, with the P-type semiconductor in the middle and two N-type semiconductors on both sides.
The PNP-type transistor is a transistor composed of two P-type semiconductors sandwiching an N-type semiconductor, so it is called a PNP-type transistor. It can also be described as a triode where current flows from the emitter E.
The working principle of the triode
The principle of the triode has three working states: cut-off, amplification, and saturation. The enlarged state is mainly used in analog circuits, and the usage and calculation methods are relatively complicated, so we will not use it temporarily. The digital circuit mainly uses the switching characteristics of the triode, and only uses the two states of cut-off and saturation.
What we generally call an ordinary triode is a device with current amplification. Other triodes also extend their functions based on this principle. The structure and symbol of the triode are shown in the figure below.
Tumblr media
NPN and PNP are mainly different in the direction of current and the positive and negative voltage.
 Here we take the NPN triode as an example to explain its working principle.
Tumblr media
 It is a device that drives the current Ic flowing through ce with b (base) current Ib, and its working principle is very similar to a controllable valve.
Tumblr media
   The small blue water flow impulse lever in the thin tube on the left widens the valve of the large water pipe, allowing a larger flow of red water to pass through the valve. When the blue water flow is larger, the red water flow in the large pipe is also larger. If the magnification is 100, then when the small blue water flow is 1 kg/hr, then the big pipe is allowed to flow 100 kg/hr of water. Similarly, when the magnification of the triode is 100 and Ib (base current) is 1mA, a current of 100mA is allowed to pass through Ice. The working principles of the two triodes are summarized as follows: the emitter (e) of the NPN is grounded, the collector (c) is connected to a high level, the base (b) is connected to the control signal, and the current (Ib) of b-e is used to control the current of c-e (Ic ), the potential of the e pole is the lowest, and the potential of the c pole is usually the highest during normal amplification, that is, Vc > Vb > Ve. The triode is turned on, and the current flows from the c pole to the e pole. The emitter (e) of PNP is connected to the high level, the collector (c) is connected to a low level, the base (b) is connected to the control signal, and the current (Ib) of e-b is used to control the current (Ic) of e-c, and the potential of e-pole is the highest, and the c-pole potential is usually the lowest during normal amplification, that is, Vc < Vb < Ve. The triode is turned on, that is, the current flows from the e pole to the c pole.
 2. How to use triode?
The usage characteristics of the triode, the key point is the voltage between the b pole (base) and the e level (emitter). For PNP, the e pole voltage is only 0.7V higher than the b level. There is smooth conduction between stages. That is, the controlling end is between b and e, and the controlled end is between e and c. Similarly, the turn-on voltage of the NPN transistor is 0.7V higher than the b pole than the e pole. This is the explanation of "the conduction voltage passes along the arrow, and the voltage conducts". Let's take a common control LED circuit as an example to illustrate the working state of cut-off and saturation. As shown in the figure below, the base of the triode is connected to an IO port of the microcontroller through a 10K resistor, assuming it is P1, the emitter is directly connected to the 5V power supply, the collector is connected to an LED, and a 1K current limiter is connected in series The resistor is finally connected to the negative GND of the power supply. If P1 is given a high level 1 by our program, then the base b and the emitter e are both 5V, that is to say, there will be no 0.7V voltage drop from e to b. At this time, the emitter and the collector will also It will not be turned on, so the circuit is disconnected at the triode when viewed vertically. If there is no current passing through, the LED will not light up. If the program gives P1 a low level of 0, then the e pole is still 5V, so there is a voltage difference between e and b, and the transistors e and b are also turned on, and there is about 0.7V between the transistor e and b The voltage drop, then there is a voltage of (5-0.7) V across the resistor R47. [Note] The output high level of the P1 port here is 5V, and the high-level output voltage of the IO port of different single-chip microcomputers is different. The IO output of some single-chip microcomputers is 1.2V, which requires triode amplification to drive LEDs, etc Work.
Tumblr media
  At this time, the connection between e and c will also be turned on, so the LED itself has a voltage drop of 2V, and the triode itself has a voltage drop of about 0.2V between e and c, which we ignore. Then there will be a voltage drop of about 3V on R41, and it can be calculated that the current of this branch is about 3mA, which can successfully light up the LED. As mentioned earlier, the triode has three states: cut-off, amplification, and saturation. Needless to say, the cut-off is as long as there is no conduction between e and b. We want this triode to be in a saturated state, which is what we call switching characteristics, and a condition must be met. The triode has an amplification factor β. To be in saturation, the b-pole current must be greater than the current value between e and c divided by β. This β can be considered to be about 100 for commonly used triodes. Then we have to calculate the resistance value of R47 above. Just now we calculated that the current between e and c is 3mA, then the minimum current of the b pole is 3mA divided by 100 equals 30uA, about 4.3V voltage will fall on the base resistor, then the maximum value of the base resistor is 4.3V/ 30uA = 143K. As long as the resistance value is smaller than this value, it is fine. Of course, it can’t be too small. Too small will cause the IO port current of the microcontroller to burn out the triode or the microcontroller. The maximum theoretical value of the input current of the IO port is 25mA. I recommend not exceeding 6mA. By calculating the voltage and current, the minimum resistance value can be calculated.
You may like: BD140 PNP Transistor Pinout
1 note · View note