How to make a circuit which supply voltage is inverse propotionality to output - Page 1
Forum section: electronics / projects

author: vipbooyang
author_rank: Newbie
timestamp: February 10, 2018, 03:54:13 am
content: A DC motor control scheme needs a circuit that producesa pulse signal swinging between 0V and 9V, at a fixedfrequency of 10 kHz, and its duty cycle is to vary from 0%to 100% in inverse proportionality to a DC referencevoltage which changes randomly from 1V to 5V, i.e. if theDC reference voltage is 1V, then the duty cycle is 100%.

author: ejeffrey
author_rank: Super Contributor
timestamp: February 10, 2018, 04:12:29 am
content: The "old school" way to do this is to make a 10 kHz triangle wave, and feed that to a comparator. The other input of a comparator is the control signal. That gets you a square wave with duty cycle dependent on control voltage. Then you use a half bridge driver to power the motor.The new school way is cheaper and more compact which is to use a microcontroller with ADC input and PWM output. Just read the control voltage with the ADC and set the PWM duty cycle by any formula you want. You still need an external bridge driver.

author: vipbooyang
author_rank: Newbie
timestamp: February 10, 2018, 08:16:09 am
content: Can u help me to provide a circuit to do that with an op-amp?

author: Leo Bodnar
author_rank: Frequent Contributor
timestamp: February 10, 2018, 10:14:36 am
content: Here it ishttp://www.analog.com/en/products/linear-products/analog-multipliers-dividers.htmlLeo

author: John Heath
author_rank: Frequent Contributor
timestamp: February 10, 2018, 02:18:24 pm
content: With 2 posts I can see you are new. Welcome to the group. With most things is life less is better. For help with a project more is better. How big is the motor. What would you like to regulate. What does it look like. A picture speaks many words. You can attach a picture to your post. Your answers so far are general as the project is only described in a general way. With a more detailed description of your project a more detailed solution can be made.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 10, 2018, 02:26:38 pm
content: Just opposite (D = 100% - Vin), or actually inverse (D = 1/Vin)?It's a significant difference.Tim

author: rstofer
author_rank: Super Contributor
timestamp: February 10, 2018, 10:44:59 pm
content: Quote from: vipbooyang on February 10, 2018, 08:16:09 amIn broad terms, something like this:http://www.ti.com/lit/ug/slau508/slau508.pdfAll of the voltages are wrong for your specifications but can be corrected. All of the design rational is given.To meet all of your requirements, I would use a microcontroller. I'm not sure that it is easier. For example, the Arduino PWM library generates a frequency on the order of 500 Hz. To generate 10 kHz, you would need to get very close to the hardware. I'm pretty sure it could be done and I know it could be done with one of the faster ARM chips but that doesn't mean it is simple.You can Google for 'comparator PWM' and you might run across something closer that the link I provided above.

author: Leo Bodnar
author_rank: Frequent Contributor
timestamp: February 10, 2018, 11:07:18 pm
content: y u no notice its assignment?

author: phil from seattle
author_rank: Super Contributor
timestamp: February 10, 2018, 11:39:27 pm
content: Quote from: rstofer on February 10, 2018, 10:44:59 pm10KHz PWM on an ATMega328 (Arduino Uno or Nano) is very easy. Lots of ways to do it with minimal code.Here's one waythough I think it will mess up the delay/millis functions. There are 16 bit PWM libraries for better resolution (timer1, for example).

author: rstofer
author_rank: Super Contributor
timestamp: February 11, 2018, 12:21:54 am
content: Quote from: phil from seattle on February 10, 2018, 11:39:27 pmRight! You would have to get down to the hardware and walk away from most of the Arduino library code. That isn't a big deal but it might involve spending quality time with a user manual or datasheet.It's good that code for Timer1 is given at the link. It will save a lot of time.

author: phil from seattle
author_rank: Super Contributor
timestamp: February 11, 2018, 12:33:09 am
content: Not true at all. Literally, the "low level code" is only the 3 lines shown in that link. The timer0 based code (delay, millis) will be off by a certain amount that can be compensated for. And in the case of the timer1 library (look here.), all the libraries just work.