Analog issue


Closed Thread
Results 1 to 19 of 19

Thread: Analog issue

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Question

    Hi, JM

    That looks to be dealing with high voltage ... and very high instant currents.

    May be also a switching up converter to think to ...


    soooo ...

    are you REALLY sure there's no spike on either an ADC input or 5v supply rails ???

    could we have a piece of scheme showing the Fet's drive and the ADC inputs ???

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    There could be spikes - I have yet to measure for that. And yes, we are switching 2 channels, both at 760W each. 24v at 31.6 Amps.

    I'd have to ask the whole forum to sign an NDA to show you the schematic, but the 5v line has a lot of capacitance but the inputs do not as I cant wait for the line to charge. From input pulse to output on needs to be less than 35uS. My customer wanted 5uS or less originally!!

  3. #3
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by jmgelba View Post
    My customer wanted 5uS or less originally!!
    Make it so . . http://www.realmagicwands.com/
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #4
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    Just measured for spikes - there are some small ones on the 5v line lasting in the uS range. Largest I've seen was 0.341V. ADC line is dirty. I'm sampling for 20uS. I'll put a .1uF and a 1nF on there and see what happens.

    I put a 10ms delay at the end of the flash subroutine and so far that looks to be working.

  5. #5
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Wink

    Hi,

    One thing you easily can do is lock your inputs as soon as Fets fired ... you have the time the capacitors charge for gliches " hiding" ...

    I'll search on my HDD ... there's an old Elektor project of a ... discharge capacitor welding machine for NiCads ...

    Your application HardW should not be so far from that !!!

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  6. #6
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    Hmm have a problem else where. Just to verify my 10ms delay was working, I increased it to 1000ms. Now the flash (FET's)does not respond to the input. I can send a pulse and nothing happens, then I get lucky some times. Turns out that the program is running and pausing for 1000ms as though there has been a pulse sent.

    So the problem I have is it is running through the whole program and not returning to MAIN and waiting for a pulse.

    Code:
    IF (BNK1 => 466) OR (BNK2 => 466) THEN FLASH
    goto MAIN
    This should make the program jump back to the start of MAIN unless the ADC is 466 or higher, right?



    Code:
    FLASH:
    IF PORTA.4 = 1 OR PORTA.5 = 0 THEN 
    PORTB.0 = 0 : PORTB.1 = 0 : PORTB.3 = 1
    endif
    
    
    IF DUR = 1 THEN 
    PAUSE 1
    endif
    IF DUR = 2 THEN 
    PAUSE 2
    endif
    IF DUR = 4 THEN 
    PAUSE 4
    endif
    IF DUR = 8 THEN 
    PAUSE 8
    endif
    PORTB.0 = 1 : PORTB.1 = 1 : PORTB.3 = 0
    PAUSE 1000
    GOTO MAIN
    the program is running the FLASH routine without actually sending a pulse out to the FETs unless one of the inputs is triggered. I know this because I can measure the time delay between applying an input signal and waiting for an output.

    So my question is, why is there up to a 1 second delay between applying a signal and getting an output?

  7. #7
    Join Date
    Feb 2004
    Location
    Michigan, USA
    Posts
    305


    Did you find this post helpful? Yes | No

    Default

    Nevermind - I see it. The flash routine will only fire the FETS if there is an input, it will still run the routine if there is an input or not. OK, so, how do I get it to go back to the start of the program if there is no input rather than go through the whole flash routine and wait that 1000mS?

  8. #8
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default

    Got it !!!

    I only can pass the program ( AT Tiny ...) but it can give you some ideas.
    the article with scheme ( nothing special ) is 400 kb ..

    But you can retrieve it from the english Elektor site. ( year is 2006 )

    Alain
    Attached Files Attached Files
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

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. Pic getting part power from Analog Port
    By ShaneMichael in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 22nd April 2009, 10:34
  3. Help with Analog Interrupt
    By brid0030 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 13th February 2008, 18:14
  4. 18F1320 ... Strange Memory
    By Acetronics2 in forum mel PIC BASIC Pro
    Replies: 43
    Last Post: - 9th April 2006, 09:55
  5. analog inputs on 16F716
    By schwinn_rider in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 6th October 2005, 04:07

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