Pulse Width Modulation – electronic speed controller – Free Preview!

Please note: I made a mistake in the circuit built for the video lesson. Surprisingly, the circuit still worked! I don’t get it, but the downloadable circuit diagram is correct, the video is not.  I also updated the circuit diagram with a small improvement April 23. R5, a 4.7 k resistor was swapped out for a 3.3k resistor which works better as it gets rid of beat notes.

Questions

  • 1

    Zaid

    Hello Ian
    I am not exactly sure what is the function of diode 1 and diode 2?
    I wonder if you could explain it in a bit more detail…..

    • Lightningie

      Hi! I believe the function of both diodes 1 and 2 is to protect the circuit components from an electrical surge. That’s why you have to “reverse bias” (Put the negative side towards the positive power, and the positive side to the negative power input) the diodes as a way of making sure that some, or all of the power doesn’t harm the circuit. If this is incorrect, I hope Mr. Juby will correct me and give you better feed back! Good luck!

  • 4

    Lightningie

    Hello!

    I was going over this circuit’s schematic, trying to figure out why I couldn’t control the speed of my motor with my pot. I then looked at your circuit in the video to see if that explained the problem, when I realized that the circuit in the video is slightly different from the one in the schematic. The capacitor on the second 555 timer (left to right) in the schematic goes from pin 1 to pin 6, but in the video, it goes from pin 7 to pin 8.. Am I reading the schematic wrong? Or is there something I’m missing? Thanks!

    • Ian Juby

      What on earth??? That took me a while to even figure out what you were talking about – but yes, I see what you mean! The capacitor is supposed to go from pin 7/6 to negative – but yet in the breadboarded version on video it looks like I missed. You see the white wire in the row immediately left of pin 8? It’s going to negative – the capacitor was supposed to go from pin 7 to the white wire, but it sure does look like I missed the row and sent it to pin 8 (positive supply). It might be just camera trickery and the small, fine wire from the capacitor actually isn’t showing up well on video and is actually going to that negative row and not positive, but it doesn’t look like it. If that’s the case, then I have NO idea how that circuit even worked! I’ll have to get back to you on this, but basically, the capacitor should be going from pin 7/6 to negative.

    • Ian Juby

      Hi Alex,
      Okay I rebuilt the circuit today and essentially, the schematic is correct. I also experimented and, for entertainment purposes only, put the capacitor from pin 7 to pin 8. I have NO idea how or why, but the circuit works that way too. haha! It’s not supposed to -really! There is a small improvement one can make – you can swap out R5 (4.7k) for a 3.3k and it works better – you get no beat notes then. The one main thing I’d look for in troubleshooting is to make sure that the 9 volt negative and 6 volt negatives are connected together. Other than that, can you maybe post a picture of your circuit?

    • Lightningie

      Hi,
      Thanks!
      Odd that it would work! I’ll take your advice and swap out R5 too.
      It seems like everything is connected properly… The only thing I can think of that might be wrong (due to MY reading the schematic wrong) is that the pot might be connected wrong… Here is a picture with my circuit in it.
      Sorry about the quality. I hope you can see from these what I’m doing. (The two alligator clips on the left are connected to the pot. The two on the right are connected to the motor).
      Thank you for your time!
      Alex.

      • Ian Juby

        Hmmmm… zee picture didn’t show up? Can you try again?

        Tanks eh!

    • Lightningie

      Sorry about that. I got an error last time, but my message showed up anyway, so I thought it was fine, but I guess not. I tried the picture again, hopefully it works!

      • Ian Juby

        Hmmm… Picture might be too large if you’re getting an error. I’ll have to double check some things here. That’s a recent feature we added to give the ability for users to upload pictures.

  • 1

    Cynthia

    Can you describe where the third pot wire goes to and what the one wire from the motor is being hooked up to? Your picture cuts those out. I know that you said there were errors in the visual and the schematic, but I need a little help here. Thank you so much. Also… dumb question… what does parallel wiring look like on a breadboard? I can parallel wire with hand held twisting wires but everything starts to look parallel wired to me in these schematics. Guess I need some visual help.

    • Ian Juby

      When you look at the schematic diagram for a potentiometer, there are three wires – one on each end of the resistor, and the middle arrow one which is the wiper. Often you only use two of the three wires, which we did in this case. See attached image.
      schematic close up
      Because the wiper is the most important connection (marked C in the diagram), you’ll usually be using that and one of the end connections (A & B). On the pot, the wiper is the middle pin.
      Remember what the pot looks like on the inside? How it worked? If you connect to the two outer pins, it just becomes a resistor. It’s the wiper that makes it a variable resistor, basically making a connection at a controlled location along the length of the resistor, and thus changing the resistance between the wiper and the two outside pins.
      So take a look at my diagram. R3 comes from positive, just put one end in of the resistor into the positive bus, then the other end into an empty row in your breadboard, not too far away from the 555. Now both your R5 and your pot (R4) go from THAT row to pin 6 on your 555. Notice the pot you pick one of the outside pins, put it into that row, and then the middle pin goes to pin 6 on the 555. Or pin 7 if you want, because pin 6 & 7 on the 555 are connected together, so it doesn’t matter which one you send it to. Hope that makes sense.

      As for series and parallel circuits, here’s two resistors in series (please forgive the hair – macro shots reveal so much!):
      series circuit

      And here’s what a parallel circuit looks like on a breadboard:
      parallel circuit

      Look at the way the electrons flow: In a series, it goes through the first resistor, into a row in the breadboard, connecting via that row to a second resistor which the electrons then flow through to another row. In parallel, the rows connect both ends of the resistors so that electrons can flow through both resistors at the same time.

  • 0

    Cynthia

    Thank you, that was a big help. I did remember what the inside of the pot looked like, but did not realize you could leave one wire disconnected.

  • 1

    Cynthia

    Our set up is working with just 6 volts. Does this mean something is wrong?

    • Ian Juby

      Nope. If it’s working, it’s working. Awesome. I honestly didn’t try it on 6 volts only for the simple reason that saturation of the MOSFET was 10 volts. It’ll work, but the MOSFET might get warm because it’s not being run to saturation, that’s all.

  • 2

    Cynthia

    Hi Ian. I am building this a second time through and realizing that my motor is running but not responding to the pot. I have read and reviewed everyone else’s comments and questions and your answers. I am following the schematic and not the video. When you rewired the circuit did you test to see if it was responding to the pot? Also, the pot is running in parallel with either the 4.7 k or 3.3k resistor and a 10k pot, which winds up being around a resistance of 7ish… is that what is needed? I thought you said something different in the video. Thank you for clarifying. Appreciate your time.

    • Cynthia

      more info… my transistor is getting hot while I am running the motor. I know you said the transistor requires 10 volts and we are using a 9 volt battery. My battery is reading about 8 volts. Could that be the issue? Can I wire older 9 volt batteries in series to get the input closer to 10 volts?

    • Cynthia

      I think I finally found my miswiring and the transistor is no longer heating up. Thank you for your patience in letting me post my questions.