Hi everyone, I was recently finished with my project which is an egg´s reader, the purpose of this project is to analize the eggs and tell if the egg is fertile and the chicken is alive - the egg was fertile but the chicken is dead - the egg was not fertile, the egg is empty.
the methode I have used is with light and LDR, a 3W led is inside a suction cup that bright on top of the egg (the suction cup prevent direct light on the LDR) and the LDR that are all around the egg will determine what is going on in the eggs.
I´ll copy-paste part of the sketch and upload some pictures of the projekt at the end of the text so that is more understandable.
I tested the machine with a single head and it worked.
The problem comes when the arduino is not connected to the computer, it act weird and random, I would try in this order: I monitor one egg with the serial monitor, the egg is unfertile so not sign of moviment on the serial monitor, I check the arduino nano (I set the led_builtin to turn on as soon as the feedback(ALIVE) turn on so that I can check in advance what is going on) and the led_builtin is off as expected, I pull the cable off and I try again, after few seconds the arduino nano would send a feedback to arduino mesa with no reasons, so I check again with the cable and the program seems working good and I tried 10 times in a row like this with the same result.
the program consist that the arduino nano reads the value all the times and eventually gives a feedback once the threshold is achieved, everything would reset as soon as I push the button that start the program on arduino mega ( it will count up to 20 sec and then read all the feedback) but no problem with arduino mega, everything works as it should.
I power up the led with a separate power supply and power up the arduino with a battery as showned in picture (I hade bad experiance with arduino going crazy as soon as I was testing it with the cable in, that´s why I used a pure power supply for testing)
My first get is that somewhere the is no proper grounding but I checked so many time the wiring with no success.










