View Full Version : analog output values in picbasic
taos
- 15th March 2006, 07:19
Hi!
How can I using PIC16F877 output analog values (0-5v) to control a DC motor from (0-24v)?
What hardware do I need?
any source code example in picbasic?
Regards
mat janssen
- 15th March 2006, 07:31
You can use the HPWM command to generate pwm at an outputpin.
The take a RC network to make a dc voltage from your pwm.
That dc voltage will go from 0 till 5 volts.
After that take an opamp like an LM324 (4 amp's in 1 ). Build this as a noninverting amplifier of 5 times.
Supply the opamp with a supplyvoltage of 30 volts.
taos
- 15th March 2006, 14:44
After that take an opamp like an LM324 (4 amp's in 1 ).
Ok, good idea, but can I use an LM358? I have found a example in this forum with this opamp (0-10v output) so changing resistors I can make it 0-24v output. I think...
Regards
mister_e
- 15th March 2006, 16:03
Why not? About any op-amp will do the job... if they can accept the supply voltage range.
Ioannis
- 16th March 2006, 07:16
Why not? About any op-amp will do the job... if they can accept the supply voltage range.
And also if they are Rail-to-Rail...
See also the LMC66x series from NS. Low power and 5V.
Ioannis
Powered by vBulletin® Version 4.1.7 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.