Contributing Member friquant Posted May 25 Contributing Member Report Posted May 25 Industrial AC Servo Drive with RS485 and Absolute Position Encoder As @brongle suggested, I did become interested in trying out a general purpose industrial servo motor. See his post on how to buy a a general purpose servo: https://leatherworker.net/forum/topic/133033-juki-lu-562-servo-install-tune-up-and-a-few-questions/page/2/#findComment-793232 Mine is to the point of being able to programmatically run the motor at a specified speed. Here is a snippet of code that programmatically increases the motor speed a little at a time. This code is used in the video that follows. float speed; while (true){ speed = 1.0; // RPM sleep_ms(1000); while (speed < 500.0){ speed *= 1.05; // Gradually faster and faster // Speed must be a whole number, so casting as uint16_t modbus_write_param(motor_speed, (uint16_t) speed); sleep_ms(100); } modbus_write_param(motor_speed, 0); } 0922-five-percent-incrementsquietsmall.mp4 Note the original unit came with 24V, 0.1A cooling fan but I found the sound of the fan to be a drag, so I’ve removed the fan for your listening pleasure (and mine!) What is the Product This link appears to represent the product that I bought: https://www.hlt-cnc.com/motor-and-driver/absolute-value-servo-driver.html “Absolute Value Servo Driver” “T3D is an economical absolute magnetic encoder servo driver that supports flexible switching between three basic control modes: position, speed, and torque. Suit for application scenarios requiring high precision in motor position, speed, and torque control. Equipped with dual DSP/ARM processors for full digital control, it boasts the advantages of precise positioning, stable and reliable performance. Meanwhile, its fully sealed design enables it to adapt to harsh industrial environments.” Where I Purchased I ordered the 400W version of this. (Same one that brongle bought, except his is the 750W) https://www.amazon.com/T3DL-V30A-Plug-N-Play-Industrial-Automation-Resistors/dp/B0DRRR37V9 110V input 400W version is $136 + tax (this is what I bought) 750W version available for $168 + tax Model Numbers These are the model numbers written on the side of the respective pieces: CONTROLLER model: HL-T3DL-V20A-RABF-B max_amps: 10 MOTOR model: 60AST-A1C01330-110V power: 0.4kW torque: 1.27Nm amps: 4.1 IP: 65 Manuals If you send a message to the amazon seller, they can provide the two manuals that you need. (The modbus manual I got from the seller is better formatted than what I found online.) The other option is to do an internet search for the part numbers, which are displayed on the outside of the motor and controller. Controller Manual Modbus Manual Both of those manuals are visible from this site: https://www.hlt-cnc.com/download But I also provided the full links to them because it was not obvious to me that it would be split into two manuals. (One for the controller, the other specifically about how to communicate with their many products over MODBUS.) My Intentions There are at least three ways to control this servo: Provide an analog signal to set the speed you want at any moment Use the menu to configure up to eight pre-programmed speeds, then trigger those speeds using external switches Write the desired speed to the RS-485 MODBUS in real time. (Technically: enable one of the pre-programmed speeds, but overwrite the value of that parameter in response to the gas pedal.) My intention is to use option C. For a gas pedal I’m connecting to an air pressure sensor similar to what @Gymnast did in these topics: https://leatherworker.net/forum/topic/85494-speed-control-by-pedal-force-or-movement/ https://leatherworker.net/forum/topic/120775-diy-servo-motor-with-wide-speed-range/ To read the air pressure sensor and compute a desired speed I’m using an ESP32 microcontroller. Planning to use a plain motor drive belt (not a timing belt). Not planning any needle positioner functions. Just want an easy-to-control motor that takes a speed command and produces whatever torque is required (within reason) to achieve it. Status of Programmed Speed Control ENABLE Can enable or disable the servo programmatically. (When motor is enabled, it resists being turned, so my plan is to disable the servo programmatically any time the gas pedal registers “0” speed.) SPEED Can set speed programmatically. Minimum speed: 1rpm; speed must be an integer. Maximum speed is somewhere around 6000, but for now I’m capping mine in software at 1000rpm. (Have not found a good way to set a maximum speed through the controller menus…the closest I’ve found is P075 which throws an error (and halts the motor) if you exceed the set threshold.) TORQUE Using the menu buttons I’ve been able to specify a maximum torque. (P067 and P120 working together) This has quite a range …at its lowest settings the motor does not have enough torque to overcome its own internal friction. ACCELERATION Using the menu buttons I’ve been able to specify acceleration speed (P060) and deceleration speed (P061). For now they are set to linear 300ms per 1000rpm acceleration and 600ms per 1000rpm deceleration. This deceleration rate was chosen so as to simulate the freewheeling of a machine head after letting off the gas. I had hoped that I could just specify that no reverse torque could be applied and get a true freewheel, but so far that has not worked for me. My preference is actually that positive acceleration rate would be exponential; that is, when asked to go faster it would accelerate in proportion to how fast it’s already going. I have some ideas on how to effect that programmatically but have not put those ideas in practice yet. Status of Air Pressure Sensor The ESP32 can read the air pressure sensor. Sampling at 10/sec. The initial tare is done by taking multiple samples at the beginning, averaging them, then adding a deadband on top of that. When pressure surpasses the top of the deadband, it prints the desired speed to the terminal. The air pressure sensor source code is still separate from the programmed speed control code. Working on bringing the two together so the motor will move at the speed determined by the air pressure sensor. Exponential is working. That is, decreased sensitivity near stop and higher sensitivity near max speed. No gas pedal yet…just blowing into the end of the silicone tube to effect more/less pressure. Source Code The source code is hosted on rocketgit. To view it, probably easiest to simply clone the repository: git clone https://rocketgit.com/user/lullaby/ac-servo Quote friquant. Like a frequent, piquant flyer. Check out my blog: Choosing a Motor for your Industrial Sewing Machine
Members Gymnast Posted May 31 Members Report Posted May 31 (edited) Thank you for sharing the information for this industrial servo drive. Your video and data indicate, that it got a wide speed range of operation. Is it supposed to be used on a LU562 or similar sewing machine? It can be hard to know what the maximum short term torque you should design for. I have set the limit to 8 Nm on the main sewing machine shaft for the Dürkopp 291 sewing machine, and for me it seems like a reasonable max level for this kind of medium level heavy duty industrial sewing machine. It should handle up to 10 mm leather under the presser foot. However, I did make the motor drive, so you normally sew with a lower max level of 40% of max torque (3.2 Nm). It have saved me a couple of time when I started to get a thread jam below the needle plate. For most of the use you don't need the high torque, and then you can switch to "high power mode" only when needed. In low power mode I also limit the max speed to 60% of the 1100 stitches/min. I tried to read the specifications for the T3D, and I find it hard to find out how the drive handle "overload" and for how long time the higher torque can be delivered. It states an overload factor of 2.8, so I guess that its short term max torque is 2.8 x 1.27 Nm = 3.6 Nm. Therefore I would go for a gearing of the belt of about 8 Nm/3.6 Nm = 2.25. But it also depends of what kind of max speed, that you want. I should like to see real test data regarding step response in speed and/or step response in torque load. On 5/25/2026 at 7:47 PM, friquant said: The ESP32 can read the air pressure sensor. Sampling at 10/sec. The initial tare is done by taking multiple samples at the beginning, averaging them, then adding a deadband on top of that. When pressure surpasses the top of the deadband, it prints the desired speed to the terminal. I think that a reading of 10/sec is too slow. I have used 100/sec, that I find reasonable. This is a test data for a kick to the pedal, with acceleration and deacceleration of the DC-motor I use on a Pfaff 230: This is how kicks to pedal look like on the sewing machine: https://youtu.be/w9AfNjH3q4Y&t=156 If you intend to have needle stop on the sewing machine, you will like the motor to be able to provide negative torque for breaking. You like the machine to stop within a range of about 5 degrees on the sewing machine shaft. Be aware of the specifications for that. I have used max current for the motor drive when breaking and it is about 3 times the nominal motor current. Edited May 31 by Gymnast Quote Sewing Machines in Detail, YouTube channel
Contributing Member friquant Posted June 2 Author Contributing Member Report Posted June 2 On 5/31/2026 at 8:33 AM, Gymnast said: Is it supposed to be used on a LU562 or similar sewing machine? Yes On 5/31/2026 at 8:33 AM, Gymnast said: I should like to see real test data regarding step response in speed and/or step response in torque load. I think that a reading of 10/sec is too slow. I have used 100/sec, that I find reasonable. Hi gymnast. Yes let's get into the weeds. I had noticed some delay / latency and considered that a higher sample rate from the air pressure sensor would be ideal. Thank you for prodding me in this direction. You had recommended the use of the Omron 2SMPP-03 air pressure sensor, which I fully intended to use until I went shopping for it and then balked at the $40 USD price tag. The chip I ended up buying cost me $12 USD and included four separate sensors This chip also comes with a 24-bit ADC, which is convenient to use but took some investigation to discover how to change the sample rate. It supports two sample rates: 10Hz and 40Hz. This video represents a simplistic approach to displaying the step response at varying sample rates. The first and second clips are most useful, as they have a cleaner impulse input, and they do not have any limits placed on acceleration/deceleration. If you open this video on youtube (instead of embedded here) you can use the comma and period keys to advance one frame at a time. (Camera set to 30 frames per second) On 5/31/2026 at 8:33 AM, Gymnast said: I tried to read the specifications for the T3D, and I find it hard to find out how the drive handle "overload" and for how long time the higher torque can be delivered. It states an overload factor of 2.8, so I guess that its short term max torque is 2.8 x 1.27 Nm = 3.6 Nm. Therefore I would go for a gearing of the belt of about 8 Nm/3.6 Nm = 2.25. But it also depends of what kind of max speed, that you want. After some experimentation with the T3D I learned more about how the different torque-limiting settings work. P065 and P066 are labeled "internal" torque limits, and the effect seems to be that if you surpass this limit the controller throws an error and effectively shuts down. I do not know how far beyond the specified torque (or for how many milliseconds) you have to go before it raises an error. P067 and P068 are labeled "external" torque limits, and the effect is that the motor simply acts as though is is only capable of the torque you specify. These "external" torque limits seem more useful/practical for me. Also worth noting that the "internal" torque limits can be tripped by braking for example if you specify a low value for P066 (internal clockwise torque limit) then ask the motor to come to a sudden stop from a fast counterclockwise motion. I have only encountered this during testing when I was looking for a way to tell the motor to only ever apply counterclockwise torque. Quote friquant. Like a frequent, piquant flyer. Check out my blog: Choosing a Motor for your Industrial Sewing Machine
Members Gymnast Posted June 5 Members Report Posted June 5 On 6/2/2026 at 11:58 PM, friquant said: You had recommended the use of the Omron 2SMPP-03 air pressure sensor, which I fully intended to use until I went shopping for it and then balked at the $40 USD price tag. This price seems not right. With this price I would have balked too. A half year ago I order two from Mouser, and got them for $6 each incl. VAT. I have just used this sensor for some projects (not only sewing machines) in the past 8 years and with no issues. I know that more manufactures produce similar sensors, so it is likely, that they will work too. Yes, I think your video show, that a sample rate of 40/sec is better than 10/sec. The drive itself seems to have a fast response in your first demo part. Breaking can be made in more ways on BLDC drives. It is easier to predict the dynamic behavior, when you got have a traditional DC-motor motor drive, that includes a current control loop, so you can put short term limits to the current. You will end up with physical larger drives than needed, if you cannot make use of the short term higher torque. I hope, that you find a workable way to control this drive. Quote Sewing Machines in Detail, YouTube channel
Contributing Member friquant Posted June 10 Author Contributing Member Report Posted June 10 The software is working in its vanilla form end to end. (No buttons, no display other than the servo controller display.) The table is ready for the machine head. Here are some photos of the mounting hardware I used. First, a wooden pedestal on which the silicone tube will rest. The groove in the wood is for the metal crossbar to drop into. That keeps the wooden piece in place. Here we add the silicone tube (plugged at one end with the head of a machine screw) and the "squisher foot" The squisher foot is currently 17mm wide. The width of the squisher foot is proportional to the force it takes to squish the tube. The tube is 2mm id and 5mm od. The tube length is 240mm which allows this width of squisher foot to just max out the air pressure sensor at full squish. In its current incantation (60% exponential applied in software) these are the force measurements vs motor speed: 0rpm : 0-9N (deliberate deadband) 50rpm : 17N 100rpm : 19N 150rpm : 22N 200rpm : 26N 300rpm : 30N 500rpm : 34N 600rpm : 39N 700rpm: 43N 800rpm: 49N 900rpm: 56N 1000rpm: 80N Here is a plot: This plot was expected to look like a gentle curve going up and to the right. Instead it looks more like an "S" shape. The left half of the plot could be said to have positive curvature (as expected from the 60% exponential that was applied in software). But the right half of the plot has negative curvature, which I didn't expect. Perhaps it's harder to squish more air out of the tube the closer you are to "full squish". 🤷♀️ Back to mounting brackets. These guides keep the tube more or less in place: All together Motor Mount: The motor mount mounts with two screws to the table, and each screw gets its own 20mm slot so we can slide the motor closer or farther away to suit the belt. 3D modeled parts I used for the motor mount, tube guides, and squisher foot: And as a fun perk, they glow in the dark. Quote friquant. Like a frequent, piquant flyer. Check out my blog: Choosing a Motor for your Industrial Sewing Machine
Members Gymnast Posted June 11 Members Report Posted June 11 12 hours ago, friquant said: The squisher foot is currently 17mm wide. The width of the squisher foot is proportional to the force it takes to squish the tube. The tube is 2mm id and 5mm od. The tube length is 240mm which allows this width of squisher foot to just max out the air pressure sensor at full squish. I think this design will provide too little response in air pressure, and it makes it more sensitive to temperature variations. You need to be able to recognize, that it is a foot that makes the pressure change, and not an increase in surrounding temperature. I think that your current tube you use will be OK for the transfer of air to the sensor. The 5/2 mm dimensions of the tube makes it rigid. I use a silicon tube of 12/8 mm for the compression at pedal, that is compressed 80 mm in length. I also got another tube of 11/8 mm, that likely would be compressed more with the same force on it due to the thinner walls. These dimensions is a bit of try and find out what makes best response. I got other tube dimensions on stock to make interface to the sensor and to the air transport tube, which in my case got the dimensions 6/3 mm. The transport tube is in my case 1500 mm long for my Pfaff 230. The longer transport tube cause lesser response, because of the increase in the not compressed air volume. This is the response I have for the Pfaff 230: I likely have a little measurement error around 10 N. On top of that I include an unilinear element (part of parabola) in the software, to make better slow speed control. it got a slope 20 times higher at max speed compared to lowest speed. Quote Sewing Machines in Detail, YouTube channel
Contributing Member friquant Posted Thursday at 07:29 PM Author Contributing Member Report Posted Thursday at 07:29 PM 13 hours ago, Gymnast said: This is the response I have for the Pfaff 230: I like your plot. I should have made one of force vs air pressure. 13 hours ago, Gymnast said: I think this design will provide too little response in air pressure, and it makes it more sensitive to temperature variations. The chip I'm using measures in the range of +/- 400hPa. (I had to look up what hPa means) 🙃 The ratio of presser-foot-width to overall-tubing-length that I'm using reaches the full +400hPa at full squish. Another interesting oddity is that this sensor leaks just a bit of air. That is, if I hold the pedal down then I get max speed, but holding the pedal down indefinitely the speed does not stay at maximum but drifts a little lower. The upside of this is that I may not need to deal with changes in temperature. The downside is that it becomes challenging to take repeatable measurements. Quote friquant. Like a frequent, piquant flyer. Check out my blog: Choosing a Motor for your Industrial Sewing Machine
Members Gymnast Posted Thursday at 08:59 PM Members Report Posted Thursday at 08:59 PM I guess that a little leak may be OK, if your use of the sewing machine a lower percentage of the time. In an industrial situation with a user sewing over 50% of time for long periods, I don't think it will be acceptable with a leak. I have discovered leaks in case of hose connectors that consist of two casted plastic parts melted together. It can leave a small grove under the silicon tube. I am sorry about hPa, and I did not have time to convert the information to an US audience . But I guess we need to overcome things like this in an international forum like this. hPa (former mBar) is the common term used in meteorology in Europe and many other places for years. Quote Sewing Machines in Detail, YouTube channel
Contributing Member friquant Posted yesterday at 01:14 PM Author Contributing Member Report Posted yesterday at 01:14 PM I decided I wanted a firmer foot pedal, so I increased the width of the squisher foot from 17mm to 38mm (and increased the length of the tube to 510mm to match it more or less to the maximum pressure the sensor can read, which is 40kPa.) I like the feel of the pedal with the increased stiffness, especially for when I've got a clunky pair of shoes on instead of just stocking feet. (Harder to be gentle with shoes on.) Here is a plot of force vs pressure for the new combination The force gauge I'm using only goes up to 100N or I would have captured a couple more data points greater than 100N. For the Americans in the room, 100N is about 22 lb, and 40kPa is about 6psi. Quote friquant. Like a frequent, piquant flyer. Check out my blog: Choosing a Motor for your Industrial Sewing Machine
Members Gymnast Posted yesterday at 03:20 PM Members Report Posted yesterday at 03:20 PM You got a nice response there. Are you sure, that you got the air pressure correct? In order to get an absolute pressure change from (101 kPa + 12.5 kPa) to (101 kPa + 32.5 kPa), you need to have a change of the total air volume of -15%. It is according to ideal gas law. 38 mm of 510 mm is only 7.5 %. 101 kPa is the normal outside air pressure. Many pedals for household sewing machines got a pressure for max speed of about 20 N. I like it to be around 40 N. But it seems you like it to be even higher Quote Sewing Machines in Detail, YouTube channel
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.