alexrus/marax_timer

Randomly get weird characters instead of temp

Closed this issue · 11 comments

The timer is working super well and I can see the temp sometimes, but it is rotates between the temp and garbage Unicode characters.

Attached is a video of what I mean.

Not sure if this is a bad crimp or a software issue.

Upload.from.GitHub.for.iOS.MOV

I have seen same things but very rarely only when I turn on or off the machine and for a very short time.

I get the same during brewing. It could be caused by being underpowered? I haven’t tried to swap the power supply yet.

I'm using the microusb for power with an iPhone charger plug. Not sure if this is sufficient or not, but I believe it has enough amps.

I would guess it is more of an issue on the maraX side, probably false reading from the sensors or bad characters in the simple text message. Somehow the raw data should be checked.
I am also using a simple power supply from a wyze cam now. And I am powering through the pins and not through the usb port of the esp.
I had issues with flashing led (same as when the pump is running and the reed is active) even if the machine was turned off. I had the machine and the esp on the same 3-way socket with own usb outputs, so that I can turn everything on and off with a smart plug. But somehow the esp was flashing even with no power on it. So I swithed the socket usb port to a wyze power supply and the issue seems disappearing.

I was thinking the same on junk in the serial data. If we filter junk out, then that could lead to a less frequent update depending how many bad bytes we get. I guess this is acceptable for me anyways as I mainly use it to confirm I am up to temp. I may give that a try and do a PR.

I encountered this issue a few times in the past, but it was totally random, so I investigated a bit and the issue is that I'm waiting for a stream of data from maraX in the correct format, but the machine sends it otherwise. This can happen if the machine sends the endMarker (\n) during the transmission

We read it here: https://github.com/alexrus/marax_timer/blob/main/timer/timer.ino#L60

take a look here (https://github.com/alexrus/marax_timer/blob/main/timer/timer.ino#L74) and see how the data is coming back from the machine

I am powering my esp from an old iPhone charger, should have plenty of power for what it needs

Looks like I am getting the following over serial:

$⸮/�⸮�⸮s⸮�C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
C123b,120,112,097,0000,0
⸮⸮�120,112,097,0000,0

Every now and again we get a ⸮⸮�119,112,097,0000,0

PR #6 Should handle this case in a quick a dirty way.

Interestingly enough, it worked perfectly when plugged up to the laptop, but now that it is back on a power brick, its doing the same exact thing 🙄

I'll poke it some more.

Here is more info on this. Plugged into my laptop, it works perfectly. Plugged into a power brick, it does the funky behavior.

Laptop:
https://www.dropbox.com/s/mb9nw8q6npp0grh/IMG_3086.MOV?dl=0

5V 2.4A iPad charger:
https://www.dropbox.com/s/2xqdkp0xxps8i96/IMG_3085.MOV?dl=0

😕 The only real difference I can think of is that on the laptop, it is attached as a serial device. I tried commenting out all the Serial.println calls and that didn't change this at all.

Alright, should be the final update on this:

Even the 5V 2.4A plug was not enough. I used a Anker QI USB brick that I had kicking around and the display issues instantly disappeared. I wonder if the other plugs were also more dirty, electrically.