JGY-370 Worm Gear Motor Library for Proteus: an Arduino UNO V4.0, the L9110S on 12 V and the JGY-370 winch lifting 4 kg

JGY-370 Worm Gear Motor Library for Proteus V1.0 (12V, Self-Locking)

2.5K Views
40
700
60
25
60
PCBWay

Hello friends, I hope you all are doing great. Today, I am going to share the new JGY-370 Worm Gear Motor Library for Proteus V1.0. The JGY-370 is the motor you find in curtain openers, rotisseries, camera pan heads, small lifts and winches: a 370-size DC motor on a worm gearbox, slow, strong and with one property that no ordinary gear motor has - it is self-locking. Whatever hangs on its shaft cannot turn it backwards, so a lifted load simply stays where it is when the power goes off.

Updates

JGY-370 Worm Gear Motor Library for Proteus

Latest version: V1.0 (October 2026, this tutorial)

Helping Tools

That property deserved a proper demonstration, so this library does not stop at the motor. On the sheet, its output shaft carries a winch drum with a rope and a weight, and the weight rises and falls with the simulation. Stop the motor and the weight stays in the air. Put 4 kg on the drum while it hangs there and it still does not move. The demo runs on our Arduino UNO V4.0 and drives the motor from 12 V through our separate L9110S library, with a potentiometer for up and down.

NOTICE: a worm gear motor in a simulator is only interesting if it behaves like a worm gear: slow, inefficient, strong and impossible to turn from the load side. Our team put a lot of effort into building that behaviour and a winch that shows it on the sheet. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the Motor Driver board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the JGY-370 Worm Gear Motor Library for Proteus V1.0:

JGY-370 Worm Gear Motor Library for Proteus: an Arduino UNO V4.0, the L9110S on 12 V and the JGY-370 winch lifting 4 kg
Figure: The JGY-370 Worm Gear Motor Library for Proteus: the UNO, the L9110S on +12V and the JGY-370 winch lifting a 4 kg weight, its UP LED and the driver's LEDs lit.

What is the JGY-370 Worm Gear Motor?

JGY is the gearbox family: a rectangular metal gearbox with a worm gear inside, the output shaft sticking out of its face at a right angle to the motor. 370 is the motor: a brushed DC motor of the 370 size, mounted across the side of the gearbox. The worm on the motor shaft turns a wheel on the output shaft one tooth per turn, which gives large ratios in a small box. The family covers ratios from about 6 to 150 RPM at 12 V; this library is the 12 V 1:150 version, 40 RPM with no load, with a 6 mm D-shaft.

The JGY-370 at a glance
JGY-370 12 V 1:150 (the model)
Motor and gearbox370-size brushed DC motor on a worm gearbox, output at a right angle, 6 mm D-shaft
No load40 RPM and 50 mA at 12 V, about 19 RPM at 6 V
Rated30 RPM at 2 kg.cm, 0.6 A or less
Stall7.5 kg.cm and 1.7 A at 12 V
Gearboxself-locking worm: about 16 % of the motor's torque reaches the load
Wires+ red, - black

Why a Worm Is Self-Locking

A worm gear works by sliding. The thread of the worm pushes the teeth of the wheel sideways, and every bit of torque it passes on presses the teeth together and creates friction. That is why worm gears are inefficient: in this model the friction grows to 5.25 times the load torque, so only about 16 % of the motor's torque does useful work. But the same friction is what makes the gear self-locking. If the load tries to turn the wheel backwards, the friction it creates is larger than the push it can give, and nothing moves - in engineering terms, the backward efficiency is below zero.

The model follows exactly this logic, and the data of the real motor fits it: with the friction from the 50 mA of no load and the 5.25 factor, 2 kg.cm on the shaft gives 29.3 RPM at 0.49 A (the data says 30 RPM at 0.6 A or less), and the stall comes at 7.5 kg.cm and 1.7 A. One more consequence surprises many people: lowering a weight with a worm gear also needs power, because the weight cannot drive the gear down by itself. The motor drives it down, with less current than it needs to lift it.

What's New in JGY-370 Worm Gear Motor Library for Proteus V1.0

  • A 12 V worm gear motor with real current: the winding, the back-EMF, the friction and the inertia from any driver, PWM or DC, either way.
  • Self-locking: the worm's friction grows with the load, so the load can never turn it backwards - with the driver braking, with no drive at all, with any weight.
  • A winch on the sheet: a 10 mm drum, a rope and a weight that rises and falls from the floor to the drum, with its weight written on it.
  • Weights and stalls: WEIGHT and HEIGHT properties and weight buttons from 0.5 to 4 kg on the pop-up; a stall when the weight is too heavy and when it reaches the drum.
  • A pop-up window with four pages - Motor, Graphs, Event log and Check - and a HOLDING status for the self-locking.
  • It names the problems: a stall, a stall at the top, an over-voltage above 15 V and a reversal at speed.
  • A winch demo on our Arduino UNO V4.0 and our L9110S driver: the pot for up and down, and commands to lift, lower and stop.

The JGY-370 in Proteus

JGY-370 worm gear motor in Proteus: the gearbox face, the 370 motor on its side, the drum and a 4 kg weight on the rope
Figure: M1 lifting 4 kg: 12.2 RPM on the strip, the weight high on its rope and the UP LED lit.

Search JGY in Pick Devices; the device JGY370MOTORTEP is in TEPJGY370.LIB (category Electromechanical, DC Motors) and its model is TEPJGY370.DLL. It shows the motor from its output shaft at 0.9 times its real size: the silver gearbox face with four M3 holes, the 370 motor across its side with its black end cap and two terminals, and on the 6 mm D-shaft the winch drum with a red mark. The rope comes off the drum and holds a weight block over a strip of floor. While the simulation runs, the drum turns and the weight moves; the strip under the plate gives the speed with its direction, the weight's height in millimetres and the current, next to the OPEN PANEL button.

The plate, the drum, the rope, the weight, the floor and the LEDs are TEP additions; the real motor has none of them. The two LEDs show the direction: UP (green) while it lifts and DOWN (amber) while it lowers.

The two pins of the JGY-370
PinWireWhat the model does with it
+redthe motor, analog: positive on + turns the drum clockwise, which lifts the weight
-blackthe motor's other terminal

Two properties set the scene: WEIGHT is the weight on the rope in kg (default 1), and HEIGHT is where it starts, in mm above the floor (default 0). The drum has a 10 mm radius, so 1 kg on the rope is 1 kg.cm on the shaft, and the 100 mm from the floor to the drum take 1.6 turns.

Download JGY-370 Worm Gear Motor Library for Proteus

Click the button below to download JGY-370-Worm-Gear-Motor-Library-for-Proteus-v1.0.zip (about 1.2 MB, without the source code of the models):

JGY-370 Worm Gear Motor Library for Proteus V1.0
  • README.txt: installation, the demo, the wiring, real hardware, troubleshooting and the limits.
  • Proteus Library Files: TEPJGY370.LIB and ArduinoV4TEP.LIB from our Arduino Library for Proteus V4.0.
  • Proteus Model Files: TEPJGY370.DLL and TEPARDUINO.DLL.
  • Proteus Simulation: JGY-370-Worm-Motor-L9110S-ArduinoUnoV4.pdsprj, JGY370_Demo.hex and copies of the two DLLs.
  • Arduino Code: JGY370_Demo.ino (no library needed).

The driver is a separate library: this package holds only the motor and the UNO. The demo drives the motor through our L9110S motor driver, which has its own download - get it from our L9110S Motor Driver Library for Proteus and install it first, or the demo opens without its driver.

No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.

How to Install JGY-370 Worm Gear Motor Library for Proteus

  1. Close Proteus and extract the whole zip file, for example to your Desktop.
  2. Copy TEPJGY370.LIB and ArduinoV4TEP.LIB from Proteus Library Files into the LIBRARY folder of Proteus (usually C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY).
  3. Copy TEPJGY370.DLL and TEPARDUINO.DLL from Proteus Model Files into the MODELS folder. The two Arduino files are the ones of our Arduino Library V4.0; if you have it, they are the same.
  4. Install our L9110S Motor Driver library the same way from its own zip: TEPL9110S.LIB into LIBRARY and TEPL9110S.DLL into MODELS.
  5. Delete TEPJGY370.IDX from the LIBRARY folder if it is there.
  6. Start Proteus, press P and search for JGY.

Tip: keep the Proteus Simulation folder together, because the project needs its .hex file and the DLLs beside it. The library is tested in Proteus 8.5; Proteus 7 is not supported.

The Demo Circuit

JGY-370 Proteus simulation: an Arduino UNO V4.0, the L9110S with VCC on +12V, the JGY-370 winch and a pot on A0
Figure: The demo project running: ARD1, DRV1 (the L9110S) with its VCC on +12V, M1 lifting 1 kg and RV1.

Open JGY-370-Worm-Motor-L9110S-ArduinoUnoV4.pdsprj. ARD1 is an Arduino UNO V4.0 from our Arduino UNO Library for Proteus V4.0, running JGY370_Demo.hex with its serial monitor built in. DRV1 is the L9110S driver in its pop-up version. M1 is the JGY-370 on the driver's MOTOR A, with 1 kg on its rope. RV1 is a 10k potentiometer on A0: the middle stops the winch, right lifts and left lowers. The sheet is A3, because the UNO, the driver and the winch do not fit an A4 sheet legibly.

This is a 12 V motor, so the driver's VCC sits on a +12V power terminal. The L9110S takes 2.5 to 12 V on VCC, and its inputs stay 5 V logic, so the UNO drives them directly.

The wiring (the same in Proteus and on a real board)
FromToNote
L9110S A-IAD5PWM 980 Hz: up
L9110S A-IBD6PWM 980 Hz: down
L9110S VCC+12Vthe motor supply, 2.5 - 12 V
L9110S GNDGNDcommon with the Arduino
JGY-370 + / -L9110S A-OA / A-OBMOTOR A
RV1 wiperA0the speed and the direction

The Arduino Code

The demo needs no library. New to Arduino? Start with Arduino Tutorial for Beginners and Introduction to Arduino UNO. Three pins are all it uses:

const int IA = 5, IB = 6, POT = A0;

In setup() both driver inputs become outputs and the motor starts stopped:

  pinMode(IA, OUTPUT); pinMode(IB, OUTPUT);
  drive(0);

One function drives the L9110S: PWM on one input and LOW on the other, so the sign of the number is the direction - positive lifts, negative lowers, zero puts both inputs LOW and brakes the motor:

void drive(int s) {
  s = constrain(s, -255, 255);
  if (s > 0) { analogWrite(IB, 0); analogWrite(IA, s); }
  else if (s < 0) { analogWrite(IA, 0); analogWrite(IB, -s); }
  else { digitalWrite(IA, LOW); digitalWrite(IB, LOW); }
  speedNow = s;
}

The commands up and down take a percentage and turn it into a signed PWM value:

  if (!strncmp(s, "up", 2) || !strncmp(s, "down", 4)) {
    const bool up = s[0] == 'u';
    int pct = constrain(atoi(s + (up ? 2 : 4)), 0, 100);

stop just drives zero. Notice what the sketch does not need: a brake, a counterweight or a loop that keeps pushing against the load. The worm holds it, and the sketch says so:

  if (!strcmp(s, "stop")) { mode = FIXED; drive(0); report(F("stop")); return; }
  if (speedNow == 0) Serial.println(F(" -> stop: the worm holds the weight"));

With a spur gearbox, the same sketch would need a holding current or a mechanical brake, or the weight would pull the motor round and run down. Here the stop command is enough. The pot is read in the loop: its 0 - 1023 becomes -255 to 255, with a dead zone round the middle so the winch really stops there, and knob hands the control back to it:

      int s = map(raw, 0, 1023, -255, 255);
      if (abs(s) < 20) s = 0;                       // a dead zone round the middle
  if (!strcmp(s, "knob")) { mode = KNOB; lastKnob = 9999; Serial.println(F("Following the pot on A0")); return; }

The open-loop basics of motor speed control are in our older DC Motor Speed Control using Arduino tutorial. The HEX file is in the package; to change the sketch, open it in the Arduino IDE and export the compiled binary, as in How to get the HEX file from Arduino. It needs 5,158 bytes of flash (16 % of the UNO) and 254 bytes of RAM.

Running the Demo

Press Run. The UNO's serial monitor and the pop-ups of the motor and the L9110S open over the schematic; move them aside. RV1 starts at 75 %, so the winch lifts the 1 kg weight off the floor at about half speed: 10.8 RPM at 5.21 V and 0.23 A. This is the whole session of our test run, as the monitor printed it, with the commands typed in it:

JGY-370 Worm Gear Motor winch demo - The Engineering Projects
L9110S: A-IA on D5, A-IB on D6. Turn the pot on A0: the middle stops, right = up, left = down.
Commands: up 80 | down 50 | stop | knob | help
Pot 768 -> up 49 % (PWM 127/255)
stop
stop -> stop: the worm holds the weight
up 100
up -> up 100 % (PWM 255/255)
down 100
down -> down 100 % (PWM 255/255)
up 100
up -> up 100 % (PWM 255/255)
down 60
down -> down 60 % (PWM 153/255)
stop
stop -> stop: the worm holds the weight
JGY-370 winch demo in the built-in serial monitor of the Arduino UNO V4.0: up, down and stop commands
Figure: ARD1's monitor after the run: the pot, then stop, up 100, down 100, up 100, down 60 and stop.
The commands of the demo sketch
TypeWhat it doesWhat the run showed
up 80lift at 80 % (the pot is ignored until knob)up 100 with 4 kg: 12.2 RPM at 10.13 V, 0.93 A
down 50lower at 50 %down 100 with 4 kg: 21.0 RPM at -10.69 V, 0.65 A
stopboth inputs LOW: the motor brakes, the worm holdsholding 1.0 kg at 71 mm
knobfollow the pot againthe pot's speed and direction

The Pop-Up Window

At Run the motor opens TEP JGY-370 Worm Gear Motor, a window in the look of our TEP Serial Monitor Advance for Proteus. Its four tabs are Motor, Graphs, Event log and Check, with Settings and Help behind the gear and question mark icons. If you close it, OPEN PANEL on the strip brings it back.

JGY-370 pop-up Motor page in Proteus: LIFTING 1.0 KG at 10.8 RPM, the gauge, the weight and the height
Figure: The start: lifting 1 kg at 10.8 RPM, the rope moving at about 11 mm/s.

The banner gives the state in one line - here "LIFTING 1.0 KG" with the speed and the drive. The gauge runs from 60 RPM down (left) to 60 RPM up (right), with the band from the rated 30 RPM to the no-load 40 RPM marked, and shows the rope's speed in mm/s under the needle. The live values are the speed, the direction, the average voltage, the current, the drive, the power, the weight and its height. The toolbar hangs None, 0.5, 1, 2 or 4 kg on the rope.

Self-Locking: Stop and Let Go

JGY-370 pop-up in Proteus: HOLDING 1.0 KG AT 71 MM WITH NO DRIVE - THE WORM LOCKS
Figure: After stop: no drive, no current - and the weight stays at 71 mm.

Type stop while the weight is in the air. The drive goes off, the current drops to zero, and the weight stays exactly where it was. A moment later the banner turns teal: "HOLDING 1.0 KG AT 71 MM WITH NO DRIVE - THE WORM LOCKS", and the Event log adds "holding 1.0 kg at 71 mm with no drive - the worm locks (self-locking)".

JGY-370 pop-up in Proteus: holding 4.0 kg with no drive and no current after the 4 kg button
Figure: The 4 kg button with the motor off: four times the weight, still 0 A, still holding.

Now click 4 kg on the toolbar while the motor is off. Four times the weight on the rope, and still nothing moves: the height stays at 71 mm and the current at 0 A. With an ordinary spur gearbox the weight would now turn the motor backwards and run down to the floor - our host tests check exactly that, with the worm's friction switched off, and the weight falls.

JGY-370 pop-up Check page in Proteus while the worm holds 4 kg: the self-locking row in green
Figure: The Check page while it holds: the weight row amber (above the rated 2 kg.cm), the self-locking row green.

The Check page puts it in rows with a verdict each: the drive (none), the current, the speed, the weight - amber, because 4 kg.cm is above the rated 2 kg.cm - the self-locking row in green, "the worm holds 4.0 kg at 71 mm with no drive", and the height.

Lifting and Lowering 4 kg

JGY-370 pop-up in Proteus: LIFTING 4.0 KG at 12.2 RPM, 10.13 V and 0.93 A
Figure: up 100 with 4 kg: 12.2 RPM, 10.13 V across the motor and 0.93 A.

Type up 100 with the 4 kg still on: "steady 12.2 RPM CW (lifting) at 10.13 V average, 0.933 A". The current is almost twice the rated 0.6 A, and the L9110S loses 1.9 V in its switches at 0.93 A, which is why the motor sees 10.13 V and not 12. A JGY-370 working this hard wants a stronger driver, as the end of this article explains.

JGY-370 pop-up in Proteus: LOWERING 4.0 KG at 21.0 RPM, -10.69 V and 0.65 A
Figure: down 100 with 4 kg: 21.0 RPM down, still 0.65 A from the supply.

Then down 100: "steady 21.0 RPM CCW (lowering) at -10.69 V average, -0.650 A". Two things are worth a look. The weight goes down faster than it went up, because now gravity helps the motor a little. But the motor still draws 0.65 A: a self-locking worm cannot be back-driven, so the motor must drive the weight down, too.

The Top of the Rope

JGY-370 in Proteus: the weight pulled up against the drum, the motor stalled at 100 mm
Figure: up 100 with 1 kg until the weight reaches the drum: 100 mm on the strip and the current in red.

Keep lifting and the weight reaches the drum at 100 mm. There is nowhere to go, the shaft stops and the motor stalls. A real winch without a limit switch does exactly this, and keeps pulling its stall current until somebody notices.

JGY-370 pop-up in Proteus: STALLED AT THE TOP - THE WEIGHT IS AT THE DRUM, 1.32 A
Figure: STALLED AT THE TOP: 1.32 A at 9.35 V, the weight at 100 mm.

The pop-up says "STALLED AT THE TOP - THE WEIGHT IS AT THE DRUM, 1.32 A", and the Event log adds "a limit switch stops a winch here". The 1.32 A is the stall current through the L9110S, which drops almost 3 V at that current; on a stiff 12 V supply it would be 1.7 A.

Graphs and Event Log

JGY-370 pop-up Graphs page in Proteus: lowering at 60 %, then stop - the height line goes flat
Figure: down 60, then stop: the speed and the current go to zero and the height line goes flat at 66 mm.

The Graphs page draws the speed, the current and the weight's height over the last 1, 3 or 6 seconds. This is the end of the run: down 60, then stop. The speed and the current go to zero, and the height line simply goes flat at 66 mm - the self-locking as a graph. The small ripple while it lowers is the L9110S averaging its PWM.

JGY-370 pop-up Event log in Proteus: lifting, lowering, the holding events and the stalls at the top
Figure: The Event log, newest first: the steady speeds lifting and lowering, the weights, two holds and two stalls at the top.

The Event log is the winch's diary, newest first: every steady speed with "lifting" or "lowering", the weights, the holds, the two stalls at the top and a reversal warning - "reversed at 31 RPM: 2.32 A peak" - from the moment we typed up 100 while it was still going down. Filters show only the drive and speed or only the warnings.

How the Model Works

The motor is solved by Proteus's analog engine: its speed is an internal node computed together with the driver from the winding resistance, the back-EMF, the friction, the inertia and the load, in analog steps of 2 ms or less. The worm is a friction that grows with the torque on the shaft. The weight is a torque of its own - the kg times g times the 10 mm of the drum - that always pulls downwards while the rope is taut, and disappears when the weight lies on the floor. At the drum a stiff stop takes over.

The demo runs at about 0.25 x real time on a desktop PC: 32 seconds of simulation took about 2 minutes. We checked the model on a PC with 19 automatic tests: 40.0 RPM and 52 mA at 12 V, 29.3 RPM and 0.49 A with 2 kg.cm, 19.4 RPM at 6 V, 8 kg stalling at 1.70 A while 7 kg still lifts at 2.6 RPM, 4 kg held for 2 seconds with the motor shorted and with it open (0.02 mm of creep), the same gearbox without the worm's friction letting it run down to the floor, lowering 2 kg at 32.7 RPM and 0.35 A, and the stop at the drum.

Why the Motor Says STEADY

Our L9110S model does not switch the motor on and off a thousand times a second; in each analog step it hands the motor the average of its PWM. The speed is exactly what the PWM gives, and the simulation runs much faster. So the motor's Drive tile reads STEADY, while the UNO's 980 Hz PWM is on the L9110S's own pop-up.

Troubleshooting

  • The shaft never turns and the pop-up says NO DRIVE: the driver's inputs (both LOW = stop), its VCC, or the motor wires on the wrong outputs.
  • No driver in the project: install our L9110S library (TEPL9110S.LIB / TEPL9110S.DLL) - it is not in this package.
  • Slow, about half speed: the driver's VCC is on 5 V, not 12 V.
  • It lifts when it should lower: swap the motor's wires, or A-IA and A-IB.
  • STALLED: less weight, or more drive. STALLED AT THE TOP: lower it.
  • No weight on the sheet: the weight is set to None - the drum turns and the rope winds empty.
  • Nothing moves on the sheet, no UNO or no monitor: TEPJGY370.DLL or TEPARDUINO.DLL is missing from MODELS and the project folder; a closed monitor opens again with a click on the UNO's USB port.

Things to Know Before Using a Real JGY-370

  • The driver: the JGY-370 takes 0.6 A or less at its rated load and 1.7 A stalled at 12 V. The L9110S (0.8 A, 1.5 A peak) suits the rated load; for a winch that may stall, use a TB6612FNG (1.2 A, 3.2 A peak) from our TB6612FNG Motor Driver Library for Proteus or an L298N.
  • End stops: a winch needs a limit switch at the top and at the bottom, or a timer. Driven into its stop, the motor draws its stall current and strains its gears.
  • Self-locking is not a brake: it holds a load at rest and while driven. Do not rely on it to catch a moving heavy load, and never stand under a lifted load.
  • Do not stall it for long: the gearbox can be damaged.
  • Know your motor: JGY-370s come in many ratios, from about 6 to 150 RPM at 12 V. This one is the 1:150, 40 RPM version. For a faster motor with an encoder, see our JGB37-520 Encoder Gear Motor Library for Proteus.

Limitations of the Simulation

  • Not modelled: the winding inductance, the gear backlash and wear, the rope's stretch and swing, the worm's lower friction when it moves fast or is well greased (a real self-locking can weaken with vibration), heating, and the differences between real motors.
  • The motor is the 12 V 1:150 JGY-370; other ratios are not selectable.
  • The plate, the drum, the rope, the weight, the floor, the LEDs and the strip are TEP additions.
  • The model is our own, written from the typical data of the 12 V 1:150 JGY-370 worm gear motor; this library is not made or endorsed by Arduino or Labcenter.
  • Licences: the demo needs no Arduino library; the HEX file contains the Arduino AVR core 1.8.6 with LGPL-licensed code, and the sketch is included. The potentiometer is Proteus's own POT-HG. The L9110S driver is our separate library.
  • Tested in Proteus 8.5 in October 2026 with the demo as shipped: the pot, lifting and lowering 1 and 4 kg, holding with no drive, the stall at the top and the pop-ups. Proteus 7 is not supported.

So, that was all about the JGY-370 Worm Gear Motor Library for Proteus V1.0. I hope it helps you design your winch, opener or lift - and its limit switches - before the first weight goes up on the bench. If you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!


Comments

0

Join the conversation