Footswitch from scratch with ESP32/micropython

Hi,
I have bought this module in order to try to easily communicate with the dwarf throug Control Chain protocol with an ESP32 running micropython. Turns out it’s not that easy ! :sweat_smile:

I have identified from looking at the electronics schematics of the mod shield that even if I succeed in receiving data, I might not be able to send any. But that will be another part of the story.

At lease I’d like to understand wether I have chance to progress on reading the first bytes of the CC protocol.

So far I’ve managed to get something, but I’m expecting some A7 byte to come and here is what I have:

FF
FF
DB
FF
FB
FF FB
FD
FB
FF
B7 FF
FF FD FF FD B7
B7
FF FF FD FF FD B7
B7 FF
FF FD FF FD B7
B7
FF FF FD FF FD B7
B7
FF FF FD FF FD B7
B7 FF
FF FD FF FD B7
B7 FF
FF FD FF FD B7
B7

I’m using baudrate=115200, is it expected value ?
I’ve connected module A+ to RX+ (RJ45 pin 1) and B- to RX- (RJ45 pin 2).
I’ve tried various other configuration but this is the only one that gives consistent result which kind of looks like a sequence but not the expected.

Would anyone have any insight ?

Regards.
Nicolas

Hey Nicolas,
That sounds like a cool project :slight_smile:
Have a few first questions for you:
1st: did you take a look at this page?
2nd: Wouldn’t it be easier to just build an Arduino shield? That should be just a few components

Hi Jon,
Thanks for your interest !

Well yes I looked at it, but I tried to rely more on the git projects around it. I may overlooked it, I’ll dig again more seriously.

However on the baudrate especially there is a disagreement between both. Arduino code seem to use 115200 when wiki page is stating 1Mbps.

For now this is my main concern because having a doubt on that can reduce all investigations to random technical wandering.

Fallbacking on original architecture is indeed a possible direction. The choices I’ve made so far are motivated by:

  • Avoid “complex” circuit building, especially with surface mount component like the ISL83491.
  • Program in micropython because I don’t fancy the arduino ecosystem. I’d like to benefit from the OOP capabilities and much prefer python over C for prototyping.

Using the joy-it module is a way to simplify the electronic part, reducing all efforts to simple wiring. But I might have overlooked the possibility of simply using the kicad material and order the exact same transciever circuit as the arduino project on some electronic PCB website ?

I might consider keeping arduino just for handling CC communication and handle all functionnal par with ESP32/micropython, communicating with arduino through UART…

For context I have to say that although I do have some electronic background and general knowledge (mainly from school) I’m more a programmer in my professional experience. Hence this post, as I might have missed something in the implementation.

Thanks in advance for advices and external feelings about that :slight_smile:
Regards
Nicolas

1 Like