MessagePort USB problem

Working on a instrument project or just finished a project? Show it to others!

Moderators: russ, Ralph

Message
Author
User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: MessagePort USB problem

#11 Post by jph »

Ralph wrote: Sat Apr 03, 2021 12:10 pm I did not ask for a box to check...
I am sure just a mix-up on the reply as to whom ..... :D

So not to be left out, I send you an Easter present :mrgreen:



Jeez, I bet his box did not ask to be checked ..... (the one on the left) ;)
image.png
Joe. CISSP, MSc.

Detlef
Posts: 304
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: MessagePort USB problem

#12 Post by Detlef »

Ralph,

ah I misunderstood you. If I look at the Device tab in Air Manager, I see Arduino Knobster A and also Arduino Mega 2560 (A). That is, when everything works fine. I have not looked at that tab very often. Next time, the USB problem appears, I'll check again.

Thank you
Detlef

Detlef
Posts: 304
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: MessagePort USB problem

#13 Post by Detlef »

@jph,

Joe LOL!

Detlef
Posts: 304
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: MessagePort USB problem

#14 Post by Detlef »

jph wrote: Sat Apr 03, 2021 11:15 am Also Detlef,
Can I please ask which Epaper displays you are using ?
I hadn't consider those. Hmmmm. A backlit version would be really nice.
Joe.
Joe, I have two pieces of the Waveshare 2.9 inch two-color display (black and red). I decided for it, because it needs no backlight, it has a good format to but pushbuttons arround it (I use 10 per display) and because it draws very little power, so can live just from the USB port. Using low-power (2mA LEDs) power from the USB-cable is enough for Arduino Mego plus display plus LEDs. The current versions are just using 5V supply, so no need for 3.3 V.

Beware however that EPapers are special. A change of the display contents takes about 20 s. And it is flashing while it is refreshing its contents. I was not totally aware of that when ordering. But now for me it works ok. I dont show different contents often. The contents changes only for states parked, service, taxi, airbourne. For now.

Detlef

Detlef
Posts: 304
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: MessagePort USB problem

#15 Post by Detlef »

Ralph,

after some break I restarted with Airmanager running, and I see the Arduino Mega is not listed under Devices (my instrument says: failed to bind hardware to ids to connected hardware). It had been listed fine before and USBLogView (thanks @jph) sees no changes on the USB ports. It was COM3 before.

I pulled and replugged the USB cable. This is listed fine in USBLogView, but no difference in AM. I tried to start the AM instrument several times, no difference. Then I switched the Arduino external power supply off and pulled and replugged the USB cable. That helped, AM could connect sucessfully to my Arduino device (and was listed under devices in AM). (An Arduino reset per reset button did not help).

So I guess I could remove the external power supply cable from the Arduino (have to disassemble my panel but not too bad). But still I cannot understand why it won't start without any trouble...

Detlef

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: MessagePort USB problem

#16 Post by Sling »

Is your power supply noisy. Intermittent behaviour could easily be noisy power.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: MessagePort USB problem

#17 Post by jph »

Sling wrote: Sun Apr 04, 2021 12:35 am Is your power supply noisy. Intermittent behaviour could easily be noisy power.
It's an interesting one Tony,
The main USB serial /comm hardware / session level in USB is self error checking and so is the data passing over the connection - But if the data at the arduino level PRIOR to the commport is being corrupted then it will still error check correctly as per the old garbage in garbage out adage. An example being a corruption at arduino hardware level prior due to the processor passing data to the usb serial converter on the arduino would error check correctly when passed over USB. - again, garbage in garbage out.

Interestingly I did once have an issue with a specific arduino that caused a similar issue though. !
It is the ONLY arduino I have ever had fail, and it was a store bought trademarked one !!! :?
I was using it with a TM1638 as a test of one of the board modules with the buttons and 8 digit displays. It would occasionally simply stop working - the display would freeze - without a disconnect at the hardware commport level, although, it would then fail to flash also (but still be recognised via the arduino IDE as a device) which was a definite sign of data issue although not necessarily at the physical USB serial level as it never caused a physical disconnect - garbage in garbage out - or indeed, correct data from the arduino IDE yet being corrupted at the arduino processor end at serial port level on the arduino processor after the USB Serial IC. (An FTDI which was far mor tolerant than the processor.
This was traced to the on board 5V regulator on the Arduino as I was using an external supply for both arduino and the Module.
The power on LED would start to flicker and the issue would happen. It would be hit and miss, and disconnecting the PSU and reconnecting would tend to make it ok for a short while but could stop at any point. Eventually it became constant. I believe it was the standard AMS1117 reg but cant remember.
A good test might be to run the bare minimum simplest message_port sketch and see what happens on the original hardware ?. If still present use a different arduino on a short cable with nothing connected, Of course, it would also help to try the arduino on USB power only if load can be taken off of it as Detlef mentioned.

Joe
Joe. CISSP, MSc.

Detlef
Posts: 304
Joined: Mon Nov 16, 2020 9:43 am
Location: Bavaria

Re: MessagePort USB problem

#18 Post by Detlef »

Tony,

I am sure of nothing here. I have no oscilloscope or other to really measure noise of the power supply. I switched off the external power supply (I think it is a 3A capable good quality device). But my Arduino would not connect, same after PC off/on. Now I plugged the USB cable to a different port at the PC (actually that is a USB extension board). The Aruduino shows up fine right now. I will see how long.
Next time I disassemble my panel box I will pull the external PSU cable. I guess even without the power supply switched on, it might generate some noise. The PS is plugged in an AC outlet, mounted at the back of my panel. The DC output is distributed 1 to 5 or so inside my panel box. At least two of those tails I had to extend (soldered) to reach the sides of my box. From there it goes over a plug to my LED cockpit illumination (which are simple lamps, where I removed the AC/DC part, added switches and go through a power resistor into the LEDs). So I do need the power supply for the illumination but not for the Arduino. I will pull it out at the next occasion.

@Joe, thank you also for your thoughts. I admit my Mega board is not an original. And to save soldering work I used a screw prototype board (a good one though). displays, leds and buttons are on solder grid prototype boards. So all that is far from perfect. If I send a picture, you and Tony will probably say, ah no wonder, that's why it is not working, but I am still optimistic :)

After all, all those wires are static signals (switch, button or LED), except for the displays. But the displays do work fine.
DSC04270.png
DSC04270.png (197.89 KiB) Viewed 3540 times
Thanks,
Detlef
DSC04271.png
DSC04271.png (225.77 KiB) Viewed 3540 times

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: MessagePort USB problem

#19 Post by jph »

Hi Detlef, firstly, AMAZING work, it looks absolutely superb. I am well impressed :D
Really interesting that another USB port seems to work - albeit on an 'extender'
Can I just please clarify what you mean by 'extender' ?
Do you mean a USB HUB ? - like a 4 port hub etc - or, do you mean an amplified / repeater single USB cable ?
If it is a 'hub' . is it self powered or does it have an external PSU to the HUB ?
I think you might be getting to the bottom of your issues. ;)

Is it possible to post larger format images ? - I would just love to see the panel work etc.
I wouldn't worry in the slightest about 'original' - read 'trademarked' Arduinos as there is no difference at the end of the day, the 'trademarked' ones are overpriced and overhyped. It is a fully open source project. The only thing that the arduino 'store' sells that is really different is the trademark and rip you off for it. Stick with the non trademarked units :geek: You will have no issue 99% of the time. A said, the ONLY time I have had an Arduino issue (that wasn't my own stupid fault :D ) was with a 'trade marked' UNO.

Would love to see more details on the buttons used around the paperwhite units
Classic work..
Joe
Joe. CISSP, MSc.

User avatar
jph
Posts: 2846
Joined: Fri Apr 10, 2020 12:50 pm
Location: Somewhere over the rainbow..

Re: MessagePort USB problem

#20 Post by jph »

Hi again Detlef,
We talked about a way of checking for established connection on message port -
This should be interesting to you -
https://siminnovations.com/wiki/index.p ... ssage_port
Check out the hw_connected
I hadn't noticed this before. :roll: Might be just what you wanted ?

Joe
Joe. CISSP, MSc.

Post Reply