Originally posted by KingJL
View Post
Announcement
Collapse
No announcement yet.
New Bipolar Boost TX and Front End
Collapse
X
-
Originally posted by green View PostTrying 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?
Comment
-
Originally posted by KingJL View PostDissipates 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.
Comment
-
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-).
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.
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.
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.
Comment
-
Originally posted by KingJL View PostI 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.
I?ve made some good progress on the new coil shells and should have some off to you around mid February.
Comment
-
Originally posted by green View PostBeen awhile, hope everything is going good.
Comment
-
Originally posted by waltr View Post... 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...
Comment
-
Originally posted by waltr View PostI 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.
Never managed to get mine to work with precision timings in the ns range, pwm and adc pots.
Comment
-
Originally posted by eclipse View PostWhich 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.
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 }
Comment
-
-
Originally posted by eclipse View PostOh man thanks would never have figure it out. I was really stuck. I owe you a nice bottle of whiskey!
These PIC processors are very peripheral rich and takes a good bit of study to figure them out.
I have a PIC32MX running a PI detector using the OC module to run TX pulse.
As in the code I posted, the OC Interrupt then starts a timer (TMR3) that triggers ADC conversions. The ADC Interrupt Flag then triggers a data transfer from ADC to memory using DMA. This puts TX pule to ADC data in memory all in Hardware.
Then in the Main loop, code waits for DMA block transfer to finish and moves this data to working buffer to process.
This is running ADC conversion at 2usec and collect 128 samples after each TX pulse.
The PIX32MZ EF has a much more complex ADC and I having been struggling to get the ADC -> memory by DMA working correctly.
Comment
-
If you're looking for PIC32MZ dev board, check this out (it uses PIC32MZ2048EFM144, same as waltr dev board)
https://www.olimex.com/Products/PIC/...ource-hardware
I've made my own board suitable for a basic development.
Comment
Comment