DIY arduino quadcopter, problem with ESC

hey, nowadays i am doing a quad-copter, i built my own transmitter and receiver using NRF24l01, i used also arduino uno and 10 DOF IMU for flight controller, and i built my own arduino code it works fine at first, second time i was testing it with same code and same connections ( i didn't remove any wire or change the code all was the same as first time) two motors works fine and the others didn't work, i checked the motors with other esc they worked, so what is the problem that may cuz this problem with ESC?, is it the arduino code, but it works at the first time and all was fine, so where is the problem? and is there any way to fix these ESCs?

Post your code if you can, could be an arming issue? Otherwise..

The power distribution for multiple esc's is sometimes a sensitive thing. Long power leads can have massive voltage spikes, plugging and unplugging batteries alone can be one of the riskiest parts.

I have had esc's die on unplug, especially disconnecting the battery when the system is pulling any decent current.

Sometimes if nothing is physical damaged in the chip you can reflash the ESC if the firmware is corrupted.
Sometimes there's just no bringing them back.

Have you tested the ESC off the quad alone to verify that it has failed?

adel57:
was the same as first time) two motors works fine and the others didn't work, i checked the motors with other esc they worked, so what is the problem that may cuz this problem with ESC?, is it the arduino code, but it works at the first time and all was fine, so where is the problem? and is there any way to fix these ESCs?

Could it be problem with the ESC calibration.
Post a link to the ESC and motors you are using.

Boardburner2:
Could it be problem with the ESC calibration.
Post a link to the ESC and motors you are using.

this is my motor>>> Newest RC Airplanes, RC Jets, RC Warbirds, RC Gliders, Nitro Model RC Toys and Hobbies Planes RC Airplane Electric Brushless Nitro Gas Jet Aircraft Helicopter Toy Hobbies 3D Foam Planes

this is the ESCs>>> http://www.aliexpress.com/item/4pcs-lot-30A-SimonK-Prgramme-RC-Brushless-ESC-With-BEC-3A-For-Axis-Quadcopter-Multicopter-Wholesale/32225789649.html?spm=2114.40010608.4.2.efsWft

Have you programmed the throttle range ?

This needs to be done normally every time you change the motor.

Your ESC appear only to need this calibration and other parameters are not required.

If the throttle range is not done correctly they can just stop operating.
There is a set procedure for doing this.

Should be in the instructions.

What kind of beep codes are you getting from the motors attached to esc's that aren't working. They should give a 3 beep code when you power them on. Three increasing pitch tones.

If your ranges are set properly they will have one long beep after that when they are armed.

If you aren't getting the long beep but the other beeps on power up are there then look at doing a calibration again to set the end points as Boardburner2 suggested.

Calibration is done on these ESC's by plugging in power when ESC is receiving is max pulse (2000), There will be three startup beeps followed by a single beep confirming top range is set. Then bring throttle to 0 ( 1000us), there will be another 2 beeps confirming lower range set, followed by a long beep confirming the esc is armed.

I had one esc that, after setting end points , the trim had to be adjusted slightly to be able to arm. The throttle range was calibrated between 1000-2000us but I had to trim down to slightly below a 1000us pulse to arm after that.

i set the range between 1000-2000us and i allowed +-200us for roll, pitch, and yaw stability so the max throttle range is 2200us, and as i said only two ESCs which got error and don't want to work so do i need to make caliberation for esc first to set the max rang 2200us and then got to 1000us, or i have to change this range?

Have you verified that these esc's are actually working? Do the motors that are attached beep on power up?

You would want to calibrate your esc's for whatever your full range is.. If it's 2200-1000, then calibrate the esc's for this value.

what about if i want to try to reflash the two ESCs which has a problem how i can do it and is it easy to do?

You can use your arduino as ISP for the flash, takes some investigative work to determine which firmware you need, don't just flash blindly.

Lots of help on flashing there.

Firmware is here.

It is tricky to do the first time but then becomes easy once you work it out.

So I take it you get no beeps at all from the motors attached?

alka:
You can use your arduino as ISP for the flash, takes some investigative work to determine which firmware you need, don't just flash blindly.

RCTimer/Turnigy/Hobbywing ESC DIY Firmware Flashing - RC Groups

Lots of help on flashing there.

Firmware is here.

GitHub - sim-/tgy: tgy -- Open Source Firmware for ATmega-based Brushless ESCs

It is tricky to do the first time but then becomes easy once you work it out.

So I take it you get no beeps at all from the motors attached?

those are my ESCs >>> http://www.aliexpress.com/item/4pcs-lot-30A-SimonK-Prgramme-RC-Brushless-ESC-With-BEC-3A-For-Axis-Quadcopter-Multicopter-Wholesale/32225789649.html?spm=2114.40010608.4.2.efsWft
so which firmware i need for them?

If its not one of the ones listed you would have to break out the multimeter and see what pins they use for each gate.

From the pictures it looks like a copy of hobbyking blueseries N-FET (bs_nfet.hex) but they might use different pins. Only takes a few mins to check with a meter.

Re-flashing is only after you ruled out physical damage or calibration /arming or programming issues. You still haven't said whether the motors do their power up tune, Its important!

alka:
If its not one of the ones listed you would have to break out the multimeter and see what pins they use for each gate.

From the pictures it looks like a copy of hobbyking blueseries N-FET (bs_nfet.hex) but they might use different pins. Only takes a few mins to check with a meter.

Re-flashing is only after you ruled out physical damage or calibration /arming or programming issues. You still haven't said whether the motors do their power up tune, Its important!

yes, the motor do their power up tune but when i try to spin it, it make like on then off and on then off continuously, but with other ESC it works fine so this is not a motor problem