Hi all, I realise that it is possible to burn only certain pin of a board, without completely killing the micro-controller. This would affect the capability of using certain features like PWM or any other type of control to that specific pin so the reading or writing on it would be either impossible or random. Is there any method to test all the pins of a board and all the features, like PWM, sending and receiving pulses, I2C etc....
I can think of a way of writing a piece of software that tests all the pins with various methods as digitalWrite/Read, analogWrite/Read, tone etc....
This is very important as you cold be working on a project and it would not behave as intended, or you could get a second hand board and want to test if it is fully operational.
Yes of course. As you say, you would need to write a sketch to do it and would need to connect the appropriate hardware to the board but would it be worth it unless you were testing dozens/hundreds of boards ?
If a particular project does not work as expected then that is the time to investigate the reasons why. Is it hardware or is it software ? As a first step you would check all of the connections to the board and peripherals then you might swap the board for another one.
If the problem goes away you might conclude that the first board had a hardware fault and would have a good idea in which area the fault was so could test it explicitly
If the problem persists then it is likely to be in whatever is connected to the board so you would devise tests for that and maybe do a substitution of peripherals
All of this is part of the debugging process for a project. What are the possible problems, what are the likely problems, is it hardware or software
This would be an interesting "shield" to develop, with a selftest program for the mcu. I probably could not justify the cost in time and material, but maybe a teacher with buckets of Arduinos to pass/fail before the next session might realize time saving.
I found the need for something like this a few times while testing or writing core variants for Arduino boards platforms.
It was not a situation where it would have made sense to set up a completely automated system so I went for a more simple approach of using a sketch that allowed me to manually trigger the various I/O operations of the Arduino core API on each pin on the board. I then verified the behavior of that pin was as expected using something like a button/jumper wire, potentiometer, LED, voltmeter as appropriate connected to the pin being targeted.
This is the sketch I used:
Testing "all functions" would be pretty difficult. But the pieces likely to be bad in a board that will load and run software are less; pretty much just the circuitry associated with IO from the pins.
I did make this "test shield", but it was aimed mostly at making sure the PCB, assembly, and "core" were correct, rather than looking for chip damage.
This is a very nice piece of code, if a tweak it I might develop the test for just the Uno and the Nano.
@xfpd Exactly, I am a teacher. I have kids aged from 8 to 14, you never know what they have been doing to those poor little boards XD
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.