Home

My blog, gallery and archive of things designed and made. Everything is original (©1983 – 2024), unless otherwise stated, ALL content here is openly licensed via Creative Commons Attribution 4.0 International License. When you share, everybody wins.

There are heaps of technical projects and I also publish the instructions, code, circuits, 3D stuff, etc that you need to build one yourself if you were so inclined. There is a gallery of the garden art we have created, mainly from found pieces and installed on our bush property. Some of my older photography works and material from the RoboCup initiative I was involved in many years ago are also here.

Mark Makies


Current Design Diary

In 2023 I designed Roverling MkII, a semi-autonomous multi-terrain mobile robotic platform. I had many ideas for its first mission, but a friend came up with the idea of a metal detector. There are heaps of designs and tutorials out there, that has given me some great ideas, but as always I like to start from scratch and design and build a solution to suit me. If you new to this blog start at the bottom if you want the full story.

1/8/2024 First Integration Test

The first integration test. Got power systems working well, as well as RS232 comms between PI trailer and Roverling. Getting 30 updates per second from the PI’s 32 bit ADC via LoRa back into my desktop computer. However there is a problem. I think the coils are too loose and wires are moving relative to each other during the shaking and bumping. So I’ll coat the wiring in epoxy and make the trailer lighter.

12/7/2024 PCB Arrives

The first PCB I’ve designed in many years is working with only a few minor issues.Testing and calibrating now – looks kike I’ve managed to get down to a minimum sampling delay of about 4us and around 10uV of precision on my timed ADC 32 bit sampling.

8/7/2024 Roverling in Control

It’s taken a while to get the Roverling control system going well. At the first level of control is the magnetometer, calibrated off line using all three axis for a sphere re-mapping, then again calibrated on the Roverling using only the X & Y axis and a figure of eight maneuver. However this is only accurate if the magnetometer is horizontal, but we’re going up, down and across hills. So next comes the tilt compensation, based on pitch and roll which in turn are derived from a three axis accelerometer. However you can only use the accelerometer to determine pitch and roll when stationary, not at all helpful when moving.

Next level of control comes from the GPS, but there are limits (until I get an RTK anyway). Firstly best update time is once per second, precision is 18cm and accuracy with around 20 satellites and only after 15 minutes to nail the fix is about 50cm.

It needs work but good enough for now. The below chart shows GPS position with fully autonomous control. First one is 40m run with a varying 10 degree slope, Roverling stays within a 1m corridor. Next is a series of ‘slots’, on flatter ground, 10m long with tightest possible turning circles at the ends. Again Roverling manages to stay within a 1m corridor.

30/5/2024 Creating Roverling Vehicle Control System

Whilst waiting on components I destroyed, I started on RV3, an updated Roverling based on the previous MKII, but being designed specifically to work with the metal detector, autonomously.

It’s almost ready but the rain has moved in for a bit and stalled outdoor development, one of the final bits being accurate GPS steering. At the moment the best accuracy I get is about 0.5m. I’ll need a GNSS RTK capable module, just trying to find a good but cheap one. There are a couple of government Continuously Operating Reference Stations, close enough that the NTRIP (free) correction stream should get me 2-3cm accuracy.

16/3/2024 Critical Component

I accidentally blew up a critical component because of my dodgy solderless breadboard and loose wires. So whilst I wait for at least three weeks until the SMT replacements arrive from Canada, I’ll bite the bullet, relearn PCB design using KiCad and get a PCB designed and manufactured.

14/3/2024 Power System Noise

Following on from the Standard Deviation edge detector, a simple state machine has been realised to better detect a change and its direction. Now that this has been refined, it works very well up to about 20cm after which the noise kicks in – so time to reduce noise, even though I’m still on a solderless breadboard.

The plan was to un-teather the USB connection that has been used for code development but that was not as easy as it seems. In order to collect data whilst unconnected I used the RP2040 on-board flash memory, a big mistake as it causes at least a 10 fold increase in the noise floor, even with another 1/2 dozen caps thrown at it. Once I figured this out I configured a single UART TX pin to output the data instead, without having to connect USB and it’s power component.

What surprised me the most, is that the noise is LESS by about 50% when power to the RP Pico is through USB – either a PC or plug pack, rather than through a on-board 7805 from the 20V supply. Nothing I have tried has managed to reduce this a – I suspect a proper PCB may help.

Another major breakthrough was a change to the pulse & sampling frequency. I was using 4kHz initially, but it is nowhere near a prime and the noise seems to contain a bit of a beat frequency. Changing this to 3719Hz reduced the noise by half.

Current baseline noise standard deviation over 10 samples in free air is

  • 200uV USB powered, no flash
  • 250uV Battery powered, no flash
  • 900uV USB powered, using flash
  • 4000uV Battery powered, using flash

9/3/2024 Drift

Next problem to solve – drifting component parameters, especially when going to full power on the drive circuitry. This phenomenon doesn’t work well with the static baselining I have been doing up to now, but it has it’s place for pinpointing edges so I’ll keep it in the system.

What I really thought I needed was a high pass filter. I found a much better solution using statistics, in particular the standard deviation function. In the below chart, the blue line is the filtered/decimated ADC 32 bit data, decimal scale on the right axis. The green is the standard deviation, and the red is the standard deviation multiplied by the sign of the difference of the sample at the beginning and end of the sample. Bottom scale is time in ms.

From left to right, first blue run with 20us pulse, passing samples at 150mm Ag, Fe, Fe, Ag. Next run turned up pulse width to 50us which heats up the power resistors somewhat. I didn’t wait for it to stabilise so drift down is evident. Samples Ag, Ag, Fe, Fe. You’ll notice a much bigger response to ferrous metals. Last run turned the pulse (effective power) down to 5us. Samples Ag and Ag followed by a hold over samples Ag & Ag.

3/3/2024 Ryobi Battery Problem

So prior to designing the PCB I need to tidy up a few things. Firstly the leads to the coils have been shortened from nearly 2m for testing to about 50cm. As expected this reduced the parasitic capacitance greatly, evidenced by the fact that the damping resistor on the transmit coil needed to be increased from 220R to 490R. In turn this has made the coil even faster, now with a 20us pulse, I can sample as soon as 5.8us (meaning gold is now easier to detect).

Next task was to replace the bench top power supply with a Ryobi battery pack that I use for all my projects, where I can. Now you would think that the battery would be a lot more quiet than my ancient PS. It took me a frustrating day’s worth of investigation to find out that is not the case. Every 128ms I collect a digitally filtered 32 bit representation of the decaying voltage. As you can see below, in the final column, there is not much variation over time in the current measurement compared to the established baseline, less than 1mV. But every 15 seconds or so, bang, a massive variation for about half a second and then all is good again until another 15 seconds.


  10866ms  0x6a797184   4.1591558456V   diff:  -0.531mV 
  10988ms  0x6a7ae6b2   4.1593780518V   diff:  -0.309mV 
  11131ms  0x6a79da94   4.1592183113V   diff:  -0.469mV 
  11254ms  0x6a77b9d9   4.1588935852V   diff:  -0.794mV 
  11377ms  0x6a773a09   4.1588172913V   diff:  -0.870mV 
  11500ms  0x6a781620   4.1589488983V   diff:  -0.739mV 
  11642ms  0x6a680a63   4.1565003395V   diff:  -3.187mV 
  11765ms  0x69c88efc   4.1321654320V   diff:  -27.522mV 
  11888ms  0x688ad5af   4.0836844444V   diff:  -76.003mV 
  12011ms  0x687c80b7   4.0814976692V   diff:  -78.190mV 
  12154ms  0x69b79a6b   4.1295781136V   diff:  -30.109mV 
  12276ms  0x6a64f890   4.1560320854V   diff:  -3.655mV 
  12399ms  0x6a799e2b   4.1591825485V   diff:  -0.505mV 
  12542ms  0x6a797779   4.1591591835V   diff:  -0.528mV 
  12665ms  0x6a7891de   4.1590223312V   diff:  -0.665mV 

The yellow line represents the end of the excitation pulse, the green represents the last 5V of received decay and rising blue edge is exact sample point. With persistence up full you can see the shadows in the transmit pulse and receive pulse dipping down but for a moment. More than enough to muck up any kind of accurate detection.

So I put the scope on my Ryobi battery pack, and even without any load, this is the unexpected response. It must be doing some kind of internal check every 15 seconds. Ahhhhh.

Zoom in on those spikes shows that the whole episode takes around 1ms and a voltage drop of about half the battery voltage!

No more Ryobi battery packs for sensitive applications.

29/2/2024 Printed Circuit Board

I now need a PCB before anymore fine tuning to bring in those few percent gains. I recon the solderless prototype board is now the main contributor to the noise floor. It’s been 20 years since I last deigned a PCB, so time to do some learning: from very expensive Mentor Graphics on Apollo Unix Workstations back then to KiCad, free, well supported, large library and running on my free Ubuntu OS on an Intel platform. No auto-router but I always enjoyed the maze like solving you go through to route a tight board. I’m sure they’ll be a lot of frustrations along the way.

26/2/2024 Making Progress

I have now coded to use the filtered 32 bit data once the initial base lining and sample timing is determined using the raw 14 bit data. The next step was to determine the characteristics given different pulse widths as an object is passed over a period of 5 seconds. The horizontal axis represent time over about 30 seconds. The vertical access is the integer representation of the ADC filtered value.

Absolutely great outcome so far.:) The silver spoon and copper pipe give the same results for 20 and 40us pulses. The ferrous pipe on the other hand has almost no response to 10us but has a strange after-response when it is removed.

Increasing the pulse width provides an almost linear increase in sensitivity to ferrous objects but a much smaller response to non-ferrous. I’ve traded off the ability to collect samples at 8 different point for higher resolution and less noise, but it appears that I may be able to use pulse width changes to provide greater discrimination. Except for one thing, at higher pulse widths a lot more heat is generated which in turn causes slight drifting in the pulse driving circuitry, which in turn causes substantial drift in the sensitive receive circuity.

24/2/1024 Oversample

New oversampling ADC is now connected and provides both a 14 bit no latency value and a 32 bit filtered and decimated value. 

The next step was to determine if the filtered output is of benefit, as it is over sampled and decimated by 256, so at 2kHz sampling it will take around 125ms per sample, but also 7 sample periods required for group delay response to impulse .  Comparing this with 8 different sample points at 120 samples per point, which is a lot more than I wanted.

Both have a similar response to slow moving metal objects.  First dip is a silver spoon, next bump up is gal pipe and last dip is copper pipe.  Vertical scale is 11.6mV /div

With all other variables constant, noise in filtered samples (blue) is about +/- 450uV, whilst in raw samples (red) it is about +/-1400uV.

Left scale is in adjusted value for 32 bits where V = x / 2^31 * 5, so 465uV/div.

So the decision to be made is multiple sample times versus a single sample time with  higher resolution.  Given that after the first sample time (in multiple sampling) the only advantage I have found is the ability to discriminate when ferrous and non-ferrous are both present, it probably makes sense to go down the single sample path.

19/2/24 Proto Advantage

Thanks #protoadvantage, my parts have just arrived from the US after 3 weeks in the post. Looks like from now on my designs won’t be limited to through hole technology components. Long live SMT.

Not only do they have all the adaptors that I need for this project, and probably into the future, they’ll also procure from #DigiKey and solder the little buggers on.

15/2/1024 Massive Power Boost – 6yo Test Driver

Roverling MkII: Power supply upgraded from 20V to 40V for the additional torque required to tow the PIMD sensor trailer up the hills.  But with this additional power comes speed, so let’s give the controls to a 6 year old to test stability.

Needless to say I’ll be adding roll bars for any further “junior testing”.

13/2/2024 Integration

Pulse Induction Metal Detector project meets Roverling MkII.   Stage 2, integration.

There has been many months of work developing a pulse induction metal detector (PIMD) from scratch.  Still waiting on better ADC’s to arrive before designing a PCB but I’ve managed make it work well with the 12 bit ADC on the RP2040.  With a transmit pulse between 5-50us, I can sample as fast as 4.5 to 7.6us.  This means that I can very easily discriminate between different metals.  Taking that one step further I can also roughly determine the proportion of ferrous to non-ferrous.  

I’ve used a 64 LED #GlowBit matrix as the indicator.  It’s basically a colour coded bar chart, with the x axis corresponding to sample time (I take 20 samples (and then average / LPF) at each of 8 different points.  The first point is determine by a searching for the first time that the RX return level drops to 95% of the first detectable voltage.  The next 7 sample are determined by a natural log function that matches the decay response very accurately.  The Y axis indicates the difference (in mV) between the current averaged sample and the reference sample.

Timing accuracy is of upmost importance, and I’ve managed to reduce the sample timing jitter to under 10ns.  The Python implementation on the RP2040 is not the best, and if running the PWM frequency at 1kHz, a rounding error, I think, causes 100ns jitter.  Change that the 2kHz and the jitter is gone.  Also for timing synchronisation between TX and RX it is critical to use PWM channels from the same slice.

So now I’ve got the pulse induction metal detector prototype running it’s time to start designing the integration with Roverling MkII.  I think I will use a standard trailer configuration and tow bar with the sensor coil suspended just above ground level. I would prefer carbon fibre or plastic but will use 10mm aluminium rod for the frame (and make sure there are no loops).  The PIMD easily calibrates around this and provides a reliable baseline, but in theory reduces sensitivity.

There is one radio transmitter on board Roverling and a couple of 11W unshielded motors, all generating a lot of noise, so the sensors need to be as far away as possible, especially as I intend to add in at least another 4 bits of resolution.  There are also 3 receivers on board, and in particular the GPS really needs some protection from the pulses. So for all of these reasons I’m trying to position the coils at least half a metre from the vehicle.

The PIMD electronics is also very sensitive, so it will be positioned half way along the trailer.  The 40V supply on vehicle is too noisy to use, so there will be yet another #Ryobi battery used, just or this.

Now time to fire up FreeCAD again and start designing and printing more parts.

7/2/2024 Super Fast Sample Time

Automatic sample timing search.  (h/w v5.14 (RP2040 ADC), s/w v2.08, coil v2.01).   The most optimum solution was found by using a natural log function.  With a 5us pulse, sampling can start at 4.5us, and with a 50us pulse at 7.6us, allowing for the detection of non-ferrous metals. 

math.e ** (SampleIndex * 0.3) - 1

2/2/2024 High Voltage

Impulse response versus TX pulse width (h/w/ v513).  First 1-20 us increments, then 30, 40, 50, and finally 100 us.  

  • Yellow: TX pulse, flyback reaches 251 V
  • Blue: RX pulse, flyback reaches 176 V
  • Pink: conditioned sample, 5V max

31/1/2024 Finding the Sweet Spot

Controlled test of discrimination characteristics of dual elliptical coil design at various induction pulse periods.  The charts show the difference between baseline and target object in the 5-20us sample period. The vertical resolution is 10mV/div.  Noise component is +/- 10mV.   Kicking goals now…  

Test objects

30/1/2024 New Coils

Version 2 coils now redesigned and working extremely fast, even with 2m of RG62A/U coaxial cable I can sample down to 7us.  Discrimination works surprisingly well, but I can’t test with gold because I don’t have any yet:).  The elliptical coil has proven to be a real game changer for me.

In all of my research, most pulse induction detectors only look at the bottom 700mV of the decay curve.  In my testing and with my coil, I found the most useful information between 500mV and 5V.  Not only is there more useful information in this area, it is also way above the noise margin making filtering that much easier.  I also looked at the response at voltages above 5V, but in my best scenario I could only sample 650ns sooner – only 10% gain for too much additional effort.

29/1/2024 Too Small

After numerous attempts to solder 0.2mm wire onto 0.25mm pads only 0.5mm apart, I’ve decided that I need SMT to DIP adaptors. Lucky I found #protoadvantage. Not only do they have all the adaptors that I need for this project, they’ll also procure and solder the little buggers on the PCB. Awesome, now just waiting on delivery from Canada.

11/1/2024 Fly-back Decay Curve

Version 5 now underway.  Going for full scale read of bottom 5V of flyback decay curve.  Coils have been redesigned thanks to some great online reference materials.  Previous RX coil response curve sampling took place no sooner than 45us, better at 65us.  This new design, overlaying a circular receive coil under an elliptical transmit coil has less mutual coupling, and can now be sampled at 10us (getting much better for gold detection).

Thanks @element14_electronics, I just got my precision bits.  I theory 32 bits of filtered data, over 5V, should give me an LSB resolution in the range of 1.2nV.  

Next problem – this stuff no longer comes in DIL packages, they are really really small, and I need to solder by hand…..

4/1/24 Not Happy

So three prototypes later I’m still not entirely happy with the design.  I can now detect a very small metal object at about 40cm, but due to the high system gain it is very unstable.  The RP2040 and a bit of python helps to compensate, but I’ll need something better if I want to automate the search process using #Roverling.

Version 3 provided a targeted gain at a predetermined sample time after impulse.  At the moment it appears that 47.6us is the sweet spot, and I’m looking at a change from say 220mV to 225mV.  The python code automatically adjusts the baseline so I can just amplify the important bit (which I also display on an old style meter driven by RP2040 differential PWM).  However the op-amps I’m using have a slew rate of about 13 V/us and I would need at least 100 V/us after amplification to see the ‘sweet spot’.

So version 4 is now being designed. I will be using higher performance op-amps (now that I understand them better) for the input and preamp stages and have decided to ditch the crap 12 bit ADC on the RP2040.  For $30 I can get a 24 bit oversampling ADC with a flat pass-band digital filter with external sync (critical) and an SIP interface, made by @analogdevices  I probably should have gone down this path to start with.

12/12/23 Learning (but in hindsight looking in the wrong area)

Following on from my previous post, here are the results.  

The top chart at 50us/div shows a very very large bit of metal, not a real test but at 1/2m still packs a punch.  The blue plot shows the received pulse decaying, and a sweet spot to measure for any changes, right on 62us after the TX pulse ends.

Now the second chart is just zoomed in at 2us/div.  Only the value at 62us is of interest.  At this time the RX coil voltage (blue line) between air and a small metal object is 27mV to 30mV, you can barely see it in the fuzzy noise, just looks like a straight line.   Now, a few op amps to filter and amplify with a gain of x130 and we have the green line.  Reading 2.85V and 3.43V at 62us, respectively for air and small object.

12/12/23 Getting the Hang of Op-Amps

Prototype 1 complete – but a failure.  It will pick up a big object at 100 cm but small close objects go undetected. Biggest mistake? – observing wave forms through ‘rose coloured glasses’ with all the filtering, smoothing and analysis my new Rigol scope can do.  Go to high resolution at 2Gs/s and 16 bits and you see a different story, one filled with noise that swamps the signals I’m looking for.  Go for a long display persistence and you can really see the problem areas.

So now working on attempt #2 with a much better understanding of op amps.  If you’re a rusty engineer like me you cant go past ‘Op Amps For Everyone’, a Texas Instruments design reference guide (SLOD006B).  It’s a hard read but got me going on the right path.

So new design:  TX coil only gets fully saturated at about 200-250us, so now driving for (exactly) 200us resulting in peak coil current of around 4.5A.  After the RX coil output is clipped to +/-1V, it  goes through NE5534 op amp (primarily for audio) based preamplifier with a gain of 10 and LPF with a cut off at 180kHz.  Then another NE5534 with a gain of 13, setting the overall system transfer function as 30 -> 80mV to -3.3V -> +3.3V.  At 60us after end of TX pulse, but measure on the RX-COIL, a CD4066 based CMOS switch is used to sample and hold the voltage.

In this region I have observed the best SNR.  Any sampling sooner than 55us results in a poorer differential and any after 65us means we are getting into the noise floor region.  Testing on the bench looks very promising.  Small objects are now easily detected, noise is mainly gone, response time is really quick and I’ve got a clean and held voltage in the range -3.3 -> 3.3V.  And this is all working on a solderless breadboard.

So next step: Route this signal into an ADC (after attenuation and level shift) and back into the digital domain, where I am most comfortable, for further development.  

28/11/23 Wrong Coil Design

Most of the research I’ve done up to this point seems to warrant a short pulse width and most of the sampling done in the 5 – 25us decay time frame.  For my coils anyway this didn’t seem to provide a large voltage detection swing I was hoping for on RX coil.    

However if I punch out 10A through 2 ohms in 50us I get a much better result.  The top chart shows the difference in RX coil voltage between free air and a wall which has foil sarking.  At about 40 us after the impulse there is a massive difference reaching 500mV in another 60us.  There is also a detectable changes in the TX coil from 0-80us after impulse removal, and yet another on the RX coil 5us into the pulse itself.  There is a lot of useful info here, but next step is to test with real dirt, and real objects at various depths.  Then to work out what voltage levels and/or sample time frames to use.  Some machine learning may really help here.  I was also led to believe that using only an 8 bit ADC wouldn’t provide usable data, but now I’m not so sure. Lets first see what an RP2040 can achieve before overly complicating things.

The bottom chart shows earlier damping tests of the TX coil.  This resulted in a 200 ohm selection for the damping resistor, HOWEVER I needed to drop this to 100R to also critically damp the RX coil, then I added specific damping to the RX coil only, which ended up being 470R.  As they pretty much form some kind of tuned circuit I used pots on both until I got the waveform I was looking for.  Without first tuning (and also making sure you 10x probes are properly compensated) you have no hope of obtaining the top chart.

26/11/23 First Coil – Working?

Analog design is not my strong point, especially inductors, but I’ve finally got some fantastic results with the coils.  Firstly I needed to create a bipolar totem-pole gate driver for the MOSFET.  The parasitic capacitance can’t be overlooked if you want high speed non-linear FET switching.  I used https://www.circuitlab.com/ for the first time to simulate and was very happy with how fast I could create the schematic and perform DC and AC analysis, it was critical in my choice of components for the totem-pole, but wasn’t very useful for coil simulation.

The TX coil pulse is driven by a 100Hz PWM RP2040 output, with a duty cycle of 2^16 – 34 at 100Hz which gives a negative pulse of 5us.  The TX coil needs to be critically damped to prevent unwanted ringing on the RX coil, achieved with a 220 ohm resistor.  Max current of 10A is realised in the first 1us, which would suggest that this should be the turn off time, however I get much better results at 5us at the RX end and diminishing returns thereafter.

The RX coil is NOT damped as I could not see, on my scope anyway, any need for it, even though theory may suggest that it is required.  However the output is clipped in both directions with two 1N4148 diodes.

If you look carefully at my computer monitor, check out the aqua (persistent) plot. The top of the envelope indicates no metal whilst the bottom of the envelope shows it’s presence.  Without any amplification the difference is in the order of 500mV in the 10-50us decay time frame.

I couldn’t have hoped for more at this stage.

22/11/23 Design and Construct a Coil

Finally all my bits are here, so lets start building a search coil (v2).  It is 400mm in diameter and constructed from 4 printed parts which are just glued together.  The inner race has 50 turns of 0.25mm Teflon coated silver/copper wire (wire-wrap wire) with an aluminium foil Faraday shield (no loop).  This is the receiver and has a DC resistance of 20.1 ohms.

Over the top of the Faraday cage is 20 turns of 0.5mm enamel coated magnet wire, with a DC resistance of 2.1 ohms, which makes up the pulse transmitter. Then over the top of that is lots of Kapton polyimide tape.  Looks great in space missions so why not. (Also, I no longer need to use it to hold down ABS prints.)

The next step will be to determine the critical damping requirements for both coils.  To that end I stuck the (new) oscilloscope probes onto the ends, expecting a 50Hz signal, but that is not what I saw.  On the scope, centre window, you can see the spectrum analysis, and that huge spike in the middle?  Both coils are picking up something at exactly 118.75kHz.  You can’t see in this picture but about 0.5m away is my old monitor which ended up being fully responsible for this artifact.

Just shows that I’ll need an electro magnetic quiet place to do this calibration and testing.

16/11/23 New Oscilloscope

Christmas has come early, out with the old, in with the new.  These old bits of kit have served me well for decades, but time to move on.  Thanks @EmonaInstruments for great service and almost instant delivery.  I wish I had one of these 30 years ago when I was teaching undergrads all about meta-stability, much easier then trying to adjust phosphor persistence on a cathode ray scope. Next, I better download and read a manual.

Now if only @Jaycar_electronics could deliver within a reasonable time frame, we’d have this project well underway.  This would be the third order that has gone missing over the last year, and again no one responding to get it sorted out.  How hard can it be to mail out a dozen op-amps that would easily fit in a small padded bag?   

8/11/23

First draft of schematic for my Pulse Induction Metal Detector is now complete.  Time to order parts and equipment to get it built and tested.

5/11/23

The search coil (v1) has now designed and built.  400mm diameter, 50 turns of 0.25mm Teflon coated wire with an aluminium foil Faraday shield.  I’ll probably mount the coil on a disposable/consumable base, something easy to replace so I don’t have to worry about scrapes and scratches.  Testing out effectiveness under worst case conditions, the long grass, and Roverling had no problem towing.

1/11/23 Let’s Build a Metal Detector with no Previous Experience

There are heaps of designs and tutorials out there, that has given me some great ideas, but as always I like to start from scratch and design and build a solution to suit me.   Although I prefer the digital domain and Python, It’s not going to be fast enough.  Max sampling I’ve been able to achieve is 50kHz or about 20us, on an RP2040 under Python.  Nowhere near quick enough.  I need bus micro-second samples to make this work, so I’m going to have to do a bit of analog mixed signal design.  Basic premise is to capture decaying pulse waveform levels at very specific times, the first one at between 1-5us after pulse removed and the next between 5-50us.  Accuracy is absolutely key, so all analog up to sample and hold chip (300ns capture, 100us hold), after which an interrupt will trigger the slow RP2040 ADC reads, and then store the data sample, synced to the GPS position, as well as a (small) telemetry packet to make sure Roverling is ‘on-mission’.  I’ll probably aim for 10k samples per second.

First step though is to replace my now broken Cathode Ray Oscilloscope – it has served me well for many decades.  I’ve even got the original brochure. I tried, but it is not possible to properly design and tune this system if you can’t see what is happening at 100ns resolution.  Just lucky my HP1630G logic and state analyser, from the same era, still works well, although at only 100MHz sampling.

And time to read some literature, especially since I haven’t even owned a metal detector. The following references were invaluable in this endeavour.

  • Inside the Metal Detector by George Overton & Carl Moreland
  • Hammerhead Pulse Induction Metal Detector by Carl Moreland
  • Making a Fast Pulse Induction Mono Coil by Joseph J. Rogowski
  • Coil Basics by Carl Moreland
  • Designing Gain and Offset in Thirty Seconds by Bruce Carter (Texas Instruments SLOA097)
  • Op Amps For Everyone by Ron Mancini (Texas Instruments SLOD006B)

I’m likely to publish the entire project on Instructables and with Core Electronics once it is complete.