Pages: [1]   Go Down
Author Topic: Engine freak out with Mege2560  (Read 492 times)
0 Members and 1 Guest are viewing this topic.
Springfield, IL
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Oohhh.... what does THIS button do?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So I'm building a UAV with an Arduino Mega 2560, Phoenix ICE HV 80 ESC, and a Himax HC5030 brushless motor setup. I've tested the setup previously using an Arduino UNO, and worked fine. Now with the Mega2560, the motor is freaking out. Its armed, it remains at zero throttle, goes to an unknown (kinda high) throttle... the UAV starts tipping and I end up crunching the landing gear in my haste to keep it from doing a barrel roll on my desk. :<

The code is attached, if anyone can take a look and figure it out while I go to the hobby store for new landing gear (before they close), it would be much appreciated... because this is starting to feel over my head.

In case anyone was wondering, the commented out portions are the rest of my setup. I just commented them out to test the pieces before I try to do the whole thing. The engine-1 was the only thing connected to the mega... and the pins were in 5v, Gnd, and A0... the ESC pins were red, brown, and orange respectively.

* CtrlEngine.ino (1.09 KB - downloaded 7 times.)
* UAVHover_1_0ctrltest.ino (0.77 KB - downloaded 8 times.)
Logged

Me speak bad English? That's un-possible!

~Ralph Wiggum

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12631
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I suppose the terminal assignments may have changed with the move to the new hardware. Do you have a current wiring diagram?
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Springfield, IL
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Oohhh.... what does THIS button do?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To start, on the earlier post I meant A1, not A0. Sorry about that. About the wiring diagram, the best I could do is attached. <Sigh> I knew I forgot something today... I forgot to take the props off before I tested the engines again.


* Wiring Engine.bmp (820.37 KB, 800x350 - viewed 18 times.)
Logged

Me speak bad English? That's un-possible!

~Ralph Wiggum

Springfield, IL
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Oohhh.... what does THIS button do?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Also, I attached servos earlier to the circuit and they worked fine. From the motors going, I'm guessing the motor's power is fine as well. I think the problem is with the signal.

Also, (not too eager to test this) I recall the wing with the engine running going DOWN. Did I put the prop on backward? Do I need to switch power and ground lines between the motor and ESC? Hopefully, I'm just remembering wrong, but just in case.
Logged

Me speak bad English? That's un-possible!

~Ralph Wiggum

UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12631
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is the high throttle being demanded by the Arduino?
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Springfield, IL
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Oohhh.... what does THIS button do?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Maybe? I don't know anymore if it really did screw up. Maybe the motor did as it was suppose to. I'm the one who forgot to take off the prop... I won't be working on the plane until morning (poor lighting and no heating) so I'll know more in the morning. I really hope that was just me over-reacting to the broken landing gear (kinda) and it was working ok.

I'm sorry if this turns out to have been a waste of you guys time.
Logged

Me speak bad English? That's un-possible!

~Ralph Wiggum

Springfield, IL
Offline Offline
Newbie
*
Karma: 0
Posts: 27
Oohhh.... what does THIS button do?
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey guys, I built myself new landing gear (pretty proud of it) and connected everything up... and still doesn't work. I started a new thread since this seems to be a new problem (instead of freaking out, it now does nothing) which is called "Running engines with Mega2560". Thank you to those who read and replied, I hope to hear from you on the new thread too.

-Lee
Logged

Me speak bad English? That's un-possible!

~Ralph Wiggum

Pages: [1]   Go Up
Jump to: