PWM - Motor Control

A "new fashioned" televisor, using an Arduino to drive the motor and display.

Moderators: Dave Moll, Andrew Davie, Steve Anderson

Re: PWM - Motor Control

Postby Andrew Davie » Thu Mar 30, 2017 10:52 pm

User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: PWM - Motor Control

Postby Klaas Robers » Fri Mar 31, 2017 12:49 am

So: 5 volt is not enough to switch an IRF power FET on. May be you can get an IRL540? Otherwise you need an extra driver transistor. Then the circuit is just as complex as the self built "Darlington" with that extra driver transistor.

It is not impossible that you should use an inductor in series with the motor. But it is not so easy as you cannot use Ferrite ring cores. They will be saturated by the DC current. But you might wind an inductor around a ferrite rod, or just make an air coil. Until now I hoped that the inductance of the motor itself is large enough to act as the needed series inductance. The wave forms (oscilloscope) will give more information.
User avatar
Klaas Robers
"Gomez!", "Oh Morticia."
 
Posts: 1656
Joined: Wed Jan 24, 2007 8:42 pm
Location: Valkenswaard, the Netherlands

Re: PWM - Motor Control

Postby Andrew Davie » Fri Mar 31, 2017 9:31 am

Klaas Robers wrote:So: 5 volt is not enough to switch an IRF power FET on. May be you can get an IRL540? Otherwise you need an extra driver transistor. Then the circuit is just as complex as the self built "Darlington" with that extra driver transistor.

It is not impossible that you should use an inductor in series with the motor. But it is not so easy as you cannot use Ferrite ring cores. They will be saturated by the DC current. But you might wind an inductor around a ferrite rod, or just make an air coil. Until now I hoped that the inductance of the motor itself is large enough to act as the needed series inductance. The wave forms (oscilloscope) will give more information.



Thanks Klaas. To be honest I don't understand all of the comments - particularly about inductance and coils and the need thereof. However, I have ordered some IRL540 and also some NTD4096N which, although discontinued and hard to find, looked interesting. Those are going to take a few weeks to arrive, so I will work on other things and put a heatsink on my existing arrangement and only run it for short periods.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: PWM - Motor Control

Postby Harry Dalek » Fri Mar 31, 2017 3:03 pm



Its aright for him who can buy every part for a project i for one can not i have to find and reuse stuff from old circuit boards and try and match parts .

Having to buy every thing is silly when an old transistor would be just as good they either work or they don't no in between every resistor capacitor i use started its life in a tv or vcr such the only thing i buy is an ic i don't have some times sockets and pots there are never many of them to scrap from something these days .

It would never cross my mind to throw away my valve parts ..took on he's mind set there would be nothing left from the past .

Great project Andrew its way above my head a lot of it so i am just viewing in the back ground :shock:
The electromagnetic spectrum has no theoretical limit at either end. If all the mass/energy in the Universe is considered a 'limit', then that would be the only real theoretical limit to the maximum frequency attainable.
User avatar
Harry Dalek
"Fester! Don't do that to 'Thing'"
 
Posts: 5376
Joined: Fri Sep 26, 2008 4:58 pm
Location: Australia

Re: PWM - Motor Control

Postby gary » Fri Mar 31, 2017 3:30 pm

LOL, he makes some good points but they are mostly lost on a forum where many of the members would prefer to be using 1927 parts (or earlier) if they could get them.
gary
 

Re: PWM - Motor Control

Postby gary » Fri Mar 31, 2017 3:47 pm

Andrew Davie wrote: I have ordered some IRL540


If you are in a hurry Core Electronics can get one to you in 3-7 days for $4.95 + $3 shipping.
gary
 

Re: PWM - Motor Control

Postby Andrew Davie » Fri Mar 31, 2017 3:51 pm

gary wrote:
Andrew Davie wrote: I have ordered some IRL540


If you are in a hurry Core Electronics can get one to you in 3-7 days for $4.95 + $3 shipping.


Thanks! I am, and that's exactly where I ordered them from!
Cheers
A
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: PWM - Motor Control

Postby Steve Anderson » Fri Mar 31, 2017 4:08 pm


The guy is an as...err..well, you know.

He does have a point with the voltage loss across a TIP120, but you design for it. If you're developing some battery-powered device or something small with no space for heatsinks, yes, use a MOSFET to save power. But if it plugs into a wall outlet then most won't care.

In terms of performance, sure there are better, newer devices out there. The venerable BC109C was the low-noise transistor of the 70s, not any more. Yer average BC547B is quieter and depending on application FETs (junction, not MOSFETS) can be quieter still. But here we're getting into the realm of Johnson noise and there's nothing you can do about that apart from cooling the gear to absolute zero.

Any old (or new) 1k resistor sitting on your desk generates 4.07nV/(root)Hz. Over a 20kHz (audio) bandwidth that's 580nV. Compared to the professional audio reference level of 775mV RMS (1mW into 600 Ohms) = -122db. That's it at 27 Celcius (300 degrees Kelvin). It makes no difference if the resistor is an old carbon composition one or a new metal-film version or even wire-wound. It's when you apply a voltage across them the difference in noise characteristics become apparent.

Anyway, I digress. Although I have berated the 741 in the past there are still places where it can still provide exactly what is required. Likewise Germanium transistors and diodes, though they are getting harder to source and tend to be comparatively expensive.

So, if you want to use some EF80s or ECC91s in your NBTV CRT monitor, stick your middle finger up at the guy.

Steve A.

An afterthought...24-bit audio has a dynamic range of about 144db which is well beyond what our ears can either hear or withstand.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5384
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: PWM - Motor Control

Postby Andrew Davie » Fri Mar 31, 2017 11:34 pm

Harry Dalek wrote:Great project Andrew its way above my head a lot of it so i am just viewing in the back ground :shock:


Well, that's a surprise - but thanks. I consider your work light-years ahead of any capability I will EVER have. I'm just a rank amateur giving it a go. You have true talent.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: PWM - Motor Control

Postby Andrew Davie » Mon Apr 03, 2017 3:56 pm

My IRL540 MOSFETs arrived, and this is what I'm thinking....

IRL540.jpg
IRL540.jpg (82.21 KiB) Viewed 10200 times


My understanding is that I don't need a resistor at the gate-arduino, and that the 1K resistor from arduino to ground is there to prevent the motor spinning on startup when the arduino pin is "kind of" low. The motor will be driven from about 13V (measured). The Arduino pin puts out 5V as a PWM signal with a maximum current draw of 20mA. The IRL540 is, I understand, a "logic level" MOSFET and so will switch at the 5V supplied by the Arduino. I expect the device to work efficiently with little heat.

Fingers crossed! I'm still kind of clueless on a lot of this - for example, I don't really understand why I don't need a protective resistor for the Arduino pin, I'm just following advice/online resources on this one.
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: PWM - Motor Control

Postby Andrew Davie » Mon Apr 03, 2017 4:32 pm

I found the following, which is exactly what I'm doing, so I'll be OK with the above circuit.

https://books.google.com.au/books?id=bb ... no&f=false
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Re: PWM - Motor Control

Postby Steve Anderson » Mon Apr 03, 2017 5:46 pm

You could increase the 1k resistor to 10k, it's only there to tie the gate of the MOSFET to ground while the micro sorts itself out at start-up. The gate current you may assume is zero with 0V or 5V out of the micro. Delivering only (now) 500uA of current instead of 5mA when the output is high will result is slightly move drive to the FET. There should be no need for a series resistor to the gate.

Clear the register bit for that pin before enabling the output drivers so the pin goes from Hi-Z (floating) to 0V before any pulses are output. While it's Hi-Z the 10k resistor pulls the FET gate low (off). After that it's effectively of no use.

Steve A.
User avatar
Steve Anderson
"Fester! Don't do that to 'Thing'"
 
Posts: 5384
Joined: Fri Mar 30, 2007 10:54 pm
Location: Bangkok, Thailand

Re: PWM - Motor Control

Postby Andrew Davie » Mon Apr 03, 2017 11:21 pm

Well I guess there's not much point in doing a construction diary unless I include the embarrassing bits. I built up a replacement "motor board" this evening, using the IRL540 MOSFET and the circuit from just above this post. It didn't work. I figured I'd roasted the MOSFET with my clumsy soldering, and plugged the old board back in just to make sure everything was correct. Old board worked OK. I gave it a few hours break, and decided that the best course of action would be to desolder the IRL540 and put a spare in (I bought 3). However before I did that, I gave the board a good looking-over.

First I confirmed the gate, drain, source pins were the ones I expected, and they were going to where I expected. All good. I have a 10K resistor from arduino pin to ground. All good. I have ground connected to... hangon... wait, what....? The input ground is not connected to anything! OK, but I copied the original motor board - where's it supposed to be connected -- dig out that board to check and... WTF?!! The ground input on that board is also NOT CONNECTED. But that board works, this one doesn't. Obviously a fault, and I'm lucky (and extremely surprised!) that the old board worked at all. Magic.

So, I bridged the ground input from the 12V to the common ground, and tried the new board again - and - all working perfectly! Still stunned that I made that mistake on the original board and somehow it works. C'est la vie! So, an observation - to get resonably close to correct disc speed on the old board I had to set the PWM duty cycle to around 55/255. With the new board it's 43/255. So I guess that's a reflection of the efficiency of the IRL540 compared to the TIP122. Interesting, anyway!

I also had a bit of a play with adding a brightness offset to the signal, just to see how that worked. Really well, actually. So I did a bit of an extended video just showing some of the ubiquitous Doctor Who episode I've been using for my testing...


youtu.be/NHvz4QR3Wzg
User avatar
Andrew Davie
"Gomez!", "Oh Morticia."
 
Posts: 1590
Joined: Wed Jan 24, 2007 4:42 pm
Location: Queensland, Australia

Previous

Return to Andrew Davie's Arduino Televisor

Who is online

Users browsing this forum: No registered users and 8 guests