Author Topic: Is there simple to use 15-30kHz PWM IC? Or ATTINY85 instead?  (Read 1649 times)

0 Members and 1 Guest are viewing this topic.

Offline 3dgeoTopic starter

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: au
Is there simple to use 15-30kHz PWM IC? Or ATTINY85 instead?
« on: August 13, 2018, 11:17:41 pm »
Hi,

DC motor gets its voltage from PWMed mosfet and I want to remove PWM function from main MCU due to already complicated code.
Duty cycle is based on PSU voltage with help of voltage divider, is there a simple PWM IC for this task?
I prefer IC instead of ATTINY, I think It would be more stable and its less chance of it crashing and sending full voltage all the time, am I right?
 

Offline EmmanuelFaure

  • Regular Contributor
  • *
  • Posts: 154
  • Country: 00
Re: Is there simple to use 15-30kHz PWM IC? Or ATTINY85 instead?
« Reply #1 on: August 13, 2018, 11:58:24 pm »
LTC6992
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3481
  • Country: us
Re: Is there simple to use 15-30kHz PWM IC? Or ATTINY85 instead?
« Reply #2 on: August 14, 2018, 03:57:29 pm »
An FET biased to be the resistor for the RC of a 555 might be suitable.  Another option would be the same strategy with an op amp based variable duty cycle pulse generator.
 

Offline Buriedcode

  • Super Contributor
  • ***
  • Posts: 1611
  • Country: gb
Re: Is there simple to use 15-30kHz PWM IC? Or ATTINY85 instead?
« Reply #3 on: August 14, 2018, 04:22:48 pm »
Hi,

DC motor gets its voltage from PWMed mosfet and I want to remove PWM function from main MCU due to already complicated code.
Duty cycle is based on PSU voltage with help of voltage divider, is there a simple PWM IC for this task?
I prefer IC instead of ATTINY, I think It would be more stable and its less chance of it crashing and sending full voltage all the time, am I right?

It is true that an MCU option often has the downside of possible latch-up or software glitches - but often PWM is generated from a hardware module independent of the actual CPU.  This means reliability is down to its clock.  Also more modern MCU's have comparators used in conjunction with the PWM module for fault conditions - to stop the PWM either high or low when triggered.  An MCU option is almost always more precise - perhaps not in absolute terms of frequency if using built-in oscillator (which is less precise than an external xtal) but will always have good linearity, since its all digital.

It all depends on the requirements.  For controlling the brightness of an LED then frequency and even duty need not be that precise.  For your DC motor, if there is no feedback then I assume you do not require great precision in which case a relatively simple analogue approach (comparators..opamps, or even the 555) would be fine.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5870
  • Country: de
Re: Is there simple to use 15-30kHz PWM IC? Or ATTINY85 instead?
« Reply #4 on: August 14, 2018, 06:31:43 pm »
New Record!!!! The second answer was a 555. Aaaaaarrrrggghhh!

 

Online oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
Re: Is there simple to use 15-30kHz PWM IC? Or ATTINY85 instead?
« Reply #5 on: August 14, 2018, 07:28:45 pm »
TL494  KA7500  TL594

Very common parts in switching power supplies.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3481
  • Country: us
Re: Is there simple to use 15-30kHz PWM IC? Or ATTINY85 instead?
« Reply #6 on: August 14, 2018, 09:32:29 pm »
New Record!!!! The second answer was a 555. Aaaaaarrrrggghhh!

Have you considered seeing a therapist?  Would it have helped if I mentioned the op amp approach first?

Thirty years ago I built an alarm system with entry and exit delays and a siren time out using  555s.  It was a good fit for the task except for lightening induced transients in the sense lines..  But that could have been fixed with a TTL missing pulse detector buffer.  I moved, so I never made the upgrade.

I haven't used a 555 since then that I can recall.  But I do try to fit the solution to the problem rather than the obviously more popular fit the problem to the solution approach.
 

Online IconicPCB

  • Super Contributor
  • ***
  • Posts: 1534
  • Country: au
Re: Is there simple to use 15-30kHz PWM IC? Or ATTINY85 instead?
« Reply #7 on: August 14, 2018, 10:19:04 pm »
Damn,
Beaten to the punch.

What rhb said.

EDIT:

In Australia a microprocessor guarantees the need for EMI EMC testing and certification. 555 does not.
« Last Edit: August 14, 2018, 10:21:51 pm by IconicPCB »
 

Offline 3dgeoTopic starter

  • Frequent Contributor
  • **
  • Posts: 289
  • Country: au
Re: Is there simple to use 15-30kHz PWM IC? Or ATTINY85 instead?
« Reply #8 on: August 15, 2018, 02:13:08 am »
Thank You all for replies,

LTC6992 would be very nice, but to get it in my country will cost too much, other IC is just too complicated compared to ATTINY.
I think I'll go with ATTINY85, bonus of using it that I could feed rotary encoder and limits switches to it and monitor if something went wrong, for example if motor get stuck (no rotaty pulses) but no limit was activated I can disable PWM.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11630
  • Country: my
  • reassessing directives...
Re: Is there simple to use 15-30kHz PWM IC? Or ATTINY85 instead?
« Reply #9 on: August 15, 2018, 04:32:10 am »
as Buriedcode suggested, use hardware feature of the mcu, with few IO setup code lines during startup and then a single line during execution loop is all it takes to run like Flynn. stupid things happen only when you put stupid code in there, so dont put stupid code. ymmv.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf