Programming a PIC 12F510 using the DIY-150 programmer

A correspondent asked how to program a PIC 12F510 used in one of my projects using his DIY-150 programmer.

The DIY-150 programmer is quite an old design and there has been no development for more than 10 years, meaning no new chips added, though there are lots of online sellers of the now stale design.

The 12F510 is very similar to the 12F509 which microbrn v150807 does support. The 12F510 can be programmed by selecting chip type 12F509.

Alternatively, download the archive below and extract a modified chipdata.cid file which includes a 12F510, and extract it to replace the existing installed file.

The revised chipdata.cid can be downloaded here: chipdata.7z.

Review of mower starter motor current using Owon HDS242S and Hantek CC-650

This article documents capture of starter motor current on a Toro MX4250 mower with the Toro V-twin engine. The test is part of diagnosis of possible starter motor problems.

The current was captured with a Owon HDS242S hand held DSO and Hantek CC-650 current probe.

The motor is a permanent magnet DC motor with bendix gear.

Above is a screenshot, vertical scale is 50A/div, measurement is of battery current. Continue reading Review of mower starter motor current using Owon HDS242S and Hantek CC-650

NanoVNA-H4.3 R44 mod

Whilst following up another matter, I came across the following commit to Hugyen’s NanoVNA-H4 repository.

Remove R44 from NanoVNA-H4 Rev4.3, this resistor may damage U2 and the battery if the NanoVNA-H4 is not used for a long time and the battery is too low.

Above is an extract from the revised schematic committed, the change highlighted by the red arrow. R44 has been changed from 5.1kΩ to not populated. Continue reading NanoVNA-H4.3 R44 mod

NanoVNA – interpolation – part 5

NanoVNA – interpolation – part 4 and prior articles discussed the possibility of significant error when calibration data is interpolated.

This article illustrates the effects with some very simple examples.

Test scenario

The test scenario is a NanoVNA-H4 with 5m length of RG58A/U to the reference plane. It has been OSL calibrated at the reference plane using a 1-101MHz 101 point sweep.

Result without interpolation of the calibration dataset

Above is a zoomed in view of 1-5MHz of a 1-101MHz 101 point sweep, there are measurements at every whole MHz value from 1 to 101. There are only 5 measurement points on this graph. Continue reading NanoVNA – interpolation – part 5

NanoVNA – interpolation – part 4

NanoVNA – interpolation – part 3 discussed selection of a sweep step size to provide sufficient data points for reasonably accurate interpolation.

When / where is interpolation used?

The VNA correction process uses measurements of some known conditions to create a calibration dataset, a table if you like of the sweep frequencies and calibration data. Commonly the calibration dataset is a table of the correction factors calculated from measurements of the knowns for each frequency of the calibration sweep. The correction factors are usually calculated for each frequency independently of adjacent frequencies.

When used to sweep a different range, interpolation can be used to interpolate those correction factors to the new measurement frequencies.

A common data flow is that shown above, where the correction terms are calculated for each of the frequencies in the calibration sweeps, and then those terms are interpolated to the frequencies actually used for a DUT measurement sweep. Continue reading NanoVNA – interpolation – part 4

Re-engine of Deutscher 650 chipper shredder

The article documents replacement of the engine on a Deutscher 650 Chipper Shredder. The original engine was a Briggs & Stratton Intek 206 single cylinder four stroke petrol engine which has accumulated 200 hours over 10 years use.

During that time, it had regular oil changes, air filter changes, new carburetor seat and air filter gasket, as well as frequent cleaning with compressed air to ensure the air cooling was fully effective. It passed a leak down test of valves and rings at 200h, then valve clearances were checked and were spot on… no adjustment needed. (Note that the engine was never run on Ethanol fuel.)

Additionally there is ongoing belt maintenance (adjustment and replacement) and blade sharpening / balancing.

Replacement parts were expensive, the seat alone from eBay was over $20, spark plug over $20, the air filter gasket was over $40. Air filter sets were quite cheap on Aliexpress.

It gave good service, and was reliable. Approaching 200h, a decision was made to replace the engine with a Chonda to minimise the risk of failures (like plastic camshaft gears, lobes, compression relief).

Basic fit up

Above is the Deutsher 650 Chipper Shredder. Continue reading Re-engine of Deutscher 650 chipper shredder

NanoVNA-App v1.1.209-OD13 released

NanoVNA – interpolation – part 3 discussed interpolation and introduced cubic spline interpolation.

NanoVNA-App v1.1.209-OD12 and prior used one of the special monotone types of cubic spline interpolation.

When used in VNA correction, the control points are often complex numbers with real and imaginary in broadly sinusoidal form and approximately 90° out of phase… so behavior on this scenario is important.

Above is a comparison of two types of interpolation on a pure sine wave. The green curve is the underlying sine curve, the orange dots are the samples or control points, the red curve is a linear interpolation, the blue dots are an example monotone cubic spline interpolation (monotone-cubic-spline.js). Continue reading NanoVNA-App v1.1.209-OD13 released

NanoVNA – interpolation – part 3

This article continues on from NanoVNA – interpolation – part 1 and NanoVNA – interpolation – part 2 which illustrated jagged scans at up to 900Mhz where the reference plane was displaced by 5m of RG58A/U.

A quite practical example where care must be taken is the following one at HF. Let’s say you wanted to measure the feed point impedance of some HF antenna, and the online gurus explained that one way to do that was to calibrate the NanoVNA and normal antenna coax feedline as a fixture, setting the reference plane to the feed point end of the coax.

A Simsmith model for illustration

A Simsmith model was constructed of a 30m (~100′) length of RG213 with a short circuit termination, and the real and imaginary parts of s11 as would be seen by the NanoVNA were plotted.

Let’s say you wanted to sweep from 1.5-33MHz (to include a little each side of the 160-10m bands… partly for reasons to be explained later.)

30m of RG213 @ 33MHz, step size 0.3MHz

Lets focus on the high frequency end where the jagged response is worse.

Again we see the periodic variation of s11 real and imaginary components as shown in the earlier articles. In the plot above, Simsmith as done a linear interpolation of the sweep points, and at 0.3MHz per step, the curves a jaggy. The actual minimum of the blue curve is at 33.88MHz, and the value is about 5% higher than the linear interpolation… which will introduce measurement noise to any VNA sweeps with such a configuration. Sweeps such as this are inputs to the calibration process. Continue reading NanoVNA – interpolation – part 3

NanoVNA – interpolation – part 2

NanoVNA – interpolation – part 1 introduced the principle on which VNA measurements are made and corrected based on a set of error terms derived from measurement of some known loads at the reference plane.

The technique of interpolation as a convenient means of increasing the utility and flexibility of a calibration data set was also introduced, and example raw (uncorrected) sweeps of an OC at the end of about 5m of RG58A/U were given to illustrate the challenge in interpolation with insufficient samples or control points.

A more common data flow is that shown above, where the correction terms are calculated for each of the frequencies in the calibration sweeps, and then those terms are interpolated to the frequencies actually used for a DUT measurement sweep. Continue reading NanoVNA – interpolation – part 2