2

I have an Arduino Yun that I need to connect to a machine to detect whether the machine is working or is stopped.

The signal used as a flag for such behaviour is basically the presence or absence of current in one of the motors that work when the machine operates. The voltage going through the motor is 220VAC. So I figured I could use a standard AC to DC converter like the one used to charge the phones (since those converters usually take 100~240V at 50/60Hz and output 5V with 1A) and connect that to one of the digital ports in input mode. Then I would know if the machine is working or not if such pin is in HIGH state or LOW state respectively.

Well, this works up to certain point. For some reason, the YUN stalls or resets itself while the machine is operating. I've checked the voltage and even used a voltage regulator to make sure it doesn't exceed the 5V. I even connected the signal to an Analog pin and measured the input and it never read more than 4.9V. So I guess my question is, what might be causing this behaviour and how could I avoid it. I suspected it was a voltage/current spike but with the voltage regulator and the resistors I added before passing the signal to the Arduino I though the issue should be solved but the issue persists.

Attached is an image of the power adapters I'm using to both feed the arduino with current and convert the signal that goes to the pins to DC.

Basically, I know that the arduino stalls because it closes the telnet session I am using to monitor the values read by the pins and because the USB let goes off. Normally the arduino will have the USB and the ON leds on but once the issue happens it turns the USB led off and in some boards it turns on the WAN led on.

Interestingly enough, it seems that the issue happens when the machine is stopped (LOW voltage) and is preparing to start working.

Just as a note. I've tried different Arduino Yun boards and all have the same behaviour so I don't think it's a matter of the board being broken. Resetting the board allows it to continue reading the signal but eventually it stalls again

VE7JRO
  • 2,554
  • 18
  • 25
  • 29
Jose
  • 121
  • 2
  • You use a wall-wart just to send to the arduino the information "the motor is powered" ? It reminds me of that game... "incredible machine", it was called. –  May 12 '16 at 10:29
  • Yes, that's what I'm using it for. Not sure it that's the best way to do it though. – Jose May 12 '16 at 10:42
  • It's a little convoluted, honestly. Here is a hint to make it more efficient. –  May 12 '16 at 10:47
  • That makes sense. I'll try that out. Thank you. – Jose May 12 '16 at 11:10

0 Answers0