arduino reseting

im not sure if this is the right fplace to put this on the forum, ill take my chances :stuck_out_tongue:

i did this sketch that basically consists of an Arduino connected to a serial connection via an ftdi board, and i have a lm317 regulator to power up a sensor that works on 24v, this sensor activates a relay that emits a signal to the arduino. here is where my problem starts, every time the relay activates the arduino resets, why is this?? is the relay taking too much power or may my circuit be badly soldered somewhere(been looking for it, haven’t found yet)? can this be solved with a capacitor?

help plz.

PD: in the schematic you can see the ftdi chip, i don’t have it soldered actually, im using my second option the pins where i connect a ftdi board, i do have a succesfull serial connection.

im not sure if this is the right fplace to put this on the forum, ill take my chances

i did this sketch that basically consists of an Arduino connected to a serial connection via an ftdi board, and i have a lm317 regulator to power up a sensor that works on 24v, this sensor activates a relay that emits a signal to the arduino. here is where my problem starts, every time the relay activates the arduino resets, why is this?? is the relay taking too much power or may my circuit be badly soldered somewhere(been looking for it, haven’t found yet)? can this be solved with a capacitor?

help plz.

PD: in the schematic you can see the ftdi chip, i don’t have it soldered actually, im using my second option the pins where i connect a ftdi board, i do have a succesfull serial connection.

Your sketch is actually called a schematic. A sketch is the code you upload to the Arduino.

I have to say that your schematic is a mess. Where does the 'IN5' go from pin 11? Attach the sch file.

The reason why the Arduino is resetting is probably because you are pulling too much current through it.

I can't spot the relay on that circuit. You say it's being controlled by the sensor - is the relay coil being powered from the same supply as the Arduino? If so it could be that the coil is either taking so much current that it is causing a brown-out on the supply, or that it doesn't have flyback protection and is putting a voltage spike onto the power line when it is turned off.

this is the relay.

it is a different source, the arduino is powered via ftdi](usb) and the sensor from a lm317

in5 is the output from the relay, (input 5)

how is the arduino pulling too much current if it is through the relay?

sensor3.sch (470 KB)

That leaves the next question - where do the switched terminals on the relay connect to?

I think that either the act of energizing the coil is causing the reset (although I don't see how at the moment) or the problem is caused by the relay switched circuit being closed/opened.

To find out which, I suggest you try reproducing the problem with the relay switched terminals isolated (so that operating the relay does not switch anything), and also try to reproduce it by manually making/breaking the circuit that would normally be switched by the relay.

You have VCC hooked to the 'P' of the relay. What is VCC and where is it coming from?

Give me a few, I'm working on your schematic. You need to keep the grid set to .1 in. That is what all the parts are and if you start running nets with a finer grid, it starts looking unorganized.

What sensor is activating the relay? Datasheet?

@pato_llaguno, PLEASE DO NOT CROSS-POST

the vcc is from the ftdi chip, (usb 5v)

codlink:
What sensor is activating the relay? Datasheet?

here it is

EL3-F2428 (2).pdf (161 KB)

The only thing I seen that was wrong was you had Aref going to Vcc. It should be .1uF to ground. I cleaned up your schematic. If your still experiencing resets, it means there is too much current going through the Arduino. You can put a small value resistor in series with IN5 to see if that’s the cause. You can keep going to a higher value. If a 1K resistor still makes it reset, then your problem is somewhere else. Recheck all of your wiring.

sensor4.sch (476 KB)

why does the aref need to go to ground throu a cap? in http://arduino.cc/en/Main/Standalone it is connected to the 5v.

Ill give it a try once i get home, see if that does the trick.

Hmm, not sure why they have it going to +5V. The Arduino's official schematic has it going to ground..

i am not using by any mean an analog reading so i guess it wouldn't matter that much, my circuit is soldered already, if i physically with a wire put the 5v to the input 5 the unit doesn't reset, is it any different if it is through the relay? isn't it basically the same i mean, the relay only closes the circuit.

Interesting.

I don't have much experience with relays. Check this link http://forum.arduino.cc/index.php?topic=167616.msg1248073#msg1248073 and also the replies after that.

in my circuit i can change the voltage being inputted to the relay, i lowered it to 14 volts where the voltage isn't strong enough to close the relay, and while doing this the arduino still resets, can the current going through the coil of the relay do something?

i even left the circuit open in the input, so the arduino never gets the 5v from the relay, and it still resets when i turn the relay on.

What else do you hooked to the Arduino? Something is pulling to much current..