analog output values in picbasic


Closed Thread
Results 1 to 5 of 5

Hybrid View

  1. #1
    taos's Avatar
    taos Guest

    Default analog output values in picbasic

    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

  2. #2
    Join Date
    Oct 2003
    Location
    holland
    Posts
    251


    Did you find this post helpful? Yes | No

    Default

    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.

  3. #3
    taos's Avatar
    taos Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mat janssen
    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

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    Why not? About any op-amp will do the job... if they can accept the supply voltage range.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,116


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by mister_e
    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

Similar Threads

  1. pic18f analog comparator problem
    By david.silaghi in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 6th May 2009, 09:38
  2. Replies: 4
    Last Post: - 5th October 2008, 09:11
  3. Serious Serial Situation Setbacks...
    By Dansdog in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 7th February 2007, 03:46
  4. Analog Output from a PIC
    By robertmark68 in forum General
    Replies: 4
    Last Post: - 2nd August 2006, 18:06
  5. How to set analog pin to output 5V?
    By james in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 8th July 2004, 07:24

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts