A/D converter problem


Closed Thread
Results 1 to 6 of 6
  1. #1

    Default A/D converter problem

    Hi Everyone,
    I am having difficulty using Pic’s onboard A/D converter. Can someone give an advise please.
    I want to measure the voltage across automotive battery when the car is running. When the vehicle is stationary the power to the PIC is off (to prolong the battery quiescent time). So I assembled a simple test circuit on the bench. The problem is that when the power to the Pic is off it still could be powered if the potentiometer is in high(5v) position. But the one that worries me the most is if the potentiometer is in midway( I read around 1.3v at Vdd with Pic’s 5v disconnected) position the Pic locks up and I have to reconnect the power several times to reset it and make it go again.
    I really don’t want to use external brown out circuitry if possible. May be you’ve come across the same problem. If yes please share your experience.
    Attached Images Attached Images    

  2. #2
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    There is no easy solution to your problem. If the main power is OFF to the PIC, then it can be powered via any of it's input pins through it's internal protection Diodes.

    Easiest and cheapest solution is to power the PIC at all times, but when it is not needed, put it to SLEEP to conserve Battery power.

    Otherwise you will have to devise additional circuitry to disconnect all independently powered pins from the PIC when it needs to be switched OFF. If you only have ONE independently powered and connected pin, then a single 5v Reed Relay is the easiest solution... when the PICs supply is disconnected, the Relay will disconnect your input.

  3. #3


    Did you find this post helpful? Yes | No

    Default

    Hi Melanie,
    Thanks for the advise. A reed relay disconnecting the input will do the job. I got one from local electronics supplier. It is 100v 0.5A 500Om coil. I tried to drive it directly of Pic’s pin and it works well. I attached the oscillogram.
    Attached Images Attached Images  

  4. #4
    Join Date
    Jul 2003
    Posts
    2,358


    Did you find this post helpful? Yes | No

    Default

    Just remember that if it hasn't got a built-in Diode to protect against back-emf spikes, you must add one otherwise you will run the risk of destroying the PIC pin that the coil is connected to.

  5. #5
    Join Date
    Jul 2003
    Location
    USA - Arizona
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    For multiple inputs you can look at analog switches (e.g. MAX312 and equivalents). These will require a few additional parts to guarantee the power-up conditions (e.g. pull-ups or pull-downs on control lines).

  6. #6


    Did you find this post helpful? Yes | No

    Default

    Just found one more solution reading this thread http://www.picbasic.co.uk/forum/show...hlight=jswayze

    I put 10k resistor in series with the AD pin and changed the PIC to 12F683 or 16F684 (it doesn’t work with 16HV785).
    Attached Images Attached Images  

Similar Threads

  1. Replies: 9
    Last Post: - 31st July 2008, 08:56
  2. A/D conversion problem in 18F2520, 2523, 2550 etc.
    By selimkara in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 10th March 2008, 16:26
  3. A/D converter fails?
    By egberttheone in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 13th February 2006, 18:57
  4. A/D converter with pic16f84, i need a help
    By micro in forum General
    Replies: 0
    Last Post: - 13th December 2005, 21:17
  5. help with pic16f870 a/d converter
    By cammo in forum mel PIC BASIC
    Replies: 3
    Last Post: - 22nd March 2005, 05:16

Members who have read this thread : 1

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