Comparator circuit thoughts....


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1
    Join Date
    Dec 2005
    Location
    Salt Lake City, Ut, USA
    Posts
    108


    Did you find this post helpful? Yes | No

    Default

    mackrackit,

    No more confusion than before . Actually, the way you described the voltage scaling makes more sense to me now. As far as the torch voltage is concerned, maybe I added confusion from the beginning by not stating what would be a good baseline hysteresis to go with. After trying to get my head around the scaling, I started looking at the numbers more, and in doing that, I think a resolution of 1 volt change at the torch would be more than ok. That being said, that's where I figured using a torch value ranging from 0 - 256 Vdc...

    8 bit ADC
    4 Vdc Vref
    Vdc per ADC count : 4 / 256 = .015625
    Torch Vdc scale : 1:64
    Torch Vdc per ADC count : .015625 * 64 = 1 Vdc
    Ex: Torch Vdc = 115
    ADC counts * Vdc per ADC count = ADC Vdc Now
    115 * .015625 = 1.796875 Vdc
    1.796875 * Torch Vdc scale = Torch Vdc
    1.796875 * 64 = 115 Torch Vdc
    So... for every 1 Vdc change at the torch, there will be a 1 count change at the ADC... correct?

    If this is the case, coding for this arrangment should be way easier?
    Am I making this easier or harder on myself? I think it's sinking in slowly but surely. Thanks for assisting me on my brain fryer!

    Chris
    Last edited by kevlar129bp; - 23rd October 2009 at 16:30. Reason: scattered

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I think you got it.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Dec 2005
    Location
    Salt Lake City, Ut, USA
    Posts
    108


    Did you find this post helpful? Yes | No

    Default

    Thanks mackrackit,

    I'll hack away at a bit of the code and see what I get... Will you be around for some assistance in that arena, when I get to that point?

    Thank you again... TONS!

    Chris

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    We are always here....

    Start the testing with a POT to simulated the torch.

    Which PIC are you going to use?
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Dec 2005
    Location
    Salt Lake City, Ut, USA
    Posts
    108


    Did you find this post helpful? Yes | No

    Default

    mackrackit,

    In looking at my options, I think the 16F88 is going to do the trick. I'de like to plan ahead to do something like this on the front of the cnc pc. I dunno, let me know what you think... And again, thank you so much for your help. I'm working through the code as we speak

    Chris
    Attached Images Attached Images  

  6. #6
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    At this point I would say whatever you have laying around. The 88 is good for starters. Might run out of memory or pins later but might not.

    But how are you writing code if you have not picked a PIC?
    Dave
    Always wear safety glasses while programming.

  7. #7
    Join Date
    Dec 2005
    Location
    Salt Lake City, Ut, USA
    Posts
    108


    Did you find this post helpful? Yes | No

    Default

    I have opted to write the code for the '88. Hopefully I don't run out of space . I'll keep you posted on that one.

Similar Threads

  1. Stable Adc Reading Routine
    By gebillpap in forum General
    Replies: 27
    Last Post: - 13th May 2015, 02:18
  2. Quick thoughts: DT Ints with encoders
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 7th January 2010, 01: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