Thread subject: Homeroasters - Home Roasting Coffee Community :: SOLVED: Artisan says: "Arduino could not set channels"

Posted by mtwenzel on 01/22/2021 3:59 PM
#1

... which is an exception raised in ARDUINOTC4Temperature().

I have set things up according to the excellent video tutorial posted by greencardigan in another post, and I'm puzzled about the source of the error.

It much looks like a Bluetooth problem. Through USB, the sensors work, also the control of heater and fan. Through Bluetooth, however, the above error occurs. Looking into the Artisan code, it seems to me as if the physical connection must have been successfully established (the exception only occurs in a block conditional on self.SP.isOpen() ), but the response to the channel isn't right.

Then, I tried if I can connect to the serial port from the Arduino IDE, but it does not work. Lastly, I tried if I can upload the sketch anew (onto a spare Arduino I plugged in for this purpose), and again, the transfer starts, but then it throws a bunch of errors indicating a lacking synchronisation with the Arduino.

Can this be a wrongly configured Bluetooth module? It came preconfigured with my order of the TC4+ shield including an Arduino board pre-loaded with the aArtisan sketch.

I'd love to hear opinions, advice, and perhaps solutions to this thing!
Cheers, Markus

Edited by mtwenzel on 01/30/2021 4:17 AM

Posted by mg512 on 01/23/2021 4:00 AM
#2

If it's working via USB, then the Arduino sketch should be OK.

The first thing to check is if the jumpers on the TC4+ are set correctly. Near the top left corner of the board (near the BT module header) there is a 2x3 set of pins with two jumpers on them, and labeled BT_SEL. The two jumpers should be horizontal and on the left two pins of each row, like in the picture attached. If they aren't, put them there, and see if it works?

It is also possible that the bluetooth module is misconfigured, though unlikely. Are you able to pair with it at all, and does it accept the PIN you got in your shipping confirmation?

Posted by renatoa on 01/23/2021 4:21 AM
#3

Another reason could be that your BT adapter is BLE, not old style serial BT.
They work completely different...
HC06, MLT-BT05, CC41-A, HM-10, for example, are BLE.

Posted by mtwenzel on 01/23/2021 5:36 AM
#4

Firstly thanks for the very speedy replies!

So, let me try to get this in order.
* The BT module has only one text item on it that reveals its origin: www.hc01.com This is all Chinese, and more trouble to translate than I'm willing to invest. So I can't tell from the chip alone if it is BLE or old-style.
* I ordered the TC4+, the Arduino, and the BT module in "preconfigured" version through Tindie, so I was expecting that jumpers etc. are set correctly. Mine are set differently from the mg512 image: they are vertical and to the right of the 3x2 pins. See image...
* Also, the BT module has six pins, but the TC4+ header only five slots. See attached image for how I attached it. I tried to replicate this from the pictures in the Instructables post (https://www.instructables.com/Arduino-controlled-DIY-Coffee-Roaster/).

Both Windows and Mac physically connect to the module and ask for the Pin Code. The module shows up as "connected" thereafter, and as written, even Artisan apparently can open the serial port, only can't issue the commands.

I'd next try and set the pin headers differently, if you think this might be it. Actually, after reading the TC4 BT guide (https://coffee.gerstgrasser.net/assets/TC4plus_Bluetooth_configuration.pdf) it appears to me that they accidentally have been left in the IO4 IO5 mode from programming the module. Is this possibly an explanation?

Edited by mtwenzel on 01/23/2021 5:58 AM

Posted by renatoa on 01/23/2021 5:53 AM
#5

Unfortunately, it's a HM-10 BLE. Check below if ID'ed it correctly, the 8th in the "suspects lineup" Grin picture

http://www.martyn...h-modules/

You have two choices:
- replace with a BT 2.0 old style, now you know what to buy, from the article above, or
- buy a BLE USB dongle for your laptop

Edited by renatoa on 01/23/2021 5:59 AM

Posted by mtwenzel on 01/23/2021 6:11 AM
#6

Interesting. The details close to the pins are markedly different, but nevertheless the resemblance is striking.

I followed my suspicion that the jumpers might have been left in programming mode and moved them to the 'serial position' as directly suggested in the first reply. And it works (on MacOSX, anyways).

So I guess I can close this thread with a big thank you!

Posted by renatoa on 01/23/2021 9:04 AM
#7

Mac mini and MacBook Air were both updated with Bluetooth 4.0, i.e. BLE, so you are lucky, no more dongle needed :)

Posted by mg512 on 01/23/2021 5:37 PM
#8

Quote

renatoa wrote:

Unfortunately, it's a HM-10 BLE. Check below if ID'ed it correctly, the 8th in the "suspects lineup" Grin picture



It's a HC-05. Scroll down to the actual HC-05 and HM-10 subsections and the photos there and you'll see.

And, important for anyone reading this: Even if your laptop supported BLE (Bluetooth Low Energy, aka Bluetooth 4.0), you cannot use a BLE module instead of the HC-05 / HC-06. BLE/BT4.0 works differently from regular Bluetooth, and doesn't work as a serial port which you need here. Do not buy BLE modules for this.


Quote

mtwenzel wrote:

Interesting. The details close to the pins are markedly different, but nevertheless the resemblance is striking.

I followed my suspicion that the jumpers might have been left in programming mode and moved them to the 'serial position' as directly suggested in the first reply. And it works (on MacOSX, anyways).

So I guess I can close this thread with a big thank you!


Happy to hear it's solved!

Posted by renatoa on 01/24/2021 2:14 AM
#9

Boomer... checked the lineup picture only and wrong assumed they are in the same order as list below...