Arducopter HIL Mode problems.

Hi Everyone,

I'm quite new to using Arducopter and I am trying to set up a hardware in the loop (HIL) simulation using an APM 2.0 board, Mission Planner and FlightGear. I have followed the instructions to set up the APM 2.0 board into HIL mode provided on the Arducopter Wiki. My problem arises when I connect to the APM board after flashing the quadrotor HIL firmware to the board. A connection is established with the board, but the altitude readings start to cycle erratically between 0 and increasingly larger negative altitudes. (There is a screenshot below taken 30 seconds after a connection was established)


As I had not started the simulation link yet I thought this could be because no attitude or location data was being provided, however after the starting the simulation link the same problems still occured, and the FlightGear screen went very dark. Additionally, the quadrotor loaded in FlightGear does not respond to any RC inputs after arming it in Mission Planner.

Out of curiosity I also tried loading the plane and heli HIL firmwares. The plane HIL firmware worked fine and I was able to fly missions. The heli HIL firmware however, caused the same issues that I observed with the quad HIL firmware.  Do the quad and heli firmwares require different Mavlink files in the Mission Planner program files folders.

Any help would be greatly appreciated.



You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Thanks for your reply Kate.

    I followed your instructions, and everything seems to work fine until I finish uploading the firmware. You're document says that after the firmware is uploaded the “A” LED should turn green. My "A" LED flashes red. Does this indicate an error in the firmware? All I have done to the firmware is enable "#define CONFIG_APM_HARDWARE APM_HARDWARE_APM2" and "#define HIL_MODE HIL_MODE_ATTITUDE".



  • hey,

    I have had many problems with HILS too.

    Check if this would help. I have just made this doc.

    Steps for Hardware in Loop Simulation.doc
This reply was deleted.