Announcement

Collapse
No announcement yet.

New Bipolar Boost TX and Front End

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • eclipse
    replied
    Originally posted by waltr View Post
    PIC32MZ2048EFM144

    Look up the Output Compare modules in the data sheet. These can be used for precise timing and run completely in the hardware.
    Oh man thanks would never have figure it out. I was really stuck. I owe you a nice bottle of whiskey!

    Leave a comment:


  • waltr
    replied
    Originally posted by eclipse View Post
    Which model are you working with and did you use C for coding the firmware?
    Never managed to get mine to work with precision timings in the ns range, pwm and adc pots.
    PIC32MZ2048EFM144

    Look up the Output Compare modules in the data sheet. These can be used for precise timing and run completely in the hardware.

    Yes, use XC32 C code which only sets up TMR2 and the OC modules.
    TMR2 is clocked from PBCLK at 100MHz so 10ns per timer count.
    Here is the OC.c code to setup TMR2 and OCs.
    Code:
    #include <sys/attribs.h>
    #include "oc.h"
    
    void OC_Initialize (void)
    {
        // ON = 1 enabled  
        // SIDL = 0 disabled
        // OC32 = 0 16-bit Mode;  
        // OCTSEL = 0 Timerx -> TMR2      
        // OCM = 101 Initialize OCx pin low; generate continuous output pulses on OCx pin
        // OCxCON = 1000 0000 0000 0101 = 0x8005
        // Based on PBCLK = 100 MHz
         
        // OCxR =  Rising edge
        // OCxRS = Falling edge
        // OC interrupts on Falling edge or OCxRS match
        
        // OC1 init - TX1   R@10us--F@260us: 250us pulse
        OC1R    = 0x01F4;      // 500
        OC1RS   = 0x32C8;     // 13000
        OC1CON  = 0x8005;    // 1000 0000 0000 0101
    //    CFGCON<16> = 0  
     
        // OC2 init - TX2   R@510us--F@760us: 250us pulse
        OC2R    = 0x639C;        // 25500
        OC2RS   = 0x9470;       // 38000
        OC2CON  = 0x8005;      // 1000 0000 0000 0101  
        
        // OC3 init - TX_B1     [email protected]@14.42us: 4.41us pulse
        OC3R    = 0x01F5;      // 501
        OC3RS   = 0x02D1;     // 721
        OC3CON  = 0x8005;    // 1000 0000 0000 0101
        
        // OC4 init - TX_B2     [email protected]@514.42us: 4.41us pulse
        OC4R    = 0x639D;      // 25501
        OC4RS   = 0x6478;     // 25720
        OC4CON  = 0x8005;    // 1000 0000 0000 0101
    
        // OC5 init - SW    R@9us--F@509us: 500us pulse
        OC5R    = 0x01C2;      // 450
        OC5RS   = 0x636A;     // 25450
        OC5CON  = 0x8005;    // 1000 0000 0000 0101
        
        // OC6 init - Dp_1  R@[email protected]: 253.87us pulse
        OC6R    = 0x01C2;      // 450
        OC6RS   = 0x3357;     // 13143
        OC6CON  = 0x8005;    // 1000 0000 0000 0101
        
        // OC7 init - Rb_1  R@[email protected]: 254.37us pulse
        OC7R    = 0x01C2;      // 450
        OC7RS   = 0x3370;     // 13168
        OC7CON  = 0x8005;    // 1000 0000 0000 0101
        
        // OC8 init - Dp_2  R@[email protected]: 253.97us pulse
        OC8R    = 0x636B;      // 25451
        OC8RS   = 0x94FF;     // 38143
        OC8CON  = 0x8005;    // 1000 0000 0000 0101
        
        // OC9 init - Rb_2  R@[email protected]: 254.37us pulse
        OC9RS = 0x9518;       // 38424
        OC9R  = 0x636A;        // 25450
        OC9CON = 0x8005;    // 1000 0000 0000 0101
        
        
        // TMR2 init- this drives all OC modules
        // Period = 0.001s; PB Frequency = 100000000 Hz; 
        PR2 = 0xC350;   // 50000 cnts 
        
        // ON=enabled
        // SIDL=disabled
        // TGATE=disabled
        // TCKPS=1:2 pre-scaler
        // T32=16 Bit
        // TCS=PBCLK   
        T2CON = 0x8010;     // 0b 1000 0000 0001 0000
    
        IFS0CLR= 1 << _IFS0_T2IF_POSITION;
        TMR2 = 0x0000;      // clear
        // All OC outputs are now pulsing
        
    //    IEC0SET = _IEC0_OC3IE_MASK;
    //    IEC0SET = _IEC0_OC4IE_MASK;
        IEC0CLR = _IEC0_OC3IE_MASK;
        IEC0CLR = _IEC0_OC4IE_MASK;
    }
    
    // Start TX, S1 & S2 pulses from OC
    void Start_pulses (void)
    {
        T2CONSET = _T2CON_ON_MASK;          // start TMR2 & OC timing
        IFS0CLR = _IFS0_OC1IF_MASK;         // clear OC1 interrupt flag
        IEC0SET = _IEC0_OC1IE_MASK;         // enable OC1 interrupt
    }
    
    void Sample_pulses_on (void)
    {
        OC2CONSET = _OC2CON_ON_MASK;  // OC module ON
        OC1CONSET = _OC1CON_ON_MASK;
        OC4CONSET = _OC4CON_ON_MASK;
    }
    void Sample_pulses_off (void)
    {
        OC2CONCLR = _OC2CON_ON_MASK;  // OC module OFF
        OC1CONCLR = _OC1CON_ON_MASK;
        OC4CONCLR = _OC4CON_ON_MASK;
    }
    
    void en_OC1_int(void)
    {
        IEC0SET = _IEC0_OC1IE_MASK;   // enable OC1 interrupt
    }
    void dis_OC1_int(void)
    {
        IEC0CLR = _IEC0_OC1IE_MASK;   // disable OC1 interrupt
    }
    
    // OCxR =  Rising edge
    // OCxRS = Falling edge
    // OC interrupts on Falling edge or OCxRS match
    //
    // OC1 = TX1 pulse
    // on falling edge start ADC conversions
    void __attribute__((no_fpu)) __ISR(_OUTPUT_COMPARE_1_VECTOR, ipl5AUTO) _IntOC1(void)
    {
        LATKINV = 0x0010;                   // K4 Ard_D2_T
        IFS0CLR = _IFS0_OC1IF_MASK;
        // Start the ADC
        IFS0bits.T3IF  = 0;
        TMR3 = 0;                           // reset TMR3 counts
        T3CONSET = _T3CON_ON_MASK;          // start timer to trigger ADC
    }

    Leave a comment:


  • eclipse
    replied
    Originally posted by waltr View Post
    I do have a PIC32MZ EF running the required timing pulses with 10nsec resolution from hardware.
    Now learning how to use the other peripherals in this PIC.
    Which model are you working with and did you use C for coding the firmware?
    Never managed to get mine to work with precision timings in the ns range, pwm and adc pots.

    Leave a comment:


  • KingJL
    replied
    Originally posted by waltr View Post
    ... Good all is well and hope the relocation goes smoothly...
    Thanks!!

    I do have a PIC32MZ EF running the required timing pulses with 10nsec resolution from hardware...
    That will allow you to exploit the capabilities of the ADuM design. While we are in a hiatus of testing, we have been addressing some limitations of the current design... One being that as currently designed, you can only get 1A TX with a coils of 1.5 ohm. If, for example, you used a 4 ohm coil, you could get at best about 375ma. The new design will allow for use of coils from 1 ohm to 5 ohm with automatic setting of TX current to 1A (once you set the coil resistance in the interactive display). There are a few other refinements in progress.

    Leave a comment:


  • waltr
    replied
    Was thinking I haven't seen an update. Good all is well and hope the relocation goes smoothly.

    I do have a PIC32MZ EF running the required timing pulses with 10nsec resolution from hardware.
    Now learning how to use the other peripherals in this PIC.

    Leave a comment:


  • KingJL
    replied
    Originally posted by green View Post
    Been awhile, hope everything is going good.
    Everything is good... just on a hiatus while a residential relocation is in progress. All my test equipment, parts, etc. is packed in boxes waiting for the move. Should be settled and back to testing by early June. In the meantime we are working on the single board version (without toroids) design (my computer is not boxed up).

    Leave a comment:


  • green
    replied
    Been awhile, hope everything is going good.

    Leave a comment:


  • Mdtoday
    replied
    Originally posted by KingJL View Post
    I finally received the smd resistor sets that included the values needed for completion of the PCB load. Loaded the remaining components (R7, R8, R9, R11) and started testing; voltages first and then live signals without coil. Immediately, there were indications that something was amiss... there was the smell of a hot component and it seemed that M2, M5 and associated diodes were a little too warm. Also the 5V rail was being drawn down to about 3V. Thanks to the inrush current limiter on the 5V line no real damage was done as the current was limited to 1.5A.


    The initial problem found was a bad connection between U6 pin 7 and M5 pin 2. After that was resolved, it was found that M2 gate had a constant 15V applied. All connections of M2 and U8 were re-heated and that problem was resolved. The last problem with connections appeared to be with the 20 pin connector between the TX/RX PCB and the Cmod-A7 IF PCB? the TX-A signal kept disappearing. I had not yet mechanically fastened the two PCB's together. Fastening the PCB's together with the appropriate standoffs allowed testing to proceed with reliable signalling.


    A check of TX_COIL+ and TX_COIL- indicated an anomaly to what was expected. What was expected at these points, was that the level would be about the REF voltage (10V) going to <1V during the respective TX-A/B period (TX-A for TX_COIL+ and TX-B for TX_COIL-).


    I adjusted the REF voltage (via RV1) to indicate 1.65V (1/2 of 3.3V) viewed at CMOD-A7 pin 15.


    At this time the TX/RX PCB with no coil attached is working as expected.


    Next step is to add the coil into the circuit. The coils is a 10.25" coil, of 21 turns of AWG 24, 1mm diam wire, measuring 317uH, 1.4 ohm. Unshielded, the coil exhibits ~80pf capacitance... shielded it exhibits ~129pf capacitance. The cable will be > 1 meter of Belden 9841 1 pair with braided shield... the shield will be connected to the coil shield at the coil end and to GND at the coil/PCB connector. The coil shield will NOT be connected to either of the coil wires.
    Looking good, excellent progress JL, thanks for the update, I will make the required changes to my board and test and report back.

    I?ve made some good progress on the new coil shells and should have some off to you around mid February.

    Leave a comment:


  • KingJL
    replied
    Testing Fully Loaded PCB

    I finally received the smd resistor sets that included the values needed for completion of the PCB load. Loaded the remaining components (R7, R8, R9, R11) and started testing; voltages first and then live signals without coil. Immediately, there were indications that something was amiss... there was the smell of a hot component and it seemed that M2, M5 and associated diodes were a little too warm. Also the 5V rail was being drawn down to about 3V. Thanks to the inrush current limiter on the 5V line no real damage was done as the current was limited to 1.5A.


    The initial problem found was a bad connection between U6 pin 7 and M5 pin 2. After that was resolved, it was found that M2 gate had a constant 15V applied. All connections of M2 and U8 were re-heated and that problem was resolved. The last problem with connections appeared to be with the 20 pin connector between the TX/RX PCB and the Cmod-A7 IF PCB? the TX-A signal kept disappearing. I had not yet mechanically fastened the two PCB's together. Fastening the PCB's together with the appropriate standoffs allowed testing to proceed with reliable signalling.


    A check of TX_COIL+ and TX_COIL- indicated an anomaly to what was expected. What was expected at these points, was that the level would be about the REF voltage (10V) going to <1V during the respective TX-A/B period (TX-A for TX_COIL+ and TX-B for TX_COIL-).
    Click image for larger version

Name:	Expected Coil.png
Views:	1
Size:	28.5 KB
ID:	356393


    What was actually observed was a signal that went to <1V during the respective TX time gradually increased up to ~9V and then went to ~3V during the alternate TX cycle. This was indicating that the damp switches (M6 & M7) were never turning off. A re-check of the 5V rail found that the 5V was actually 4.68V... extremely close to the EL7202 minimum voltage and was not providing sufficient drive to the Pulse Xformer drive circuit. The reason for the drop in the 5V rail was the inrush current limiter which exhibits a ~0.7V drop from input to output. Adjusting the 5V supply to achieve 5.46V after the current limiter allowed the damp circuit to perform correctly.
    Click image for larger version

Name:	Normal coil.jpg
Views:	1
Size:	102.3 KB
ID:	356394

    The last issue was that I noticed, while analyzing the damp switch problem, that the pre-amp output to the mating connector seemed not to be unipolar as if U5 (DG333A) was not switching during alternate TX cycles. Come to find out, I had a DG333AL which requires a VL input on pin 15... the DG333A does not have this pin connected. I connected 5V via a jumper wire between pins U5 pin15 and JP1 pin 3 of U5 and the pre-amp output looked correct for operation with no coil. It "looked correct", but it wasn't! I was losing the actual signal through U5A and U5B... what is more, I had the TX_COIL signals riding a 5V to pins 4 and 7 but not on pins 3 and 8. Pins 3 and 8 had a 10V level. Further checking and severe head scratching determined that the junction of D23 and JP1 pin 1 needed a pull down resistor to insure a LOW signal to pins 1 and 8 of U5 as D23 was in effect "floating" the low signal to U5 pins 1 and 8. I placed a 1k resistor from the cathode of D23 and the GND via that was attached to C1. Now the signal from the preamp was unpolar and riding the 10V REF.
    Click image for larger version

Name:	normal rx.jpg
Views:	1
Size:	95.1 KB
ID:	356395

    I adjusted the REF voltage (via RV1) to indicate 1.65V (1/2 of 3.3V) viewed at CMOD-A7 pin 15.


    At this time the TX/RX PCB with no coil attached is working as expected.


    Next step is to add the coil into the circuit. The coils is a 10.25" coil, of 21 turns of AWG 24, 1mm diam wire, measuring 317uH, 1.4 ohm. Unshielded, the coil exhibits ~80pf capacitance... shielded it exhibits ~129pf capacitance. The cable will be > 1 meter of Belden 9841 1 pair with braided shield... the shield will be connected to the coil shield at the coil end and to GND at the coil/PCB connector. The coil shield will NOT be connected to either of the coil wires.

    Leave a comment:


  • green
    replied
    Originally posted by KingJL View Post
    Dissipates any residual charge... not necessarily CURRENT. As Carl and others have emphasised many times, the TX circuit is an RLC circuit, not just an RL circuit. The key is to apply this at the time of zero(or near zero) coil current... it effectively stops the oscillations (remember that the coil has no damp applied until this time). A reading of the Vallon patent gives a hint to this... and it works in practice.
    Thanks for the reply. Curious what range of target time constants your detector is designed for. Purchased 1 gram of nuggets awhile back(7nuggets/gram)time constants varied between 1 and 2 us. Thinking target time constant ranges 1, 10, 150 and 500us. Read somewhere, when purchasing a detector if it won't detect a nickel at 16 inches keep looking. Wondering if you have a detection distance for certain targets to show your detector meets your goals.

    Leave a comment:


  • KingJL
    replied
    Originally posted by green View Post
    Trying to understand why applying a very low resistance across the TX coil and quickly dissipates any residual charge in the TX circuit resulting in ZERO coil current low resistance dissipates current?
    Dissipates any residual charge... not necessarily CURRENT. As Carl and others have emphasised many times, the TX circuit is an RLC circuit, not just an RL circuit. The key is to apply this at the time of zero(or near zero) coil current... it effectively stops the oscillations (remember that the coil has no damp applied until this time). A reading of the Vallon patent gives a hint to this... and it works in practice.

    Leave a comment:


  • green
    replied
    Originally posted by KingJL View Post
    Actually the purpose of U2D is more complicated than just blanking the RX. Yes it is effective at blanking the RX only in mono mode. but more importantly there is a very short (~1 usec or less) overlap where U2D is energized and the "DAMP" switchwes are energized. This extremely brief overlap has the effect of applying a very low resistance across the TX coil and quickly dissipates any residual charge in the TX circuit resulting in ZERO coil current (that is the theory anyway... in practice, the coil current usually is not zero, but is anywhere from a few micro-amps to 1 ma). This all works for both mono or IB mode. In IB mode, the need for RX blanking is less pronounced (asuming an IB is anywhere near properly balanced). In fact with the front end as designed, RX blanking is not needed at all as the frontend never goes into saturation regardless of input.
    Trying to understand why applying a very low resistance across the TX coil and quickly dissipates any residual charge in the TX circuit resulting in ZERO coil current low resistance dissipates current?

    Leave a comment:


  • Qiaozhi
    replied
    Originally posted by Ferric Toes View Post
    Ordered one today, should have it Friday. Brilliant price GBP20.85 and free delivery.

    Eric.
    I've also just ordered one. Scheduled to be here tomorrow (Wednesday) using Prime delivery (Free).
    My multimeter leads are in need of replacing anyway, and the LCR meter has some really fiddly connectors, so it would be good to consolidate all measurements in one unit. Since it's been recommended, I cannot miss the opportunity.

    Leave a comment:


  • Ferric Toes
    replied
    Originally posted by KingJL View Post
    I got my BM4070 2 years ago and have been quite happy with it. I mainly got it because of the inductance measurement capability. I have cross checked it with more sophisticated measurement techniques and the results that the BM4070 gives has been consistent with those other methods. And I wholeheartedly agree with you about the usefulness of the large LCD readout.


    Yes!
    https://www.amazon.com/Proster-Multi...8969310&sr=8-1
    Ordered one today, should have it Friday. Brilliant price GBP20.85 and free delivery.

    Eric.

    Leave a comment:


  • 6666
    replied
    Twice the price here in Oz

    Leave a comment:

Working...
X