Big Drawback - AM/AP RESETS ARDUINO at Start
Big Drawback - AM/AP RESETS ARDUINO at Start
Dear Sirs,
When Air Manager or Air Player is connected to an Arduino for the first time, AM or AP "resets" the Arduino. That is a big drawback that happens in both HOME and PRO.
Currently we are using an Arduino Mega that is responsible for turning on the power sources and devices of the simulator and finally turning on the computer where AM or AP runs. This arduino will receive messages from the AM/AP via Message port (channel P), so the device (ARDUNIO MEGA) must be added to the AM/AP. By adding it, the AM/AP resets the Arduino and even when AM/AP starts too. This causes the I/O pins that controlls all power sources to turn off, including the computer, which is a paradox.
Is there a way for AM/AP to identify the Arduino without resetting it?
Regards,
Nicolás
When Air Manager or Air Player is connected to an Arduino for the first time, AM or AP "resets" the Arduino. That is a big drawback that happens in both HOME and PRO.
Currently we are using an Arduino Mega that is responsible for turning on the power sources and devices of the simulator and finally turning on the computer where AM or AP runs. This arduino will receive messages from the AM/AP via Message port (channel P), so the device (ARDUNIO MEGA) must be added to the AM/AP. By adding it, the AM/AP resets the Arduino and even when AM/AP starts too. This causes the I/O pins that controlls all power sources to turn off, including the computer, which is a paradox.
Is there a way for AM/AP to identify the Arduino without resetting it?
Regards,
Nicolás
Last edited by nnyerges on Mon Apr 15, 2024 5:37 am, edited 2 times in total.
Chief Technology Officer (CTO) at 360ATC Aviation Training Center & Aviation One Academy
Electronic Engineer. Control & Software Specialist
Electronic Engineer. Control & Software Specialist
Re: Big Drawback - AM/AP RESETS ARDUINO at Start
I'm not really sure what you mean...
Which version of Air Manager are you talking about?
Which version of Air Manager are you talking about?
Re: Big Drawback - AM/AP RESETS ARDUINO at Start
Hi Ralph,
Version 4.2.8 PRO & HOME
Let me try to be more clear:
- Each time AM starts (with already included devices [see point 9 bellow], RESETS all USB connected Arduino's.
- All this Arduinos MEGA's have they how sketch.
- All this Arduinos MEGA's' use Messageport (si_message_port) library.
Normally this its not a problem if the initial reseted I/O pins states of any USB connected Arduinos doesnt affect our simulator behavior. But...
- We have one Arduino MEGA that is the "Main Power ON controller. Lets called (MC).
- Its powers up in sequence, all simmulators powers supplys-> cards, MPU's, the Main PC, etc. etc.
- In that power on sequence, eventually the MC turns on a SSR to power up the Main PC.
- The Main PC runs authomatically and starts Air Manager.
- The (MC) its connected to the Main PC via USB, in order to work with Air Manager has a console and debugger.
Has soon the Air Manager starts, it resets the MC causing the power SSR to go off and subsequently turns off the Main PC, so the MC starts over, over and over againg in a infinit paradox loop. LOL. It only ocurrs, every time AM starts its algorithm to seek connected Aurduinos in the USB port. It nothing have to do with the USB port perse or Arduinos power. ITS an Air Manager Messageport manners. Try it your self with the following procedure:
1. Take for example a brand new Arduino NANO.
2. Flash it with Air Manager in channel A. It will appears in HOME. Then delete it from devices and close Air Manager (this will prove my case in points 6, 7, 8 and 9).
4. Upload the following sketch to the NANO:
This sketch will blink 10 times (during setup) and then, the LED goes ON (during the loop). The purpouse is to demostrate that an external reset occurs every time Air Manager connects.
5. Check that the sketch is running OK (10 blinks and then LED ON).
6- Start Air Manager. You will notice that nothing happends (the device is not added). The LED is ON and NO RESET OCURRS.
7. Now ADD the new NANO device. WALLLLLAAAAA #1 !, the device RESET's !.
8. Close Air Manager (do not remove de device).
9. Run Air Manager again and ...... WALLLLLAAAAA #2 !, the device RESET's !.
CASE PROVED
This occurs with any Arduino device. If you guys cannot solve it, I will take another path like many others I have had to take with your programs, which by the way, is excellent, but not perfect, even if it cost us a lot of buck to have the PRO version LOL.
Have a nice day.
Nicolas
Version 4.2.8 PRO & HOME
Let me try to be more clear:
- Each time AM starts (with already included devices [see point 9 bellow], RESETS all USB connected Arduino's.
- All this Arduinos MEGA's have they how sketch.
- All this Arduinos MEGA's' use Messageport (si_message_port) library.
Normally this its not a problem if the initial reseted I/O pins states of any USB connected Arduinos doesnt affect our simulator behavior. But...
- We have one Arduino MEGA that is the "Main Power ON controller. Lets called (MC).
- Its powers up in sequence, all simmulators powers supplys-> cards, MPU's, the Main PC, etc. etc.
- In that power on sequence, eventually the MC turns on a SSR to power up the Main PC.
- The Main PC runs authomatically and starts Air Manager.
- The (MC) its connected to the Main PC via USB, in order to work with Air Manager has a console and debugger.
Has soon the Air Manager starts, it resets the MC causing the power SSR to go off and subsequently turns off the Main PC, so the MC starts over, over and over againg in a infinit paradox loop. LOL. It only ocurrs, every time AM starts its algorithm to seek connected Aurduinos in the USB port. It nothing have to do with the USB port perse or Arduinos power. ITS an Air Manager Messageport manners. Try it your self with the following procedure:
1. Take for example a brand new Arduino NANO.
2. Flash it with Air Manager in channel A. It will appears in HOME. Then delete it from devices and close Air Manager (this will prove my case in points 6, 7, 8 and 9).
4. Upload the following sketch to the NANO:
Code: Select all
/* NJNM204ABR10
This sketch will blink 10 times (during setup) and then led
goes still ON (during the loop). The purpouse is to demostrate
an external reset ocurrs every time Air Manager connects.
*/
#include <si_message_port.hpp>
SiMessagePort* messagePort;
static void new_message_callback(uint16_t message_id, struct SiMessagePortPayload* payload) {
// We received a message from Air Manager or Air Player
}
void setup() {
// Init library on channel A and Arduino type MEGA 2560
messagePort = new SiMessagePort(SI_MESSAGE_PORT_DEVICE_ARDUINO_NANO, SI_MESSAGE_PORT_CHANNEL_A, new_message_callback);
pinMode(13,OUTPUT);
int stage = 0;
for (int i=1; i<=10;i++) {
digitalWrite(13,HIGH);
delay(500);
digitalWrite(13,LOW);
delay(500);
}
}
void loop() {
// Make sure this function is called regularly
messagePort->Tick();
digitalWrite(13,HIGH);
}
5. Check that the sketch is running OK (10 blinks and then LED ON).
6- Start Air Manager. You will notice that nothing happends (the device is not added). The LED is ON and NO RESET OCURRS.
7. Now ADD the new NANO device. WALLLLLAAAAA #1 !, the device RESET's !.
8. Close Air Manager (do not remove de device).
9. Run Air Manager again and ...... WALLLLLAAAAA #2 !, the device RESET's !.
CASE PROVED
This occurs with any Arduino device. If you guys cannot solve it, I will take another path like many others I have had to take with your programs, which by the way, is excellent, but not perfect, even if it cost us a lot of buck to have the PRO version LOL.
Have a nice day.
Nicolas
Chief Technology Officer (CTO) at 360ATC Aviation Training Center & Aviation One Academy
Electronic Engineer. Control & Software Specialist
Electronic Engineer. Control & Software Specialist
Re: Big Drawback - AM/AP RESETS ARDUINO at Start
Hi,
This is interesting, since AM doesn't do anything with the virtual COM portt until you tell it specifically.
What it does do is enumerate all USB devices, searching for a knobster, raspberry pi pico or octavi device.
It might be that the enumeration triggers the Arduino device to reset.
Will try to investigate further, but that is going to take some time, when I'm back from vacation probably, in about 3-4 weeks from now,
Corjan
This is interesting, since AM doesn't do anything with the virtual COM portt until you tell it specifically.
What it does do is enumerate all USB devices, searching for a knobster, raspberry pi pico or octavi device.
It might be that the enumeration triggers the Arduino device to reset.
Will try to investigate further, but that is going to take some time, when I'm back from vacation probably, in about 3-4 weeks from now,
Corjan
Re: Big Drawback - AM/AP RESETS ARDUINO at Start
Hi Corjan,
Everytime a speek with Ralph, you always on vacation
Indeed the enumeration triggers the Arduino device to reset.
We pay for the PRO version to get serius with AM.
It's important for Us.
The solution of this issue give Us the next steps on our desing!
Regards,
Nicolás
Everytime a speek with Ralph, you always on vacation
Indeed the enumeration triggers the Arduino device to reset.
We pay for the PRO version to get serius with AM.
It's important for Us.
The solution of this issue give Us the next steps on our desing!
Regards,
Nicolás
Chief Technology Officer (CTO) at 360ATC Aviation Training Center & Aviation One Academy
Electronic Engineer. Control & Software Specialist
Electronic Engineer. Control & Software Specialist
Re: Big Drawback - AM/AP RESETS ARDUINO at Start
Gentlemen,
It is not an AM/AP problem, it is intrinsic to the serial port that causes the Arduino to "AUTO RESET".
Nicolas
It is not an AM/AP problem, it is intrinsic to the serial port that causes the Arduino to "AUTO RESET".
Ref.: https://forum.arduino.cc/t/does-arduino ... b/544278/8Arduino resets via the DTR line of the usb connection, the Arduino IDE has no option to disable it when opening the Serial but you could just use another Serial tool or make your own Serial tool. Else you can use a "FTDI" - TTL Serial convertor, and just wire the FTDI to the serial 0 lines, then if you want to be able to reset the Arduino your need to connect the DTR to the reset pin along with a reset circuit, which consists of a 101 ceramic cap and a resistor, or by connecting a 10uf cap between the reset pin and ground. Some Arduinos have a jumper that you can cut to permanently disable the AUTO RESET.
Nicolas
Last edited by nnyerges on Mon Apr 15, 2024 5:37 am, edited 1 time in total.
Chief Technology Officer (CTO) at 360ATC Aviation Training Center & Aviation One Academy
Electronic Engineer. Control & Software Specialist
Electronic Engineer. Control & Software Specialist
Re: Big Drawback - AM/AP RESETS ARDUINO at Start
Here is a nice article about written in 2019,
https://www.astroscopic.com/blog/disabl ... connection
https://www.astroscopic.com/blog/disabl ... connection
Chief Technology Officer (CTO) at 360ATC Aviation Training Center & Aviation One Academy
Electronic Engineer. Control & Software Specialist
Electronic Engineer. Control & Software Specialist
Re: Big Drawback - AM/AP RESETS ARDUINO at Start
Removing the capacitor between the DTR line and the reset is a solution; You can even flash it manually by playing with the reset button. However, the question would be if by removing the capacitor, Air Manager can still recognize the card automatically?Arduino resets via the DTR line of the usb connection, the Arduino IDE has no option to disable it when opening the Serial but you could just use another Serial tool or make your own Serial tool. Else you can use a "FTDI" - TTL Serial convertor, and just wire the FTDI to the serial 0 lines, then if you want to be able to reset the Arduino your need to connect the DTR to the reset pin along with a reset circuit, which consists of a 101 ceramic cap and a resistor, or by connecting a 10uf cap between the reset pin and ground. Some Arduinos have a jumper that you can cut to permanently disable the AUTO RESET.
Chief Technology Officer (CTO) at 360ATC Aviation Training Center & Aviation One Academy
Electronic Engineer. Control & Software Specialist
Electronic Engineer. Control & Software Specialist
Re: Big Drawback - AM/AP RESETS ARDUINO at Start
I always laugh at your comments. Sometimes interesting and useful, and other times sarcastically pedantic. That's not the answer.
Chief Technology Officer (CTO) at 360ATC Aviation Training Center & Aviation One Academy
Electronic Engineer. Control & Software Specialist
Electronic Engineer. Control & Software Specialist