Comparator voltage reference module


Closed Thread
Results 1 to 13 of 13
  1. #1
    Join Date
    Sep 2014
    Posts
    25

    Default Comparator voltage reference module

    Pls tell me what is the use of comparator voltage reference module?

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,523


    Did you find this post helpful? Yes | No

    Default Re: Comparator voltage reference module

    To provide the comparator(s) with an internally generated reference voltage so you don't have to "waste" a second I/O pin for that.

  3. #3
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Comparator voltage reference module

    It also allows one to change the comparator voltage in software.
    Dave Purola,
    N8NTA
    EN82fn

  4. #4
    Join Date
    Sep 2014
    Posts
    25


    Did you find this post helpful? Yes | No

    Default Re: Comparator voltage reference module

    Actually in my temperature controller circuit ADC value fluctuates with wide range when a heavy load through a relay is connected.I am using 16f876a micro and Pin A0 as ADC input.

  5. #5


    Did you find this post helpful? Yes | No

    Default Re: Comparator voltage reference module

    Sounds like you want to buffer that relay.

    George

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,625


    Did you find this post helpful? Yes | No

    Default Re: Comparator voltage reference module

    If the load is a motor, current spikes on start-up. Might want to average sampling, or delay between samples.

    Robert

  7. #7
    Join Date
    Sep 2014
    Posts
    25


    Did you find this post helpful? Yes | No

    Default Re: Comparator voltage reference module

    Load is 4 kw heater.Somebody in here in Lucknow ( India) told me to use comparator voltage reference module.I don't know what to do .Confused.

  8. #8
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,625


    Did you find this post helpful? Yes | No

    Default Re: Comparator voltage reference module

    Pause for a few seconds when the relay is activated, then start taking samples.

    Robert

  9. #9
    Join Date
    Sep 2014
    Posts
    25


    Did you find this post helpful? Yes | No

    Default Re: Comparator voltage reference module

    Here is my code_----


    'DIGITAL TEMP CNTROLLER USING 16F876A'


    DG1 VAR BYTE
    DG2 VAR BYTE
    DG3 VAR BYTE
    DIGIT VAR BYTE
    DG VAR BYTE
    COUNTT VAR BYTE

    NUMB VAR WORD
    N VAR WORD
    adval var word
    temp var word
    TEMPP VAR WORD


    ADCON1=%10000000
    adcon0=%00000101
    TRISA=1
    TRISB=%00111000
    TRISC=0


    gosub mread
    n=numb
    GOSUB DIGITCALC





    '-------------------------------------------------------------------------

    MAIN1:

    GOSUB DISPLAY

    IF PORTB.3=1 THEN MREAD

    IF PORTB.3=0 THEN MAIN




    GOTO MAIN1






    '-------------------------------------------------------------------------
    MAIN:

    ADCON0.2=1

    GO:
    IF ADCON0.2=1 THEN GO

    adval.HIGHBYTE = ADRESH
    adval.lowbyte = ADRESL

    'temp=(adval*500)/1024
    temp=adval
    N=temp
    gosub display
    gosub digitcalc


    If adval>NUMB then PORTB.7=0
    pause 1000
    IF ADVAL< NUMB-5 THEN PORTB.7=1
    pause 1000
    GOTO MAIN1


    '_____________________________________

    UP:
    IF NUMB=400 THEN MAIN
    NUMB=NUMB+1
    N=NUMB
    GOSUB DIGITCALC
    IF PORTB.4=1 THEN MEMORY
    GOTO MAIN1


    memory:
    WRITE 0,numb.HighByte

    WRITE 1,numb.LowByte

    GOTO MAIN1

    '_____________________________________

    DOWN:
    IF NUMB=0 THEN MAIN 'MIN LIMIT
    NUMB=NUMB-1
    N=NUMB
    GOSUB DIGITCALC
    IF PORTB.5=1 THEN MEMORY
    GOTO MAIN1


    '_____________________________________
    MREAD:
    READ 0,numb.HighByte

    READ 1,numb.LowByte

    n=numb
    gosub digitcalc
    IF PORTB.4=1 THEN UP
    IF PORTB.5=1 THEN DOWN
    goto main1











    __________________________________________________ _
    DISPLAY:


    FOR COUNTT=0 TO 99

    PORTC=DG1
    PORTB.2=1
    PAUSEUS 300
    PORTB.2=0

    PORTC=DG2
    PORTB.1=1
    PAUSEUS 300
    PORTB.1=0

    PORTC=DG3
    PORTB.0=1
    PAUSEUS 300
    PORTB.0=0

    NEXT COUNTT

    RETURN

    '_________________________________________________ _______________



    '_________________________________________________ _________________________
    DIGITCALC:

    DIGIT=0
    LP1:
    IF N<100 THEN DS1
    N=N-100
    DIGIT=DIGIT+1
    GOTO LP1
    DS1:
    GOSUB FND
    DG1=DG


    DIGIT=0
    LP2:
    IF N<10 THEN DS2
    N=N-10
    DIGIT=DIGIT+1
    GOTO LP2

    DS2:
    GOSUB FND
    DG2=DG

    DIGIT=N
    GOSUB FND
    DG3=DG

    RETURN




    '_________________________________________________ _________________________


    '_________________________________________________ _________________________
    FND:

    FND0:
    IF DIGIT>0 THEN FND1
    DG=$7E '%0111 1110
    GOTO FNDEND

    FND1:
    IF DIGIT>1 THEN FND2
    DG=$48 '%0100 1000
    GOTO FNDEND

    FND2:
    IF DIGIT>2 THEN FND3
    DG=$3D '%0011 1101
    GOTO FNDEND

    FND3:
    IF DIGIT>3 THEN FND4
    DG=$6D '%0110 1101
    GOTO FNDEND

    FND4:
    IF DIGIT>4 THEN FND5
    DG=$4B '%0100 0011
    GOTO FNDEND

    FND5:
    IF DIGIT>5 THEN FND6
    DG=$67 '%0110 0111
    GOTO FNDEND

    FND6:
    IF DIGIT>6 THEN FND7
    DG=$77 '%0111 0111
    GOTO FNDEND

    FND7:
    IF DIGIT>7 THEN FND8
    DG=$4C '%0100 1100
    GOTO FNDEND

    FND8:
    IF DIGIT>8 THEN FND9
    DG=$7F '%0111 1111
    GOTO FNDEND

    FND9:
    DG=$6F '%0110 1111


    FNDEND:



    RETURN
    '_________________________________________________ _________________________

  10. #10
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,625


    Did you find this post helpful? Yes | No

    Default Re: Comparator voltage reference module

    Comments would be helpful.

  11. #11
    Join Date
    Sep 2014
    Posts
    25


    Did you find this post helpful? Yes | No

    Default Re: Comparator voltage reference module

    My problem is solved by using a 220 uf capacitor in my thermocouple amplifier. Now another problem arose .I think my circuit hangs.After running fine for a hour display on seven segment goes off.When I re- start circuit it works again.What can I do to rectify it.

  12. #12
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    2,625


    Did you find this post helpful? Yes | No

    Default Re: Comparator voltage reference module

    Hard to answer without a schematic.

    How is your power supply, enough current? Do other devices turn on during this time and take up too much current?


    EDIT: Blink a LED in this part just to be sure nothing is going wrong.

    Code:
    MAIN:
    
    ADCON0.2=1 
    
    GO:
    IF ADCON0.2=1 THEN GO
    Last edited by Demon; - 16th December 2014 at 20:22.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  13. #13
    Join Date
    Sep 2014
    Posts
    25


    Did you find this post helpful? Yes | No

    Default Re: Comparator voltage reference module

    I will share my schematic tomorrow? Thanks Demon ( ji)

Similar Threads

  1. 16F886 and Voltage reference
    By retepsnikrep in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th August 2013, 18:15
  2. Fixed Voltage Reference
    By kduck63 in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 20th April 2012, 11:27
  3. ADC with reference voltage
    By GoldStar in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 20th May 2010, 21:01
  4. COMPARATOR - Voltage Reference settings
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 9th October 2007, 07:06
  5. AD Negative Voltage reference
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 28th June 2007, 15:01

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