jmoore52 / SkywalkerRoaster

Artisian control of Skywalker Electric Coffee Roaster via Arduino.
54 stars 7 forks source link

Rx/Tx pins pulses voltage #1

Closed renatoa closed 5 months ago

renatoa commented 10 months ago

Hi,

5V or 3.3V at peak of Rx/Tx pulses? Asking to know if I can connect directly to an ESP board, allowing 3.3V only signals.

Thank you !

Krullus commented 6 months ago

I measured the voltage on the signal from the roaster, and it was around 5V (5.28V on a not very accurate oscilloscope). Additionally, in the controller unit, it looks like both TX and RX are pulled-up to 5V.

renatoa commented 6 months ago

Forgot to specify in the initial post that I am using the Spy version, not the Command version. So I am listen only, on both wires, thus no need to command any line. For listening only I used resistor dividers, to reduce 5V to 3.3V, thus a passive solution, no active level shifting.

renatoa commented 6 months ago

Forget this, the WiFi in ESP devices disturbs all the timings of the Skywalker communication. And for Skywalker the timings of the packets ARE critical. This is the reason I am using Spy version, because the way how the command packets are sent now is not reliable, and I experience machine lockups, due to packet delays. Planning to split the packets handling between the two cores of ESP32, to have no interference from the main loop code in the process of sending fake controller packets to the roaster. Better use a BT dongle, as serial wireless, is much safe.

renatoa commented 6 months ago

This is curious, because experiments shows that ... beware, for an Arduino!

Seems that an output GPIO of processor powered at 3.3V should be able to control an Arduino input... Not sure about chinese chips used in SkyWalker though...

renatoa commented 5 months ago

pulsePin is a function written by josh, look some lines above, is not Arduino specific.

You can easily check the length timing, send an empty (zeroed) buffer, and print millis() before and after. Should give you about 90ms 7500+3800+78(650+750) = 89700 us.

renatoa commented 5 months ago

How do you detect that Skywalker communication is not affected by wifi? It is stated in the ESP documentation that wifi apps have the highest priority above any other task, so timer based apps should be handled in a special way, if wifi is used. You feel it as unaffected because broken packets crc checks fails, and they are skipped. No alarm is raised if too many control packets are lost, but you can experience sudden roaster stop without any apparent reason. The current batch will be lost obviously. I experienced lost packets even with no wifi, for this reason I wrote the whole using interrupts.

xunlink commented 5 months ago

First of all, thanks to the author, I am also esp32, I am looking for ways to do it without connecting to the computer entity.

renatoa commented 5 months ago

Why this desperate need for wireless? Are you operating Skywalker remotely ? May I remind that coffee roasting is not an unattended activity ?

Packet based wifi, without a transport protocol, to handle check sums and retries, it's very unreliable, with lot of drops. I tell this as a retired automation engineer, whose job born and grown up together with the Internet. I had industrial crane automation projects where the result of first attempts to remote control using wifi led was seconds of frozen equipment. Skywalker would not allow this, if no control packet arrive in a second, it stops and you have a trashed batch.

I am using ESP stuff mainly for memory allowing me to do things not possible with an Arduino. If no wires are a project specification, and short distance, serial over BT is much more reliable than wifi, i.e. inside a room. If the project impose wifi communication and long distance, I use a second ESP for wifi only, to avoid free run of code of the main process. Even the much claimed multitasking is a joke, it's actually a switch between cores every one millisecond, which is a mess if it happens in the middle of a skywalker protocol pulse.

xunlink commented 5 months ago

I am very happy to receive your reply. Using wifi does not require remote control, and using USB to connect to a computer within a short distance must be the safest. I quite agree with this point. But I think a wireless connection over a short distance might be a more minimalist approach。 I really appreciate your willingness to reply to me. In the future, if there is a chance, we also look forward to seeing the addition of wireless control.

xunlink commented 5 months ago

@kfhwang 朋友妳好,我想知道,有沒有可能分享這個esp32通過wifi控制的代碼.我現在碰到了和妳壹樣的難題, 好難過

renatoa commented 5 months ago

Regarding air temperature... forget anything you know from the other roasters! Here air has the least influence on roasting, and this influence is for cooling, nothing else, not even the chaff exhaust. Actually, in this machine the air is the coolest element in the chain. First is the lamp, then the beans, then the drum, and last is the air. IR heat transfer is a very special beast of heating... completely different than convection or contact. First... IR radiation pass through transparent gases and even glass without ceasing any or very little energy. Think how the sun heat the planets... the cosmic space is cold, right? ;) The air is heating from the planet surface radiation, not directly from the sun... the higher the altitude you climb in the mountains, the colder become the air... ;) The sun energy is transferred only to the solid surfaces, depending on their darkness, for this reason the whole IR theory gravitates around the "black body" concept. So the energy inside the drum is absorbed by beans, and by drum wall, because is gray. If drum would be shiny, as a polished metal, even the drum would be cold ! The air is heathen mainly from the beans and the drum, and also from lamp metallic sheath. For all the reasons above, in this machine the air temperature tell you NOTH-ING... just think that the temperature of air at exhaust is about 120 C degrees... will draw on graph as an almost straight line, very little variations, in the middle of the graph, i.e. somewhere in the drying area... have you ever seen this in other machines ?

renatoa commented 5 months ago

@kfhwang 朋友妳好,我想知道,有沒有可能分享這個esp32通過wifi控制的代碼.我現在碰到了和妳壹樣的難題, 好難過

Translation: Hello friend, I would like to know if it is possible to tell me how to control the esp32 code. I am encountering the same problem as you now.

renatoa commented 5 months ago

All the Rao roast theory does not apply to Skywalker, sorry. It's mainly for convection machines. Even his famous continuous declining RoR mantra can be skipped, this machine is a "slow start fast finish" type, where it's ok to have almost flat RoR. Believe me, heat transfer techniques are far more than Rao, he is only the visible face, the PR of roasting.

xunlink commented 5 months ago

Thank you very much

xunlink commented 5 months ago

I'm so happy.It's been a long time since I've been exposed to such enthusiasm. I am now using arduino uno,The basic function is good, but there are still problems with the temperature reading: the temperature does not climb in real time during the coffee roasting process, and there is a delay, let me give you an example.It is an established fact that when the temperature in the boiler is 100 degrees Celsius, artisan only exhibits 80 degrees Celsius, and ROR in artisan, failed

xunlink commented 5 months ago

This may not be a real-time temperature? I don't know that this phenomenon only exists for me.

renatoa commented 5 months ago

Not sure what you mean with "established fact"... You see 100 on control panel display, and 80 in Artisan?

You can monitor the messages flow and post here some of them, by copy paste. This can be done via Help/Serial menu, then check the box to start logging.

xunlink commented 5 months ago

测试后,将此项目上传到arduino Uno,实际温度不准确,工匠软件没有实时更新温度,似乎每3秒更新一次温度

renatoa commented 5 months ago

3 seconds is the default Artisan sampling interval. You can change to one second the sampling rate, Config/Sampling Interval... menu A warning will appear, ignore.

But this not explain 20 degrees difference... 20 degrees is more than one minute rise.

xunlink commented 5 months ago

@kfhwang This is at the same level as the original thermometer, which is inaccurate even in the process of baking beans. The original controller is not sensitive to temperature feedback. It is very similar to the effect of the current author's project. Maybe it's because I have an extra thermometer, so I feel it, and I try to exchange their positions. The result of the test is still the same. I don't know if I am an example.

renatoa commented 5 months ago

The original thermometer is accurate, but the mistake is your expectation to see same values as you see in other roasters. The hot air based roaster are measuring a mix of hot air and beans, where hot air is always 20-30C degrees higher than beans. In this machine is the contrary, air is taking heat from beans and is never hotter than them.

Also, there is no sensor delay, the heater is the culprit, the lamp has so big inertia, almost as a gas machine. The response to air changes are almost instant, under 15 seconds, just check and see yourself. The response to heat changes is other story, you should learn the machine behavior and plan the change at least 30 seconds in advance, same routine as for a gas roaster. For this reason, if the roast progress tell you to change something, always start with changing the air, to see a fast response, then change the heat, about 10-15 seconds later, to maintain the trend induced by air change.

Related to the location of probe... the original placement is there with a reason... to hide the sensor from direct lamp radiation, in the shadow of the trier. Lamp-trier-sensor, are all in a straight line. The readings of any sensor placed out of the shade will be faked.

renatoa commented 5 months ago

Just for reference, in my experience, set the sampling rate to 1sec, Arduino may not follow up the speed. Therefore, BT will lose sometimes during the recording. In contrast, ESP32 is fine when set sampling rate to 1sec.

They both read the same, there is no reason that ESP would read messages at other rate than Arduino. With both boards you get about 3-4 temperature packets per second, missing other 6-7 packets because they overlap with control messages. This is by design, can't be changed without interrupt driven logic.

renatoa commented 5 months ago

This discussion derailed from the initial thread scope, about pin voltages. If you want to discuss more on other Skywalker subjects, in a location with better visibility, please join HRO forum, and we continue there. Will close now the issue, however you can PM me if something important or urgent.

xunlink commented 5 months ago

What is HRO forum?How do I join.. I saw a link on the home page of the project, but it's not working at the moment.

renatoa commented 4 months ago

https://homeroasters.org/forum/viewthread.php?thread_id=6979