I downloaded the article AND the source code that was with it at that time (some years ago)
so I'm pretty sure it is the one that was with it
then I took from it the omega symbol and made the shorty-with-display project
http://kripton2035.free.fr/Projects/shorty-display.html
I think you are right and that is the original code, although the Arduino pins in the code are different from the ones used in the circuit pic.
Schematic shows pins D2,3,4,5 for Positive Drive and D6,7,8,9 for Negative Drive, A3 to measure the battery etc, but original code uses D4,5,6,7 for Positive Drive, Analog pins A0,1,2,3 for Negative Drive and A4 for battery voltage.
// ---------------------------------------------------------------------------------------------
// I/O port usage
// ---------------------------------------------------------------------------------------------
// serial port (debug and s/w download) 0, 1
// I2C interface to ADC & display 2, 3
// positive drive 4, 5, 6, 7
// push to test input 8
// unused 9, 10, 11, 12, 13
// negative drive A0, A1, A2, A3
// battery voltage monitor A4
// debug output A5
// Drive functions
// - ports 4-7 and A0-A3 are used to differentially drive resistor under test
// - the ports are resistively summed to increase current capability
// - DriveOff() disables the drive, setting the bits to input
// - DriveOn() enables the drive, setting the bits to output
// - DriveP() enables drive with positive current flow (from ports 4-7 to ports A0-A3)
// - DriveN() enables drive with negative current flow
// ---------------------------------------------------------------------------------------------
void DriveP()
{
DriveOff();
digitalWrite( 4, HIGH);
digitalWrite( 5, HIGH);
digitalWrite( 6, HIGH);
digitalWrite( 7, HIGH);
digitalWrite(A0, LOW);
digitalWrite(A1, LOW);
digitalWrite(A2, LOW);
digitalWrite(A3, LOW);
DriveOn();
}
The
modded code seems to use the correct "schematic pins" in the actual code but the comments are presumably left unchanged and there the pins are the same "wrong pins" that the code you uploaded uses, so i guess there is some kind of error in the original article...
// Drive functions
// - ports 4-7 and A0-A3 are used to differentially drive resistor under test
// - the ports are resistively summed to increase current capability
// - DriveOff() disables the drive, setting the bits to input
// - DriveOn() enables the drive, setting the bits to output
// - DriveP() enables drive with positive current flow (from ports 4-7 to ports A0-A3)
// - DriveN() enables drive with negative current flow
// ---------------------------------------------------------------------------------------------
void DriveP()
{
DriveOff();
digitalWrite( 2, HIGH);
digitalWrite( 3, HIGH);
digitalWrite( 4, HIGH);
digitalWrite( 5, HIGH);
digitalWrite( 6, LOW);
digitalWrite( 7, LOW);
digitalWrite( 8, LOW);
digitalWrite( 9, LOW);
DriveOn();
}
In any case between the two codes i am sure i can make this work, my main issue was that i prefer the 9V battery version and i didn't want to mess with the modded one only to find that there were more changes (he already mentions some changes about how "overload" is displayed) and i would have to troubleshoot the thing (the page uses the original schematic and not the one he actually made).
I think that the original code with the modded pins to match the schematic will work perfectly!
BTW isn't it a strange coincidence that the reason i am making a milliohm meter is that i saw YOUR "Shorty" build
I just ended up Googling for more "Arduino Milliohm meter" circuits after i saw yours and after a couple of candidates i decided on the Circuit Cellar one because i already have the ADS1115 module in my stash (i don't have to buy AD8628/MCP3421) and it seems like a easier build.
I still plan to use your clever "poor man's Kelvin probes", already ordered cheap
eBay probes that i hope are the correct type (tip unscrews so i can solder headphones wire).
Only thing that i would like in the Circuit Cellar circuit is a "zero" button you could press with the probes shorted to improve the measurement a bit more, but i can live without it (or even able to add it to the code?).
Anyways, thanks again for the code