Page 1 of 2

Electrical Test - Component Tester

Posted: Fri Jan 08, 2021 11:29 am
by BenR
Hello,

I've made a start with the component tester with a basic resistance test, here is how to replicate my project.

First start by loading the SCADA Slave firmware here onto an Arduino Uno.
https://www.flowcode.co.uk/wiki/images/ ... rmware.zip

Next load this App Creator Project and select the COM port for the Arduino in the properties.
ComponentTester.fcsx
(30.32 KiB) Downloaded 204 times
Then wire up the resistors as shown here.
CompTest.jpg
CompTest.jpg (14.43 KiB) Viewed 6146 times
Also connect the aref pin to 5v.

Run the simulation and click the Test Resistance button to take a resistance reading.
CompTest2.jpg
CompTest2.jpg (28.51 KiB) Viewed 6147 times
The console window shows the comms between the PC and the Arduino Uno.


I'm curently not overly happy with the results. With a series resistor of 1K and a test resistor of 100R I am reading 116R.

What we have so far is very basic and works to give a ballpark resistance but it's not overly accurate. I think we can make it much better.


I've come across this from Velleman and it looks like it uses several series resistors (R7-R9, R11-R13) that can be switched in and out to try and help home in on a better value and acheive the best reading possible.

https://manuals.whadda.com/article.php?id=734

So bearing this in mind maybe we can have a go at doing something similar.


For now I'm going to have a quick go at a capacitor and inductor test and document how I get on with these.

If anyone would like to aid in the project and help improve the readings or add new features then that would be most welcome.

Re: Electrical Test - Component Tester

Posted: Fri Jan 08, 2021 2:38 pm
by BenR
I've now added the ability to test capacitors using the same simple setup.
ComponentTester.fcsx
(56.43 KiB) Downloaded 201 times

The graph displays the discharge and charge waveforms.
CompTest3.jpg
CompTest3.jpg (31.01 KiB) Viewed 6123 times

With a 11K series resistor my 100uF capacitor is retuning readings between 90uF and 101uF which again is good but I think we can probably do better.

Quick video detailing the progress so far is available here.


Next I'll have a go at Inductance.

Re: Electrical Test - Component Tester

Posted: Sat Jan 09, 2021 8:40 pm
by medelec35
Hi Ben,
What a brilliant project!
Thank you for posting progress so far.
I will be following progress with a great deal of interest.
BenR wrote:
Fri Jan 08, 2021 11:29 am
I'm curently not overly happy with the results. With a series resistor of 1K and a test resistor of 100R I am reading 116R.
BenR wrote:
Fri Jan 08, 2021 11:29 am
If anyone would like to aid in the project and help improve the readings or add new features then that would be most welcome.
I use a formula which is really good for resistance measurements...

Code: Select all

ResistanceFloat = PullUpResistanceFloatConstant / (1023.0 / ReadADCINT * 1.0 - 1.0)
It should be more accurate as it is independent of VDD so 5 or 3.3 is not used in the formula.

Re: Electrical Test - Component Tester

Posted: Sat Jan 09, 2021 8:47 pm
by medelec35
medelec35 wrote:
Sat Jan 09, 2021 8:40 pm
Hi Ben,
What a brilliant project!
Thank you for posting progress so far.
I will be following progress with a great deal of interest.
BenR wrote:
Fri Jan 08, 2021 11:29 am
I'm curently not overly happy with the results. With a series resistor of 1K and a test resistor of 100R I am reading 116R.
BenR wrote:
Fri Jan 08, 2021 11:29 am
If anyone would like to aid in the project and help improve the readings or add new features then that would be most welcome.
I use a formula which is really good for resistance measurements...

Code: Select all

ResistanceFloat = PullUpResistanceFloatConstant / (1023.0 / ReadADCINT * 1.0 - 1.0)
It should be more accurate as it is independent of VDD so 5 or 3.3 is not used in the formula.
Unfortunately I'm unable to test until I can get the app developer package enabled. :(

Re: Electrical Test - Component Tester

Posted: Mon Jan 11, 2021 9:45 am
by Steve-Matrix
medelec35 wrote:
Sat Jan 09, 2021 8:47 pm
Unfortunately I'm unable to test until I can get the app developer package enabled. :(
Is this missing from your licence? Some of the early licences were created without App Developer support, in which case you will need David to update the licence. If this is the case, let me know and I'll try to get this sorted today.

Re: Electrical Test - Component Tester

Posted: Mon Jan 11, 2021 11:57 am
by p.erasmus
Hi Steve/Martin,

I also have no license for App developer just to say :D Only realized when trying to play with the project

Re: Electrical Test - Component Tester

Posted: Mon Jan 11, 2021 1:40 pm
by Steve-Matrix
App Developer licences for VCs should now be sorted. You'll need to re-apply your licence via Licensing...Manage.

Re: Electrical Test - Component Tester

Posted: Mon Jan 11, 2021 1:54 pm
by p.erasmus
Thank you Steve
:D

Re: Electrical Test - Component Tester

Posted: Wed Jan 13, 2021 12:14 pm
by BenR
Hello All,

I think I'm going to change tack on thie project slightly and instead of using the SCADA Slave interface I will make custom Flowcode firmware for an embedded device and along with a simple circuit we can then connect this to App Developer via USB or WIFI.

The SCADA slave interface is great but can't compare with custom firmware and ideally all the App Developer should have to do is say do a scan and the firmware checks to see what type of device is connected and do a fully automated test returning the appropriate charecteristics.

I am going to base the work off the Velleman project I linked earlier as well as this one I found which seems to use the same circuitry and has the firmware source available.
https://github.com/svn2github/transistortester
https://www.mikrocontroller.net/article ... stortester

The code is complex and designed for multiple targets but I will have a go at porting it into Flowcode and adding some comms options. The fall back option is to compile as is (with some mods) onto an Arduino and then connect this to App Developer :D

Let me know if you have any comments or suggestions.

Re: Electrical Test - Component Tester

Posted: Wed Jan 13, 2021 9:48 pm
by BenR
Some progress,

I have something running using the code here.
https://create.arduino.cc/projecthub/pl ... ter-dbafb4

I enabled the serial port by uncommenting the lines shown here.
https://www.cjoint.com/c/ILFsB6ivdxC

I also changed line 363 of the ArduTester_1_13 file from

#ifdef WITH_HARDWARE_SERIAL

to

#ifdef WITH_HARDWARE_SERIALXX

as the menu was not working and now is :)

Getting there, unfortunately it's still not working brilliantly but I feel I am close.

I didn't connect the display so it might work fine with a display instead of the serial port but I want the serial port if possible.