What's in Your Ro... | [559] |
Skywalker roaster... | [403] |
Skywalker, the AL... | [314] |
Dan's Direct-Flam... | [265] |
SR800/SR540 Fan C... | [90] |
Testing Arduino UNO with bitwisetech / popc and MAX6675
|
|
zamunda |
Posted on 08/20/2021 11:47 AM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Quote zamunda wrote: Quote renatoa wrote: You can't use the same serial comm port for both BT and USB. Some switching is required, at least one of the lines. Thank you Renatoa, I was aware of that, I do not have the board connected per USB when trying to upload. Update: ah, I understand I guess, uploading a sketch can only be done per USB and in that case pin 1 and 2 of BT should be temporarily disconnected. Made some progress, found this video very helpfull: 1) Was able to set AT-commands in order to adjust defaults for BAUD-rate, name, password, etc 2) Luckily for my model, no voltage reducer was needed (RX accepts 3-6V) 3) Found out that for AT-mode, jumpers should be: RX-RX, TX-TX, in normal mode: RX-TX, TX-RX 4) Can connect to BT with my Mac, however, adjusting CONFIG within Artisan still gives me a modbus communication error after a while, no temp readings still. Somewhere in the video is said that the HC-06 is not compabible with Apple but elsewhere I read that only counts for IOS, Mac OS X should be good. Can anyone confirm that? Thanks and regards, Bert |
|
|
zamunda |
Posted on 08/20/2021 11:50 AM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Pic of BT model
zamunda attached the following image:
|
|
|
zamunda |
Posted on 08/21/2021 5:13 AM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Hello I set the BAUD rate of the HC-06 tot 19200 just like in the sketch: ... void setup() { slave.begin( 19200); // 19200 baud, 8-bits, even, 1-bit stop ... I connect the Mac to BT, connection succesfull, when I start Artisan, the blue led stays on fixed indicating Artisan is connected via BT to Arduino. However, after a while I (5-6 seconds) I get "Modbus communication Error"... Any ideas how to proceed/debug further? Thanks and regards, |
|
|
renatoa |
Posted on 08/21/2021 6:55 AM
|
![]() Administrator ![]() Posts: 3287 Joined: September 30, 2016 |
Is the BT speed in Artisan the same as for usb ? |
|
|
zamunda |
Posted on 08/21/2021 7:14 AM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Hello Renatoa, Thanks for your reply. The image shows the working MODBUS configuration per USB...the HC-06 has a 9600 baudrate per default so I set this with an AT-command to 19200 as well and parity set to "N". The modbus configuration error does not show up immediately, it takes about 5-6 seconds....
zamunda attached the following image:
Edited by zamunda on 08/21/2021 8:00 AM |
|
|
renatoa |
Posted on 08/21/2021 8:22 AM
|
![]() Administrator ![]() Posts: 3287 Joined: September 30, 2016 |
There is a serial log dialog in Artisan Help menu, please ca you check there if the information that travels is properly decoded and looks understandable ? If you see graphical chars without any meaning, this usually means baud rate mismatch. |
|
|
zamunda |
Posted on 08/21/2021 8:44 AM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Hello Renatoa, It says this: version = 2.4.4 4 15:44:13.077 MODBUS readSingleRegister : /dev/tty.ZamundaRoasterBT-DevB,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx = None 3 15:44:04.074 MODBUS readSingleRegister : /dev/tty.ZamundaRoasterBT-DevB,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx = None 2 15:43:55.077 MODBUS readSingleRegister : /dev/tty.ZamundaRoasterBT-DevB,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx = None 1 15:43:46.077 MODBUS readSingleRegister : /dev/tty.ZamundaRoasterBT-DevB,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx = None |
|
|
renatoa |
Posted on 08/21/2021 11:54 AM
|
![]() Administrator ![]() Posts: 3287 Joined: September 30, 2016 |
And the same dialog for modbus over usb connection ? |
|
|
zamunda |
Posted on 08/21/2021 12:10 PM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Quote No, RX is not empty, it says: version = 2.4.4 81 19:09:51.014 MODBUS readSingleRegister : /dev/tty.usbserial-FD130,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx = 2200 80 19:09:51.014 MODBUS readActiveRegisters : /dev/tty.usbserial-FD130,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx# = 1 results 79 19:09:51.014 cache reading : Slave = 1 || Register = 2 || Rx = 2200 78 19:09:48.015 MODBUS readSingleRegister : /dev/tty.usbserial-FD130,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx = 2200 77 19:09:48.015 MODBUS readActiveRegisters : /dev/tty.usbserial-FD130,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx# = 1 results 76 19:09:48.015 cache reading : Slave = 1 || Register = 2 || Rx = 2200 75 19:09:45.017 MODBUS readSingleRegister : /dev/tty.usbserial-FD130,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx = 2200
zamunda attached the following image:
|
|
|
zamunda |
Posted on 08/23/2021 4:06 AM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Quote zamunda wrote: Quote No, RX is not empty, it says: version = 2.4.4 81 19:09:51.014 MODBUS readSingleRegister : /dev/tty.usbserial-FD130,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx = 2200 80 19:09:51.014 MODBUS readActiveRegisters : /dev/tty.usbserial-FD130,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx# = 1 results 79 19:09:51.014 cache reading : Slave = 1 || Register = 2 || Rx = 2200 78 19:09:48.015 MODBUS readSingleRegister : /dev/tty.usbserial-FD130,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx = 2200 77 19:09:48.015 MODBUS readActiveRegisters : /dev/tty.usbserial-FD130,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx# = 1 results 76 19:09:48.015 cache reading : Slave = 1 || Register = 2 || Rx = 2200 75 19:09:45.017 MODBUS readSingleRegister : /dev/tty.usbserial-FD130,19200,8,N,1,2.0 || Slave = 1 || Register = 2 || Code = 3 || Rx = 2200 What is/does "RX" here? So what I understand via USB temp value is passed over RX, per BT it does not pass anything. Any ideas? Thanks! |
|
|
renatoa |
Posted on 08/23/2021 6:00 AM
|
![]() Administrator ![]() Posts: 3287 Joined: September 30, 2016 |
An error occured during modbus reading or decoding. Check modbusport.py, in 2.4.x src\artisanlib folder |
|
|
zamunda |
Posted on 08/24/2021 8:42 AM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Quote renatoa wrote: An error occured during modbus reading or decoding. Check modbusport.py, in 2.4.x src\artisanlib folder Thanks for your reply. I am on Mac OS x and can't find such a folder. I am a bit lost: I tried several configs also this from: https://www.home-barista.com/roasting/getting-artisan-to-talk-to-arduino-t58234-20.html Behaviour is the same for all of them, over USB, temp is read and passed to Artisan, no problem, once connected over BT, I get the Modbus error, that is, RX = none. I am quite sure the BT is ok, did several tests via basic scripts and I can communicate over BT from the module to me laptop. Is there another point I am missing here maybe? Over BT I power Arduino via USB to an iPhone adapter (5V, 1A). Could that be critical? Should I power Arduino by the dedicated power inlet and not over USB? Any other suggestions are welcome! Thanks |
|
|
zamunda |
Posted on 08/25/2021 12:25 PM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Hello, Finally, I achieved to connect over Modbus/Bluetooth, I had to change the sketch by assigning PINs to RX/TX other than the dedicated PINs on the Arduino and use SoftwareSerial. The following sketch worked for me: Code Download source
|
|
|
zamunda |
Posted on 09/10/2021 9:45 AM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Hello, Based on the sketch above, I did some roasting with batches of 100gram. I think the result comes out quite nice, from Artisan I can control heat and air conveniently. I mounted the roaster on a wooden box which I can open later to check wirings etc. Bluetooth also works well. Also built a simple chaff collector which sits on top of the roaster which can be emptied from time to time. BTW: I disabled the "slew-function" withing the sketch for now since this "messed up" de loop-functionality within Arduino. So far, I did not experience overload problems (which was something this function should help to prevent) Obviously there is much room for improvement but this was/is an (exciting) learning-by-doing-and-falling process. Hardware used in this build: - Princess Popcorn popper (1200W/220V) - MAX6675 sensor for temp readings - Arduino UNO (3) - (Manual) DC voltage adapter for fan - L298N DC-Motor Controller for slider-controlling the fan from Artisan - Solid state relay for controlling the heat element - Bluetooth module HC06 for wireless connection from Artisan to roaster - DC-adapter iPhone for Arduino Big thanks to everyone on this forum, if you have any questions/suggestions, please let me know. Quote zamunda wrote: Hello, Finally, I achieved to connect over Modbus/Bluetooth, I had to change the sketch by assigning PINs to RX/TX other than the dedicated PINs on the Arduino and use SoftwareSerial. The following sketch worked for me: Code Download source
zamunda attached the following images:
Edited by zamunda on 09/10/2021 10:26 AM |
|
|
renatoa |
Posted on 09/10/2021 12:58 PM
|
![]() Administrator ![]() Posts: 3287 Joined: September 30, 2016 |
Congrats ! Actually, the slew feature can be implemented human side, being careful to not move the Artisan slider in big steps. All you have to do is to refrain handling the fan slider with the mouse, is the only way to jump from 0 to 100% in a single step. With the keyboard, and up/down keys, the slider steps in small increments, even finer than the slew step from software solution. With a bit of discipline, it could become a habit. |
|
|
zamunda |
Posted on 09/11/2021 2:19 AM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Hello Renatoa, Thanks for your reply and tip on using the keyboard, wasn't aware of this, tried it and is indeed very handy! Another potential risk with modded popcorn machines is that if you leave the heater on for some reason without running the fan, after 5-10 seconds the coil burns the fan housing or worse. This happened to me once and I guess I am not the only one ![]() Is there a way to prevent this? I thought of adding a condition in the void loop: "if value from fan slider >50 { start heater } else { ... }" But I do not know whether this is good practice? Or are there other common solutions (besides from paying attention while roasting)? Regards! Edited by zamunda on 09/11/2021 10:38 AM |
|
|
renatoa |
Posted on 09/11/2021 11:58 AM
|
![]() Administrator ![]() Posts: 3287 Joined: September 30, 2016 |
Yep, this is the logic in TC4 too... For any attempt to change heater level, the check below: Code Download source if (FAN_DUTY < HTR_CUTOFF_FAN_VAL) { And reciprocal, when fan change attempt... Code Download source if( pac_level < HTR_CUTOFF_FAN_VAL ) { // if new levelOT2 < cutoff value then turn off OT1 |
|
|
zamunda |
Posted on 09/12/2021 9:01 AM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Hello Renatoa, Thank you for this snippet, I rewrote my sketch like this based on that: Code Download source // Define minimal airflow setting Does this make sense? Within TC, there is a var "FAN_DUTY" which holds the ACTUAL value of the fan, however, within my project, I do not know whether/how this value is stored or can be obtained from Artisan. I only know of the DESIRED value which is "au16data[5]". Am I right here? Thanks! |
|
|
renatoa |
Posted on 09/13/2021 2:11 PM
|
![]() Administrator ![]() Posts: 3287 Joined: September 30, 2016 |
Why are you operating changes on fan before the modbus poll and not after ? This way you introduce one second delay between the slider change and fan speed change... without any benefit I can detect. |
|
|
miyankizu |
Posted on 09/27/2021 8:19 AM
|
![]() Newbie ![]() Posts: 10 Joined: August 10, 2021 |
Quote zamunda wrote: Hello, Based on the sketch above, I did some roasting with batches of 100gram. I think the result comes out quite nice, from Artisan I can control heat and air conveniently. I mounted the roaster on a wooden box which I can open later to check wirings etc. Bluetooth also works well. Also built a simple chaff collector which sits on top of the roaster which can be emptied from time to time. BTW: I disabled the "slew-function" withing the sketch for now since this "messed up" de loop-functionality within Arduino. So far, I did not experience overload problems (which was something this function should help to prevent) Obviously there is much room for improvement but this was/is an (exciting) learning-by-doing-and-falling process. Hardware used in this build: - Princess Popcorn popper (1200W/220V) - MAX6675 sensor for temp readings - Arduino UNO (3) - (Manual) DC voltage adapter for fan - L298N DC-Motor Controller for slider-controlling the fan from Artisan - Solid state relay for controlling the heat element - Bluetooth module HC06 for wireless connection from Artisan to roaster - DC-adapter iPhone for Arduino Big thanks to everyone on this forum, if you have any questions/suggestions, please let me know. Quote zamunda wrote: Hello, Finally, I achieved to connect over Modbus/Bluetooth, I had to change the sketch by assigning PINs to RX/TX other than the dedicated PINs on the Arduino and use SoftwareSerial. The following sketch worked for me: Code Download source
hello zamunda , renatoa I appriciate for your effort. I also try to apply for solutions to my system. Also I have get modbus connection problem. when I check connection baudrate for HC-06 it has written as 9600 and I am not able to change it. I tried another solution to change baudrate in skecth as "9600" instead of "19200". Do you have any solution for it ?
miyankizu attached the following image:
|
|
|
zamunda |
Posted on 09/27/2021 8:36 AM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Hello, I just recently how to work with Arduino and how to change baudrates of the HC-06 so I am not that experienced but this video helped me a lot In short, you have to connect the RX and TX-pins of the HC-06 to the TX and RX-pin of the Arduino. Then go to the serial monitor of the IDE and send fe the command 'AT'...it should respond with 'OK' If you do not get a response you have to tweak settings: - set baudrate of serial monitor to '9600' if you have not changed initital rate of HC-06 - set "No line ending" in the serial monitor as well - interchange RX and TX connection cables from HC-06 to Arduino and try again... Once you get an 'OK' you can change baudrate with command 'AT+BAUD5' if I recall well. As said, the mentioned video was very helpfull for me. Hope this helps! Regards |
|
|
miyankizu |
Posted on 09/27/2021 9:23 AM
|
![]() Newbie ![]() Posts: 10 Joined: August 10, 2021 |
Quote zamunda wrote: Hello, I just recently how to work with Arduino and how to change baudrates of the HC-06 so I am not that experienced but this video helped me a lot In short, you have to connect the RX and TX-pins of the HC-06 to the TX and RX-pin of the Arduino. Then go to the serial monitor of the IDE and send fe the command 'AT'...it should respond with 'OK' If you do not get a response you have to tweak settings: - set baudrate of serial monitor to '9600' if you have not changed initital rate of HC-06 - set "No line ending" in the serial monitor as well - interchange RX and TX connection cables from HC-06 to Arduino and try again... Once you get an 'OK' you can change baudrate with command 'AT+BAUD5' if I recall well. As said, the mentioned video was very helpfull for me. Hope this helps! Regards thank you very much , I will check and if I found which works for me , I will update this topic |
|
|
miyankizu |
Posted on 09/27/2021 9:26 AM
|
![]() Newbie ![]() Posts: 10 Joined: August 10, 2021 |
Updated info : I changed my skecth again 19200 to 9600 and make same updates on MODBUS connection also in Artisan. And changed jumper cables in case of any problem. Now it works it reads values well. I haven't test it with popper , till now it goes good. Thanks to zamunda and renatoa ![]() |
|
|
zamunda |
Posted on 10/06/2021 12:34 PM
|
![]() 1/4 Pounder ![]() Posts: 176 Joined: November 17, 2020 |
Hello, Showing some results from Artisan.... I roasted 80grs and 100 grs today playing with Air and Heater...works quite well technically I think...Normally I start with full air and 80% heat and after 3-4 minutes I lower the air a bit and increase some heat. Depending on ambiente temperature, I get first crack at 6-8 minutes, then leave the beans a minute after FC and finally cool them down in the roaster, cooling down to 30-40 degrees goes quite fast (< 1min). Happy with the result so far...Any comments are highly appreciated! Did a quick test with PID control but got quite confused with so many parameters to set, in fact, do not know how to start there... The settings shown in the image copied them from another project without really understanding how it works ![]() Could some of you help me a bit in explaining the basic concept of PID-control? Thanks!
zamunda attached the following images:
Edited by zamunda on 10/06/2021 12:42 PM |
|
|
miyankizu |
Posted on 10/07/2021 1:46 AM
|
![]() Newbie ![]() Posts: 10 Joined: August 10, 2021 |
It is nice to hear that well done ![]() By the way I built up your system. I can read temperature , but I'm not able to give a control from Artisan. I'm not sure that I can send the data to L298N from Arduino. Can you please share your circuit connection. I try to make my connections over your sketch and picture as I can see ![]() Here is my circuit. Quote zamunda wrote: Hello, Showing some results from Artisan.... I roasted 80grs and 100 grs today playing with Air and Heater...works quite well technically I think...Normally I start with full air and 80% heat and after 3-4 minutes I lower the air a bit and increase some heat. Depending on ambiente temperature, I get first crack at 6-8 minutes, then leave the beans a minute after FC and finally cool them down in the roaster, cooling down to 30-40 degrees goes quite fast (< 1min). Happy with the result so far...Any comments are highly appreciated! Did a quick test with PID control but got quite confused with so many parameters to set, in fact, do not know how to start there... The settings shown in the image copied them from another project without really understanding how it works ![]() Could some of you help me a bit in explaining the basic concept of PID-control? Thanks!
miyankizu attached the following images:
|
|
Jump to Forum: |