Stepper Motor Generator

by vincentpaulines in Workshop > Energy

130 Views, 2 Favorites, 0 Comments

Stepper Motor Generator

IMG_3381.jpg
IMG_3382.jpg

Heyyyyyooo, Vincent here! This was a project done with a group of people consisting of Kyle Tran, Vince Alconcel (another vince haha), and Brandon Lopez. We are all Mechanical Engineering Students at San Jose State University and worked using resources from the American Society of Mechanical Engineers. Typically I do group projects with people of the same year as me, but these awesome people are actually new students to SJSU! (Two freshman and one transfer) They were looking for engineering experience and this was the perfect project I had in mind at the time for that. With both mechanical and electrical design, this is a stepper motor generator which uses a handcrank to generate DC power. I got this idea when I got a bunch of spare motors from a trashed 3D printer. Typically when one thinks of stepper motors, they think of its ability to produce controlled rotating motion. Stepper motors do controlled motion by having several electromagnets that can be turned on to rotate teeth of differing polarities. Turns out this same mechanism is why stepper motors work great as generators. With so many poles, the reverse mechanism of inducing current within the coils of the stepper motor is very easy even with a low rpm. Additionally as a stepper motor has two coils, you get the plus of being able to have two power outputs. These can be put in series or parallel depending on what is wanted. For this project, we wanted a low voltage output (5V max to charge a phone) so putting the coils in parallel to provide more current output was preferred. Thus, after spending an afternoon scrapping a 3D printer, the team went to work.

Supplies

Mechanical Assembly:

  1. Stepper Motor (duh), we used standard Nema 17s
  2. A 3D printer or some way to make a handcrank and gear ratio
  3. Superglue
  4. M3 heat set inserts


Circuitry:

  1. Diodes, 1n148's were used
  2. A Zener Diode with a Vz = at least 5V, I had ones with Vz = 5.1V
  3. Capacitors, Supercapacitors are preferred for actual usable energy storage (We used these ones)
  4. LED + resistors, not necessary but useful as a power indicator
  5. USB module/cable, not needed if you don't want to charge your phone
  6. Prototyping board (breadboard, perfboard, etc.)
  7. Screw terminals, not necessary but very useful if you'd like to swap the wires on the generator output


Useful Tools:

  1. Oscilloscope (I love this one that I have)
  2. Basic Soldering Kit, not necessary if you want everything on a breadboard

Mechanical Assembly

IMG_3184.jpg
Screenshot 2026-09-28 at 10.27.26 PM.png
Screenshot_2026-09-24_at_10.30.47_AM.png
IMG_3299.jpg
Screenshot 2026-09-28 at 10.27.53 PM.png
Screenshot 2026-09-28 at 10.30.00 PM.png
Screenshot 2026-09-28 at 10.30.28 PM.png
Screenshot 2026-09-28 at 10.30.47 PM.png
IMG_3380.jpg
IMG_3378.jpg

For the mechanical assembly, this consists of a handcrank that connects to a gear train that connects to the stepper motor shaft. There's also a lid on top that screws in via some M3 heat set inserts at the corners. A gear train is necessary here as we found that without one, cranking the generator was incredibly tedious and tiring. For this task, I had Kyle work on the gear train. For his design, he used multiple gears to create a huge 16:1 gear ratio (technically 16.2:1). To attach the handcrank, a key between the shaft and crank is used. The shaft also glues onto the gear as it is printed horizontally. This ensures that breaking the shaft is less likely from the horizontal forces of turning the crank as the 3D printed layer lines are perpendicular to this force with this setup. In the beginning, this design worked great, however we had to later change this design due a factor that completely did not occur to us. When we increased the value of the capacitor bank (you'll see in step 2 why we did this), the torque required to rotate the handcrank became so incredibly high that shafts breaking happened frequently (I say frequently but more like twice). This confused us at first, until I remembered that with a higher capacitance means a lower impedance. As a result, more current is able to flow from the coils of the stepper motor which causes larger back EMF as you rotate the handcrank. I tried to resolve this by adding resistors, but this made cranking to max charge on the capacitor bank take horribly long and I still broke the shaft anyways.

To resolve this, we simply reduced the gear ratio to a ratio of 3:1. Furthermore in this new design, a compliant spacer was added between gear and top lid so that accidentally pushing up and disconnecting the gears did not happen. After this change, torque issues never became a problem and we were also able to double the capacitor bank without a problem. From this design, it takes about 2 minutes to go into full charge which is perfectly fine for me.

For the other half of the mechanical assembly, we have a case where the circuitry goes. The stepper motor and circuitry case are separated as to make cranking easier and have all the wiring not constantly vibrate while cranking. For this part, I mainly had Vince do the CAD for this. The design is quite simply as it is largely just a box with a lid and holes. At the front, there is a hole where the stepper motor wires can go in. On the other side, there is a hole for a USB port to plug in and little cut for an indicator LED to stay in. As we are likely to add more outputs overtime, the back wall is removable. To do this, it is held in by dovetails and the clamping force of the lid. Frankly, I thought this design was too boring so I added text on the lid lol. Also side note, I partly used glow in the dark filament for the case which honestly looks really cool with the LED on in the dark. Sadly it is hard to see in the photo D:

Circuitry

Screenshot 2026-09-28 at 10.26.41 PM.png
IMG_3320.jpg
IMG_3369.jpg
IMG_3377.jpg

For the circuitry, this was mainly my job and I had a lot of fun explaining how it works to my team haha. To start, the two coil outputs of the stepper motor are rectified to DC voltage using two full bridge rectifiers. For those unaware on how this works, diodes only allow current to flow in the forward direction. Thus, having two in the orientation I have above results in positive voltage on one side and zero voltage on the other. One detail to note here is that this stepper motor has six pins. This means that the two coils of the motor are center-tapped. We do not really care about these center-tap wires however as they would only really half the voltage if used, thus they are ignored. Moreover, the DC output is still quite rough however from AC ripple (residual AC after rectification). This is perfectly fine however, as the output will be smoothed out with a bank of capacitors.

Having a capacitor bank is important here as it will act as our way to store energy. Initially, we used a couple of 1000uF capacitors in parallel for our bank as a test, but anyone with basic circuitry knowledge will know this nowhere near enough energy to be usable. Energy of a capacitor can be calculated by the following formula: E=1/2(C)(V^2). At 5V, one 1000uF (or 0.001F) capacitor has an astounding max energy of 0.0125 Joules. Practically Nothing! For a real generator, supercapacitors have to be used. They are essentially capacitors, but with huggggeee capacitor values. For this project, supercapacitors rated at 3.3F were used. One aspect to note with these capacitors is that they are only rated to have 2.7V max. As our target is 5V, this is really bad! Luckily, we can bypass this issue by putting capacitors in series which will add up the max voltages. Doing it this way will decrease the value of the capacitor bank, but this is definitely worth it compared to explosion. In the end, we had two pairs of four supercapacitors in series, resulting in a total value of 1.65F with 8.1V max. I definietly could have had done it with three capacitors in series, but I really wanted to ensure that over-voltage was not an issue. At 5V, this is a total energy of 20 J. Not perfect, but can work for small temporary tasks. Though surprisingly, I was able to turn on a motor for a good bit at max charge.

To actually limit the voltage, a zener diode was used. This is similar to a regular diode, but will conduct current in reverse when it reaches its breakdown voltage. From this, the voltage is able to stay largely constant near that breakdown voltage. As said before, our target was 5V so we used a zener diode with a zener voltage of 5.1V.

Finally, we used an LED as an indicator. I wanted the LED to start to turn on at about 3V and then get really bright at 5V, so I had a couple resistors in series with the LED to have the exact turn on sequence I wanted. This took a couple of attempts, but I eventually landed at a resistance of about 500 Ohms using a 330 Ohm and 170 Ohm resistor.

Putting this circuit diagram into reality, I soldered all of the components onto a perfboard. Here I found screw terminals to be useful so I can connect and disconnect wires at the output and input as I please. Frankly, this was my first time soldering on a perfboard (I am inexperienced with soldering in general) and you can tell from the pictures lmfao. Definitely a skill that needs work on in the future.

Moreover, at the power output a USB module I randomly found is used (Was gonna throw this away until I realized it could probably be used). I initially used this to charge my phone, but I found that the energy we are storing is not nearly enough to charge a phone competently (though my phone did notice it was charging which made me excited). Surprisingly, the best use case I found was to charge my oscilloscope as its charger connects to USB. As someone who constantly forgets my USB adaptor for my mac, this is incredibly useful as an emergency charger.

Improvements

Looking back overall, this project was a smashing success! Being able to charge anything felt like a pipe dream going in and I'm really happy that I actually can charge my oscilloscope with it. I have done with scrapped 3D printer parts before, but this one definitely felt the best. Additionally, being able to work with people who are largely inexperienced was really instructive. I think everyone came out of the project with new skills they would like to improve on for the future (CAD, circuitry, designing around stress, etc.). For me personally, one aspect I sort of realized is that design choices that really obvious to me while designing are not obvious to me at all while reviewing someone else's work. As a result, I had to do a lot of quick design changes and reprinting which in retrospect were completely unnecessary. Think the main source of this is that I tend to go into the "zone" when I'm on Fusion in a way that does not occur to me when I'm looking at someone else's work, definitely a skill I need to work on.

As for the design itself, a bigger capacitor bank is probably needed for more energy, but honestly I would probably say this with a cap bank holding 3 trillion joules (the more energy the better!). The main aspect I would like to change is to add more outlets than just the USB port, probably banana plugs that I have would be great here. Furthermore, though the max 5V, that does not mean only objects that run at 5V nominally should be used. I think this generator is actually better for components that are nominally able to run at like around 3.3V, but are perfectly okay at 5V (or components that are nominally 5V, but are fine at 3V I guess). Not much comes to mind for me in this department except maybe radios, but I will definitely keep that in mind using this guy in the future. For now though, it is acting as my manual oscilloscope charger lol. Thanks for reading!