Announcement

Collapse
No announcement yet.

Moodz' Awesome Gold Pulse Induction Version 3 - MAGPI V3 Project

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

  • Dean Sarelius
    replied
    Originally posted by moodz View Post

    Hi Dean ... yes I had a look at the rotary wiring and you are right I have wired the C ( common ) to the B switch Good Pickup !
    So I changed the wiring to AB and C to common and its still works OK ... so I guess the code and the wiring is foolproof by accident.

    I have never used interrupts for rotary encoders ...if you have some other more critical loop task ( like the TX interrupts ) then if the loop is fast enough to sample you get a rotary encoder or multiple REs with very little code overhead plus free debounce.

    The less interrupts the better I always say.

    moodz.
    Hi Moodz,
    Just in the process of re-configuring the V1.4 firmware which I have renamed to V3.11.
    Could you remind me which pins you ended up using for the Encoder..?

    Leave a comment:


  • moodz
    replied
    Originally posted by Dean Sarelius View Post
    Hi All,
    Everything appears to be working ok.
    The issue with the display was the contrast control on the back of the SPI display controller.
    Running the display with 3.3V I had to set the contrast control pot to its limit and it is still not very good.
    Lucky I provided a 5V backlight option and the contrast is much better.
    In order to use the SPI display controller in 5V mode you need to remove two pull up resistors on the SPI controller pictured below labelled R8 and R9.
    You also need to add 2 x 4.7k pull up resistors on the main board.
    There is a spare header on the main board for the 5V option.
    Before I can test with a coil am expecting to receive the surface mount IRFP9640S next week .
    in the meantime I will be adding the encoder and testing the audio circuitry over the weekend.
    When all this is done and dusted will start a new thread where I will post all the files.

    Click image for larger version Name:	With 5V backlight.jpg Views:	0 Size:	591.4 KB ID:	413013​

    Click image for larger version Name:	SPI Display controller.jpg Views:	0 Size:	344.7 KB ID:	413012
    Click image for larger version

Name:	20230609_091839.jpg
Views:	802
Size:	249.4 KB
ID:	413017​​
    ​
    good job

    Leave a comment:


  • moodz
    replied
    Originally posted by IBGold View Post

    Hi Paul finally got V1.4 programmed first came up with no voltage to VDD then wrong target ID but after 12 goes it finally programmed any way after playing for a while I have some suggestions can you separate threshold volume from target volume because as it is now if you set the volume to a steady low threshold volume the volume of small targets in fact all targets at the lower limits of detection are not loud enough to hear also could you give us a list of what the Menu items are and what they do Volume, Tone, Battery and balance are probably self explanatory it is the other items and their inter relations with that knowledge I would be happier playing around with the settings sorry to be a pain.

    Regards, Ian.
    errmmm ... the last version 1.4 I left some test timings in there ... I will need to re-release it ... It wont break the detector but the TX is wrong.

    Leave a comment:


  • IBGold
    replied
    Originally posted by moodz View Post

    Hi the firmware is below ...

    This is the real life working schematic of the MAGPI using ZP ( zero point active damping ) and SNR ( sampling noise reduction ) pulse induction detector project. I designed this to demonstrate the ZP active damping system and additionally the SNR noise reduction scheme in a pulse induction detector. In the base configuration

    Hi Paul finally got V1.4 programmed first came up with no voltage to VDD then wrong target ID but after 12 goes it finally programmed any way after playing for a while I have some suggestions can you separate threshold volume from target volume because as it is now if you set the volume to a steady low threshold volume the volume of small targets in fact all targets at the lower limits of detection are not loud enough to hear also could you give us a list of what the Menu items are and what they do Volume, Tone, Battery and balance are probably self explanatory it is the other items and their inter relations with that knowledge I would be happier playing around with the settings sorry to be a pain.

    Regards, Ian.

    Leave a comment:


  • Dean Sarelius
    replied
    Hi All,
    Everything appears to be working ok.
    The issue with the display was the contrast control on the back of the SPI display controller.
    Running the display with 3.3V I had to set the contrast control pot to its limit and it is still not very good.
    Lucky I provided a 5V backlight option and the contrast is much better.
    In order to use the SPI display controller in 5V mode you need to remove two pull up resistors on the SPI controller pictured below labelled R8 and R9.
    You also need to add 2 x 4.7k pull up resistors on the main board.
    There is a spare header on the main board for the 5V option.
    Before I can test with a coil am expecting to receive the surface mount IRFP9640S next week .
    in the meantime I will be adding the encoder and testing the audio circuitry over the weekend.
    When all this is done and dusted will start a new thread where I will post all the files.

    Click image for larger version  Name:	With 5V backlight.jpg Views:	0 Size:	591.4 KB ID:	413013​

    Click image for larger version  Name:	SPI Display controller.jpg Views:	0 Size:	344.7 KB ID:	413012
    Click image for larger version

Name:	20230609_091839.jpg
Views:	802
Size:	249.4 KB
ID:	413017​​
    ​

    Leave a comment:


  • Dean Sarelius
    replied
    Originally posted by moodz View Post



    Hi Dean ... I downloaded the source zipfile I posted earlier and it compiles fine on a new machine setup ( defaults - did not change any configs ).

    the command line option is -g .... see below. ( default setting )

    I notice that your generated command line for the compiler is referring to v1.4 XC32 .... you need version 2.15.

    I install version 2.15 XC32 then install the legacy PLIB on that ( it should ask you to specify the location of the compiler during install )

    Also note that Microchip refer to PLIB for later support libs ( like Harmony etc ) ... this is WRONG. You need the legacy PLIB installer. ( login to Microchip and access the PLIB in the legacy file area )

    moodz

    Click image for larger version Name:	config.jpg Views:	0 Size:	89.1 KB ID:	412991

    Click image for larger version

Name:	conifg2.jpg
Views:	602
Size:	96.2 KB
ID:	412994
    Hi Moodz,
    Great news..after installing the legacy peripheral libraries into the V2.15 libraries path it succesfully compiled and downloaded to the PIC.
    This verfies the fact that the display is not initialising properly as this was the same behaviour I was seeing from the hex file also.
    Thanks again for all your help and will let you know when I have it working.
    Cheers

    Leave a comment:


  • moodz
    replied
    Originally posted by IBGold View Post
    Paul ,

    Have you done the version V1.4 for the PIC32MX250 yet if so I will try that and see how I get on.

    Regards, Ian.
    Hi the firmware is below ...

    This is the real life working schematic of the MAGPI using ZP ( zero point active damping ) and SNR ( sampling noise reduction ) pulse induction detector project. I designed this to demonstrate the ZP active damping system and additionally the SNR noise reduction scheme in a pulse induction detector. In the base configuration


    Leave a comment:


  • IBGold
    replied
    Paul ,

    Have you done the version V1.4 for the PIC32MX250 yet if so I will try that and see how I get on.

    Regards, Ian.

    Leave a comment:


  • moodz
    replied
    Originally posted by Dean Sarelius View Post

    Hi Moodz,
    I am still unable to compile fully and I think it is because I am missing some arguments in my compiler setup.
    Here is a copy of my compiler output below and when you compare it to yours I can see that you have additional -g -x c -c
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -mprocessor=32MX150F128B -o dist/default/production/MAGPI008_2023_06_07_V1.4_RELEASE.X.production.elf

    Would you know how to setup these arguements in the compiler..?

    I have been playing around with the Compiler options fields and checking the Generated Command Line to see if I can get it to match but without any luck..?

    Click image for larger version  Name:	image.png Views:	0 Size:	47.9 KB ID:	412971​


    Hi Dean ... I downloaded the source zipfile I posted earlier and it compiles fine on a new machine setup ( defaults - did not change any configs ).

    the command line option is -g .... see below. ( default setting )

    I notice that your generated command line for the compiler is referring to v1.4 XC32 .... you need version 2.15.

    I install version 2.15 XC32 then install the legacy PLIB on that ( it should ask you to specify the location of the compiler during install )

    Also note that Microchip refer to PLIB for later support libs ( like Harmony etc ) ... this is WRONG. You need the legacy PLIB installer. ( login to Microchip and access the PLIB in the legacy file area )

    moodz

    Click image for larger version  Name:	config.jpg Views:	0 Size:	89.1 KB ID:	412991

    Click image for larger version

Name:	conifg2.jpg
Views:	602
Size:	96.2 KB
ID:	412994
    Attached Files
    Last edited by moodz; 06-08-2023, 06:19 AM. Reason: additional info

    Leave a comment:


  • moodz
    replied
    Originally posted by darov922 View Post

    I have finished with the assembly of this project and carried out the first tests and it seems to work well, however I have a big doubt with the D3 diode (BYV79-200) since mouser sent me a TO220 assembly diode instead of the one I see in your photos that looks like a diode with DO41 packaging. What diode are you using in your project?

    Dario​
    Hey Dario ... good work ... try a MUR160 diode.

    Leave a comment:


  • darov922
    replied
    Originally posted by moodz View Post
    ...the case fitted with a handmade 18650 battery pack ( 2 cells in series - 8.4 volts ) which is good for hours of detecting joy @ 230 mA draw.

    I am just figuring out if I can make a QADCC ( quick and dirty charging function) with some spare ports on the CPU.

    moodz

    Click image for larger version  Name:	batt.jpg Views:	1149 Size:	389.7 KB ID:	409718



    I have finished with the assembly of this project and carried out the first tests and it seems to work well, however I have a big doubt with the D3 diode (BYV79-200) since mouser sent me a TO220 assembly diode instead of the one I see in your photos that looks like a diode with DO41 packaging. What diode are you using in your project?

    Dario​

    Leave a comment:


  • Dean Sarelius
    replied
    Originally posted by moodz View Post
    Here is sourcecode for version 1.4.

    The userlib is no longer required to compile.

    should compile with no errors or warnings ( using X32 v2.15 and PLIB )

    [ATTACH]n412965[/ATTACH]


    Below is the firmware ....

    [ATTACH]n412966[/ATTACH]


    CLEAN SUCCESSFUL (total time: 0ms)
    make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
    make[1]: Entering directory 'C:/WORK/MAGPI008/DEVEL/MAGPI008_2022_11_17_MX150/MPLABXProjects/MAGPI008_2023_06_07_V1.4_RELEASE.X'
    make -f nbproject/Makefile-default.mk dist/default/production/MAGPI008_2023_06_07_V1.4_RELEASE.X.production.hex
    make[2]: Entering directory 'C:/WORK/MAGPI008/DEVEL/MAGPI008_2022_11_17_MX150/MPLABXProjects/MAGPI008_2023_06_07_V1.4_RELEASE.X'
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/main.o.d" -o build/default/production/main.o main.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/my_main.o.d" -o build/default/production/my_main.o my_main.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/serial.o.d" -o build/default/production/serial.o serial.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/I2C_UTILS.o.d" -o build/default/production/I2C_UTILS.o I2C_UTILS.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/DELAY.o.d" -o build/default/production/DELAY.o DELAY.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/PIC32MX250pins.o.d" -o build/default/production/PIC32MX250pins.o PIC32MX250pins.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/LCD_I2C_PCF8574.o.d" -o build/default/production/LCD_I2C_PCF8574.o LCD_I2C_PCF8574.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/flash.o.d" -o build/default/production/flash.o flash.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/uart.o.d" -o build/default/production/uart.o uart.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -mprocessor=32MX150F128B -o dist/default/production/MAGPI008_2023_06_07_V1.4_RELEASE.X.production.elf build/default/production/main.o build/default/production/my_main.o build/default/production/serial.o build/default/production/I2C_UTILS.o build/default/production/LCD_I2C_PCF8574.o build/default/production/DELAY.o build/default/production/flash.o build/default/production/PIC32MX250pins.o build/default/production/uart.o -DXPRJ_default=default -legacy-libc -Wl,--defsym=__MPLAB_BUILD=1,--defsym=_min_heap_size=4000,--defsym=_min_stack_size=1000,--no-code-in-dinit,--no-dinit-in-serial-mem,-Map="dist/default/production/MAGPI008_2023_06_07_V1.4_RELEASE.X.production.map" ,--memorysummary,dist/default/production/memoryfile.xml
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin"\\xc32-bin2hex dist/default/production/MAGPI008_2023_06_07_V1.4_RELEASE.X.production.elf
    make[2]: Leaving directory 'C:/WORK/MAGPI008/DEVEL/MAGPI008_2022_11_17_MX150/MPLABXProjects/MAGPI008_2023_06_07_V1.4_RELEASE.X'
    make[1]: Leaving directory 'C:/WORK/MAGPI008/DEVEL/MAGPI008_2022_11_17_MX150/MPLABXProjects/MAGPI008_2023_06_07_V1.4_RELEASE.X'

    BUILD SUCCESSFUL (total time: 2s)
    Loading code from C:/WORK/MAGPI008/DEVEL/MAGPI008_2022_11_17_MX150/MPLABXProjects/MAGPI008_2023_06_07_V1.4_RELEASE.X/dist/default/production/MAGPI008_2023_06_07_V1.4_RELEASE.X.production.hex. ..
    Program loaded with pack,PIC32MX_DFP,1.5.259,Microchip
    Loading completed​
    Hi Moodz,
    I am still unable to compile fully and I think it is because I am missing some arguments in my compiler setup.
    Here is a copy of my compiler output below and when you compare it to yours I can see that you have additional -g -x c -c
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -mprocessor=32MX150F128B -o dist/default/production/MAGPI008_2023_06_07_V1.4_RELEASE.X.production.elf

    Would you know how to setup these arguements in the compiler..?

    I have been playing around with the Compiler options fields and checking the Generated Command Line to see if I can get it to match but without any luck..?

    Click image for larger version

Name:	image.png
Views:	603
Size:	47.9 KB
ID:	412971​

    Leave a comment:


  • moodz
    replied
    Here is sourcecode for version 1.4.

    The userlib is no longer required to compile.

    should compile with no errors or warnings ( using X32 v2.15 and PLIB )

    MAGPI008_2023_06_07_V1.4_RELEASE.zip


    Below is the firmware ....

    MAGPI008_2023_06_07_V1.4_RELEASE.X.production.zip


    CLEAN SUCCESSFUL (total time: 0ms)
    make -f nbproject/Makefile-default.mk SUBPROJECTS= .build-conf
    make[1]: Entering directory 'C:/WORK/MAGPI008/DEVEL/MAGPI008_2022_11_17_MX150/MPLABXProjects/MAGPI008_2023_06_07_V1.4_RELEASE.X'
    make -f nbproject/Makefile-default.mk dist/default/production/MAGPI008_2023_06_07_V1.4_RELEASE.X.production.hex
    make[2]: Entering directory 'C:/WORK/MAGPI008/DEVEL/MAGPI008_2022_11_17_MX150/MPLABXProjects/MAGPI008_2023_06_07_V1.4_RELEASE.X'
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/main.o.d" -o build/default/production/main.o main.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/my_main.o.d" -o build/default/production/my_main.o my_main.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/serial.o.d" -o build/default/production/serial.o serial.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/I2C_UTILS.o.d" -o build/default/production/I2C_UTILS.o I2C_UTILS.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/DELAY.o.d" -o build/default/production/DELAY.o DELAY.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/PIC32MX250pins.o.d" -o build/default/production/PIC32MX250pins.o PIC32MX250pins.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/LCD_I2C_PCF8574.o.d" -o build/default/production/LCD_I2C_PCF8574.o LCD_I2C_PCF8574.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/flash.o.d" -o build/default/production/flash.o flash.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -g -x c -c -mprocessor=32MX150F128B -MP -MMD -MF "build/default/production/uart.o.d" -o build/default/production/uart.o uart.c -DXPRJ_default=default -legacy-libc
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin\xc32-gcc.exe" -mprocessor=32MX150F128B -o dist/default/production/MAGPI008_2023_06_07_V1.4_RELEASE.X.production.elf build/default/production/main.o build/default/production/my_main.o build/default/production/serial.o build/default/production/I2C_UTILS.o build/default/production/LCD_I2C_PCF8574.o build/default/production/DELAY.o build/default/production/flash.o build/default/production/PIC32MX250pins.o build/default/production/uart.o -DXPRJ_default=default -legacy-libc -Wl,--defsym=__MPLAB_BUILD=1,--defsym=_min_heap_size=4000,--defsym=_min_stack_size=1000,--no-code-in-dinit,--no-dinit-in-serial-mem,-Map="dist/default/production/MAGPI008_2023_06_07_V1.4_RELEASE.X.production.map" ,--memorysummary,dist/default/production/memoryfile.xml
    "C:\Program Files (x86)\Microchip\xc32\v2.15\bin"\\xc32-bin2hex dist/default/production/MAGPI008_2023_06_07_V1.4_RELEASE.X.production.elf
    make[2]: Leaving directory 'C:/WORK/MAGPI008/DEVEL/MAGPI008_2022_11_17_MX150/MPLABXProjects/MAGPI008_2023_06_07_V1.4_RELEASE.X'
    make[1]: Leaving directory 'C:/WORK/MAGPI008/DEVEL/MAGPI008_2022_11_17_MX150/MPLABXProjects/MAGPI008_2023_06_07_V1.4_RELEASE.X'

    BUILD SUCCESSFUL (total time: 2s)
    Loading code from C:/WORK/MAGPI008/DEVEL/MAGPI008_2022_11_17_MX150/MPLABXProjects/MAGPI008_2023_06_07_V1.4_RELEASE.X/dist/default/production/MAGPI008_2023_06_07_V1.4_RELEASE.X.production.hex. ..
    Program loaded with pack,PIC32MX_DFP,1.5.259,Microchip
    Loading completed​

    Leave a comment:


  • Dean Sarelius
    replied
    Originally posted by moodz View Post
    Hey Dean ...

    Just to make sure on a clean machine ...

    I loaded up a clean Ubuntu 22.04 virtual machine hosted on Virtualbox .

    Installed MPLABX 6.10
    Installed XC32 v2.15
    Installed PLIB legacy on the compiler location.

    Downloaded the V1.3 I posted ... and it did not compile .

    So there is something wrong with that source package ... it only builds on my workstation ( regular machine ).

    I then downloaded the MX150 package from post #16 ....

    That builds OK.

    In summary ... something IS wrong with the V1.3 package. dont use it till I investigate it.

    moodz.
    Thanks Moodz,
    Really appreciate your help.
    Will let you know how I go with V1.2.
    Cheers

    Leave a comment:


  • moodz
    replied
    Hey Dean ...

    Just to make sure on a clean machine ...

    I loaded up a clean Ubuntu 22.04 virtual machine hosted on Virtualbox .

    Installed MPLABX 6.10
    Installed XC32 v2.15
    Installed PLIB legacy on the compiler location.

    Downloaded the V1.3 I posted ... and it did not compile .

    So there is something wrong with that source package ... it only builds on my workstation ( regular machine ).

    I then downloaded the MX150 package from post #16 ....

    That builds OK.

    In summary ... something IS wrong with the V1.3 package. dont use it till I investigate it.

    moodz.

    Leave a comment:

Working...
X