After a few days of coding I can now announce I have a PI CHIP based on a cheap PIC chip with the following features.
- Low cost $6AUD
- 28 pin DIP ... easy to solder or socket
- simple three wire serial interface. TX RX GND RS232
- Complimentary TX pulse output adjustable in 33 nanosecond steps.
- TX pulse repetition adjustable from 100 to 20 Khz.
- 10 bit ADC but achieves better than 16 bit resolution ( 85 microvolts )
- SAT processing of input analogue input
- three sample pulse pin outputs with delay and duty adjustable in 33 ns steps.
- PWM output from SAT code for metering or feedback control of bucking coil via low pass filter and MOSFET.
- PWM target response output for analogue metering.
- Audio output pin. Target response = higher frequency.
- All settings adjustable via serial port.
- All settings can be saved in onchip eeprom
The idea is to set up the variables ... save them then test.
A laptop can be used in the field.
A dump of the serial console session is shown below.
Moodz.
E: TIMER1 : Count = 1000 Delay = 33.921 usec
F: T1Duty : Count = 100 Duty = 3.392 usec
G: TIMER2 : Count = 2000 Delay = 67.843 usec
H: T2Duty : Count = 100 Duty = 3.392 usec
I: TIMER3 : Count = 2500 Delay = 84.803 usec
J: T3Duty : Count = 100 Duty = 3.392 usec
ADC sample = 65592
ADC SAT sample = 65495 4.996948 Volts DIFF = -97 -0.007401 Volts
K: ADC val avg count = 4096
L: SAT val avg count = 1024
M: AUDIO freq range count = 100000
>
Metal Goose by Moodz v1.2
S: Save all vars to EEPROM
R: Read all vars from EEPROM
STATUS:
X: CPU Ref Clock : 7370.000 Khz
PWM Step is 33.921 Nanosecond
A: PERIOD : Count = 730 Freq = 10.096 Khz Period = 99.050 usec Scale factor = 89
B: PWM1 TX PULSE : Count = 990 Duty = 33.582 usec
C: PWM2 TARGET : Count = 1468 Duty = 49.796 usec
D: PWM3 THRESHOLD : Count = 2943 Duty = 99.830 usec
E: TIMER1 : Count = 1000 Delay = 33.921 usec
F: T1Duty : Count = 100 Duty = 3.392 usec
G: TIMER2 : Count = 2000 Delay = 67.843 usec
H: T2Duty : Count = 100 Duty = 3.392 usec
I: TIMER3 : Count = 2500 Delay = 84.803 usec
J: T3Duty : Count = 100 Duty = 3.392 usec
ADC sample = 65592
ADC SAT sample = 65495 4.996948 Volts DIFF = -97 -0.007401 Volts
K: ADC val avg count = 4096
L: SAT val avg count = 1024
M: AUDIO freq range count = 100000
>
- Low cost $6AUD
- 28 pin DIP ... easy to solder or socket
- simple three wire serial interface. TX RX GND RS232
- Complimentary TX pulse output adjustable in 33 nanosecond steps.
- TX pulse repetition adjustable from 100 to 20 Khz.
- 10 bit ADC but achieves better than 16 bit resolution ( 85 microvolts )
- SAT processing of input analogue input
- three sample pulse pin outputs with delay and duty adjustable in 33 ns steps.
- PWM output from SAT code for metering or feedback control of bucking coil via low pass filter and MOSFET.
- PWM target response output for analogue metering.
- Audio output pin. Target response = higher frequency.
- All settings adjustable via serial port.
- All settings can be saved in onchip eeprom
The idea is to set up the variables ... save them then test.
A laptop can be used in the field.
A dump of the serial console session is shown below.
Moodz.
E: TIMER1 : Count = 1000 Delay = 33.921 usec
F: T1Duty : Count = 100 Duty = 3.392 usec
G: TIMER2 : Count = 2000 Delay = 67.843 usec
H: T2Duty : Count = 100 Duty = 3.392 usec
I: TIMER3 : Count = 2500 Delay = 84.803 usec
J: T3Duty : Count = 100 Duty = 3.392 usec
ADC sample = 65592
ADC SAT sample = 65495 4.996948 Volts DIFF = -97 -0.007401 Volts
K: ADC val avg count = 4096
L: SAT val avg count = 1024
M: AUDIO freq range count = 100000
>
Metal Goose by Moodz v1.2
S: Save all vars to EEPROM
R: Read all vars from EEPROM
STATUS:
X: CPU Ref Clock : 7370.000 Khz
PWM Step is 33.921 Nanosecond
A: PERIOD : Count = 730 Freq = 10.096 Khz Period = 99.050 usec Scale factor = 89
B: PWM1 TX PULSE : Count = 990 Duty = 33.582 usec
C: PWM2 TARGET : Count = 1468 Duty = 49.796 usec
D: PWM3 THRESHOLD : Count = 2943 Duty = 99.830 usec
E: TIMER1 : Count = 1000 Delay = 33.921 usec
F: T1Duty : Count = 100 Duty = 3.392 usec
G: TIMER2 : Count = 2000 Delay = 67.843 usec
H: T2Duty : Count = 100 Duty = 3.392 usec
I: TIMER3 : Count = 2500 Delay = 84.803 usec
J: T3Duty : Count = 100 Duty = 3.392 usec
ADC sample = 65592
ADC SAT sample = 65495 4.996948 Volts DIFF = -97 -0.007401 Volts
K: ADC val avg count = 4096
L: SAT val avg count = 1024
M: AUDIO freq range count = 100000
>
Comment