Connect with us

clever vibration motor driver?

Discussion in 'Sensors and Actuators' started by pgib8, Jul 26, 2015.

Scroll to continue with content
  1. pgib8

    pgib8

    99
    23
    Jul 26, 2015
    Hi, I'm doing a little circuit to drive a small vibration motor.
    I want to be able to control the voltage that feeds the motor and of course to be able to turn it on and off.
    I'm using a microcontroller and digital-to-analog converter.

    My first idea was to use an OP amp after the DAC as voltage follower and act as the amplifier for the motor. I quickly found out that OP amps get a little expensive when you're trying to drive larger currents (100mA).

    I'm only somewhat familiar with OP amps but would you guys agree that an OP amp is not the way to go here?

    So for the clever part I thought of using a simple adjustable LDO linear regulator. I can adjust the voltage and it has an enable pin for on/off. What else can I wish for right?

    I drew up a little circuit of what I have in mind.

    My main question is if this makes sense or if there is a better way to handle this.
    My second question is if the protection I use is good. I checked out the motor on the scope and saw voltage swings not only to the negative direction but also the positive (hence the TVS diode).

    What do you think? Any comments will be appreciated.
     

    Attached Files:

    hevans1944 and CDRIVE like this.
  2. Minder

    Minder

    2,955
    624
    Apr 24, 2015
    If using a μp controller, why not use one that has a PWM module built in, much simpler and more efficient than Analogue.
    M.
     
  3. pgib8

    pgib8

    99
    23
    Jul 26, 2015
    I thought about that too but I was thinking that the PWM coupled with the DC motor would create a lot of noise.
     
  4. Minder

    Minder

    2,955
    624
    Apr 24, 2015
    It is done all the time, the simpler method is SCR bridge and that has a switching frequency of 100/120Hz.
    With PWM a switching frequency of 4Khz and above is considered a a quiet enough solution.
    In fact there are many sold on ebay designed around the 555 and go for around $5.00 .
    M.
     
  5. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    I just wanted you to know that despite Minder's good advice your ingenuity didn't go unnoticed. As an analog solution I too think it's very clever! :D

    Now don't get a swelled head over my statement. I discovered that I needed room in my frig for another bottle of wine. So I drank the bottle of wine that was already in there. It was taking up the space I needed for this one. Clever huh?? :p

    Chris
    BTW: PICs have DAC outputs too. ;)
     
  6. hevans1944

    hevans1944 Hop - AC8NS

    4,473
    2,084
    Jun 21, 2012
    I think it is a clever idea. Quick and dirty and wastes a little power, but it should be good enough for "proof of concept" while you program the MCU. Make sure you adequately heat sink the TO-25 package and choose a low-drop-out (LDO) regulator.

    However, since you already have an MCU, why not use one of its output ports to drive the motor through a MOSFET, like a 2N7000 which is dirt cheap? See attached datasheet. Use PWM modulation at some frequency high enough to avoid mechanical resonance... say, 4 kHz or higher as @Minder suggested. You can also try both methods, replacing the adjustable voltage regulator with the MOSFET and using what was the EN output from the MCU as the gate drive for the MOSFET. No need for the 6-bit DAC function.

    Your protection circuit across the motor terminals is okay for the adjustable regulator circuit, although the TVS protection, the diode to the +5 V supply, and both capacitors connected to the regulator output terminal are probably unnecessary. If you place the motor between the drain of the MOSFET and the +5 V supply, ground the source, and drive the gate with an output port on the MCU all you need is an ordinary diode across the motor to suppress the back-emf. Any extra capacitance will just screw up the PWM current to the motor.
     

    Attached Files:

  7. pgib8

    pgib8

    99
    23
    Jul 26, 2015
    Thank you all for the replies.
    @CDRIVE, I understand that 'clever' is not the right word, 'unconventional' would have been a better fit. I am using a PIC as a matter of fact (love them), but this one does not have a DAC. There is a second reason for the external DAC. The LDO ADJ pin can't be connected as I have shown, it needs a voltage divider to work properly. The DAC I selected will be perfect because it's a resistor ladder and the reference will connect to the OUT pin of the LDO.
    @Minder, the LDO is only $0.50.

    The rest is for hevans1944.
    I appreciate all your tips. I love MOSFETs and the LDO regulator has one in there already, except it is working in an analog way (see attached image). The output drive capability of the LDO is about 4x what I need. This circuit should be very robust. I have no proof but I wonder if PWM puts stress on any components. Anything with a square wave makes me worry a bit :)
    You might be right about the additional diode to 5V. When I tested the motor I saw some spikes that sometimes exceeded twice the supply voltage. My hope is that the TVS diode will take care of this but in the case that some is left over, I may rather have the LDO take the hit instead of feeding it directly to the supply voltage; so I will leave that one off. I attached an image from the scope that shows pretty much a worst-case scenario of what I will be dealing with. Between the capacitor and TVS diode I hope that it will be handled pretty well.
    del.png del2.png
     
  8. Minder

    Minder

    2,955
    624
    Apr 24, 2015
    hevans1944 likes this.
  9. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Hey Hop, you don't realize it but you just solved a mystery for me. I have a topic regarding an electronic bike horn where I reverse engineered the circuit and posted the schematic. In that schematic I indicate an NPN driving an autotransformer that jacks up the drive voltage to the Piezo.

    Well, I struggled understanding how the fast rise and fall times of the uC output didn't destroy the NPN from transformer kickback. After all I found no protection diode in there. After viewing the 2N7000 datasheet I decided to check the NPN with a DMM between (what I thought was) the Collector & Emitter (GND). Guess what? Yup, it's probably a 2N7000 as I can see the action of the internal protection diode on the DMM. Thanks! ;)
    Chris
     
    hevans1944 likes this.
  10. Minder

    Minder

    2,955
    624
    Apr 24, 2015
    Here is an original promotion of the 2n7000 when it was launched.
    M.
     

    Attached Files:

    hevans1944 likes this.
  11. hevans1944

    hevans1944 Hop - AC8NS

    4,473
    2,084
    Jun 21, 2012
    I am new to using MOSFETs (except for those that are an integral part of CMOS digital logic), if you can believe that. I was always under the impression that they were hard to work with as discrete components, being overly sensitive to static discharges, over-current, over-voltage, yada yada yada compared to ol' reliable 2N3055 that has been my go-to power NPN TO-3 packaged transistor since... well, forever. Then I got involved in PICs and power MOSFETs with the @TenderTendon Flashlight Project. Things have not been the same since. I bought a bag of a hundred 2N7000 from Digi-Key for less than twenty bucks and kinda fell in love with 'em.

    These things have been available for at least eleven years now (09 October 2004 is the earliest STMicroelectronics datasheet) but somehow I didn't get the memo. But I was looking for some transistors to use as stepper motor drivers, and ran across a newsletter announcement from Cree on their silicon carbide MOSFETs. So I bought four of those and four Cree silicon carbide Schottky diodes. It was almost an afterthought to purchase the 2N7000 devices, but they popped up in the search list at Digi-Key and the price was right.

    I still haven't started work on the stepper motor drivers, but I did try out one of the 2N7000 transistors a few weeks ago. They are very easy to directly drive with PIC output ports (no resistors necessary), and so far I haven't destroyed any of them.
     
  12. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Ironically the 2N7000 data sheet has been in my FET folder since 2013 and I too purchased a handful of them back then. The transistor in my bike horn is the SOT-23 package with a 470Ω resistor from the PIC output to the Gate. I assumed it was a bipolar SMD because I thought 470Ω was a bit high to be an anti-ringing suppressor.

    That said, I'm elated that Hop (the old fart that he is :p) posted that. It was like a light bulb switching on! It was also a classic "DUH!" moment.

    I LOVE EP! It's like ....... CHEERS... Where everybody knows your name!

    We need an "I'LL Drink To That!" smiley! :D

    Chris
     
  13. Minder

    Minder

    2,955
    624
    Apr 24, 2015
    The original promotion that I received with the PDF/sample from Siliconix is from late 80's .
    I sort of readily gravitated to Mosfet because of their kinship with tube technology with which I was raised, electronically so to speak.
    I still have many of the old IR design manuals and use Mosfets in PWM applications now.
    This may be of interest.
    M.
     

    Attached Files:

    hevans1944 likes this.
  14. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    Minder, I read it and saved it. It's something that I have to read again when my head is clear. My wife says " Yeah, when the hell is that going to be?" Hey, I'm doing my best! :)

    Thanks for posting it. It's an interesting read.
    Chris
     
  15. hevans1944

    hevans1944 Hop - AC8NS

    4,473
    2,084
    Jun 21, 2012
    I am sure the circuit will work just fine with analog control of the motor via the LDO regulator instead of PWM with a MOSFET. But I wonder, where did you get that waveform? It looks like the underdamped response from an inductor that has had a step function (or a really narrow impulse function) applied to it, which is not exactly a real-world scenario unless you plan to turn the motor on and off rapidly using the EN input to the LDO regulator.

    This motor spins a weight, mounted eccentrically on the shaft to produce vibrations, right? You control the frequency, and to some extent the amplitude, of the vibration by varying the speed of the motor? I hope this circuit isn't for some sort of high-tech sex toy, to replace the low-tech AA battery-operated junk found in a typical "love shop" sandwiched between the XXX-rated CDs and quality silicone appliances, because I was gonna get rich making a substitute (but intrinsically safe!) line-operated power supply for these things if someone didn't beat me to it!:cool:

    Square waves! Be afraid! Be VERY afraid! NOT! It just requires some good engineering to keep everything under the hood instead of radiating all over the place.
     
  16. Minder

    Minder

    2,955
    624
    Apr 24, 2015
    Also one other thing to keep in mind, with PWM control of a motor, the current does not follow the same wave form as the voltage square wave, the resultant current is more of a mean level saw tooth.
    Mosfet typically have a reverse conduction diode from D to S but they are often fairly slow so it is customary to place a external high speed schotky in parallel.
    M.
     
    hevans1944 likes this.
  17. pgib8

    pgib8

    99
    23
    Jul 26, 2015
    It's not for a sex toy, funny though. Whenever I design a circuit, I want to avoid anything that causes noise as much as feasible. Having a brushed DC motor is already bad enough, so feeding it with a variable DC voltage is doing my part to have a clean circuit.
    And about the PWM, it know of the benefits and is certainly perfect for LEDs, but in this case I'm talking about a load. It's a small load for us but in terms of the entire circuit it's the biggest load it has. I feel that the PWM is going to stress the MOSFET and the capacitors. There may be other ripple effects as well. Cost-wise it's a wash because the parts I selected are cheap.
    @hevans1944, you were correct, the scope image isn't a real-world application and that's why I said worst-case scenario.
    When you build a bridge that may see 100 tons of load, wouldn't you rather build it to handle 200 tons :)
     
  18. CDRIVE

    CDRIVE Hauling 10' pipe on a Trek Shift3

    4,960
    648
    May 8, 2012
    That has me doing a bit of head scratching because either my eyes are worse than I thought or that's a schottky diode shown in the 2N7000 data sheet.

    Chris
     
  19. hevans1944

    hevans1944 Hop - AC8NS

    4,473
    2,084
    Jun 21, 2012
    I can appreciate that design philosophy. I also try to avoid unnecessary mechanical and electrical noise in my designs. I don't know much about DC motors (other than stepper motors) from practice. The fans used to cool the CPUs in my computers are very quiet and use brushless DC motors. Whatever electronics is necessary is hidden inside the fan, but I am aware of ICs for controlling brushless motors. I don't know how quiet this type of motor is compared to DC motors with commutators and brushes of comparable power. They are more complicated.

    But apparently you have selected your DC motor (or had one selected for you) and are now given the task of controlling it. Since it only has to rotate in one direction, and efficiency is not an issue, the adjustable regulator appears to be an excellent choice.

    I would like to try this out here at home when I can find some time to do so. Could you post the part numbers for the LDO regulator and the 6-bit DAC ladder network you will use for control?:D

    PWM is late to the game for LED intensity control. I first encountered it in a commercial product for large stepper motors almost thirty years ago. Prior to that we had to use power-wasting series resistors to control the current in the windings, along with way more voltage than was really necessary to operate the motor. And the engineering was way more complicated than what was required for linear control. But the change in design paradigm was worth it. Hardly anyone drives stepper motors with series current-limiting resistors anymore.

    One commercial product we purchased in the late 1990s to control the magnetic scanning coils of a vacuum e-beam hearth used so-called Class-D output stages with MOSFETs switching at kilohertz rates and the resulting output filtered to remove the PWM fundamental and its harmonics. Total fail on that one. It blew up the MOSFETs first time I tried it. When I opened it up to look inside it was obvious they had sent us a prototype instead of a production version. So I sent it back and they sent a replacement that actually did look like a production model inside, but it didn't work either. Fortunately we had a conventional back-up scanner power supply for the e-beam (from a different manufacturer), so the "latest and greatest" almost state-of-the-art POS was put aside. I didn't even bother trying to return it for credit, but I instructed Accounting not to pay their invoice. Never heard from them again. Moral of this story: not everyone knows how to design PWM circuits. And, yes, PWM does stress the MOSFETs and capacitors. You just gotta live with it and design accordingly.

    I am not a civil engineer, so I don't know anything about building bridges. But if someone gave me a spec for a bridge to support a 100 tons of load, I certainly would not build it to handle twice that much with the added cost that entailed. There would be a safety margin in the design, perhaps a 10% or even 20% overload capability, but certainly not 100%. And, yes, I would rather build it with a 100% overload capability or even 200% or 500% or a 1000% but as a professional engineer my job would be to build it to spec, on time, and within the allotted budget with an acceptable overload capability.

    The City of Dayton recently replaced the Stuart Street Bridge over the Miami River. The new bridge is prettier than the old bridge (it has LED lights under it that change colors), but it was intentionally designed to last only 35 years (or so I am told). Imagine that! Build for obsolescence, because you know its gonna happen and you can save a few dollars now. <sigh>
     
  20. pgib8

    pgib8

    99
    23
    Jul 26, 2015
    I can certainly do that and I appreciate your interest.

    Many years ago I heard of a cell phone that they stopped selling because it didn't break. As we all know most or many companies design their products to last past the warranty and then hopefully break soon after :)

    It's kind of funny how suddenly the big hype came out about LEDs, how they are the latest and greatest even though the rest of us have been dealing with them since like 15 years ago. I definitely remember when white and blue LEDs came out, that was cool, but at ~$3 a pop I couldn't even afford them haha.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-