I am doing some stuff with an Arduino mini (when the temperature read reaches a level it should turn on something), I have noticed some strange behavior when I use an external power supply instead of the USB.
The program seems behaving normally but when I use the the extenal supply instead of switching on at 92 degrees it does it at 50 or less, not respecting at all my code.
I think that something is wrong due to the power supply as when connected to the USB it works perfectly.
I am using a 12V dc at 2A, directly from the wall socket (220V 50/60Hz) and connected to the VI input pin and the GND of the Arduino.
If I put some resistors between the supply and VI nothing changes, if I go below 10 V due to the resistor the arduino not even turn on. I suspect the problem is the current.
I could not figure out what is the max or better adviced current to be sent to VI. Is 2A too much?
Current is never a problem like that. Things only use what current they need so even if it was a 50A supply it wouldn't be a problem.
But what exactly do you have connected to the Arduino? It's possible that you're taking too much current out of the 5V pin and the onboard regulator is shutting down.
The thermocouple, the relay, the fan and the arduino have the same ground.
The power supply is sending the 12V (in parallel?) to the arduino and the fan.
The thermocouple can withstand 3-5V so I have attached it to the pic 5V of the Arduino
(because of this last thing, it is too messy I cannot figure out according to Kirchoff laws how the currents are split)
You must use current limiting resistors on transistors and LEDs, for example between pin 9 and the base of the unknown transistor, and whatever thing happens to be labeled as a "relay". I would suggest 470 Ohms. Otherwise you will destroy the Arduino.
Any time you mix AC circuits, you introduce the possibility of ground loops, which can happen if two different branches of the AC circuit end up powering your gizmos.
Post a complete circuit diagram, showing all the connections, and links to the thermocouple and "relay" modules.
sorry yes, I already put a 2k2 Ohm resistor between the base of the Darlington and the arduino though it is not shown. The AC part is not touching the DC part as infact it is activated by a photodiode