mit-drl / e-vent

MIT Project: A low cost emergency ventilator controller
39 stars 31 forks source link

LCD screen bug #63

Closed synaption closed 4 years ago

synaption commented 4 years ago

After a few minutes of run time my LCD screen starts to display garbage. Is anybody else experiencing this? The bug occurs after homing is complete. I enter the EX_STATE and then since I am just emulating pressure feedback manually on my desk several alarms occur. After a few minutes the screen displays nonsense.
95481502_286422802518683_7599466072130977792_n

amadoantonini commented 4 years ago

Can you elaborate on how you are emulating the pressure signal?

synaption commented 4 years ago

I have attached a syringe to the sensor with heat shrink. I have also been able to circumvent this bug for testing purposes by commenting out everything inside of the handleErrors function. 95619759_236519177411442_764844984342937600_n

amadoantonini commented 4 years ago

When the display starts displaying garbage, does the system continue running?

synaption commented 4 years ago

Judging by the beeps and serial output, it seems as though it does respond to buttons, knobs, and the pressure sensor.

amadoantonini commented 4 years ago

It could be trying to write a bad value. One thing you can do to check is to add a serial print in the place where we write to the LCD to see what it's trying to do. E.g.

Serial.print(row); Serial.print(", "); Serial.print(col); Serial.print(": "); Serial.println(printable);
synaption commented 4 years ago

With the added debugging code, the serial output looks about the same weather the screen is working or not. I have copied a few lines below from each scenario.

screen working 22:14:36.213 -> 0, 11: Pressure: 22:14:36.247 -> 17.69, 1.02, 0, 0, 0.00 22:14:36.247 -> 0, 11: Pressure: 22:14:36.282 -> 17.72, 1.02, 0, 0, 0.00 22:14:36.282 -> 0, 11: Pressure: 22:14:36.316 -> 17.75, 1.02, 0, 0, 0.00 22:14:36.316 -> 0, 11: Pressure:

screen broken 22:13:13.221 -> 269.86, 1.02, 0, 0, 0.25 22:13:13.221 -> 0, 11: Pressure: 22:13:13.255 -> 269.89, 1.02, 0, 0, 0.25 22:13:13.255 -> 0, 11: Pressure: 22:13:13.289 -> 269.92, 1.02, 0, 0, 0.00 22:13:13.289 -> 0, 11: Pressure: 22:13:13.323 -> 269.95, 1.02, 0, 0, 0.00 22:13:13.323 -> 0, 11: Pressure:

synaption commented 4 years ago

Also the bug seems to persist even while cycling normally through states and with all the error handling commented out.

amadoantonini commented 4 years ago

Sometimes the screen can display garbage if a cable is loose. Do you observe this behavior consistently after a few minutes? And does it go away with a simple restart?

synaption commented 4 years ago

It seems to take a random amount of time and goes away with a restart. It looks like I get the same error when I unplug the screen and plug it back in, so I think I will close this comment though I did just post another one.