Arduino Shields

I have recently had some Arduino shield PCBs fabb’ed and ordered the parts for them. I ordered enough for 5 and I am going to keep two for myself so I will have a few left over that I would be interested in selling as DIY kits (solder them up yourself) or can assemble them for someone. Limited quantity available (well…exactly three) so if there is interest let me know and I can figure out what it might cost. Not looking to make money - just cover my costs.

Cheers,
Mark

1 Like

are these essentially a replica of only the PCB portion of the shield sold by MOD here?:

…is there some advantage to your PCB over the one from MOD (other than cost)?

No - it is identical. Actually, I didn’t even realize they sold them on their website - I assumed it was a hobby-ist thing. With the cost of the parts and shipping, it’ll probably be about the same (except my PCBs are black).

I am cool to not sell my extra pieces if that offends anyone. I only undertook this as a hobby project. Probably would have been easier to just buy them online! :wink:

1 Like

oh, no offense at all… didn’t mean to imply that! :slight_smile: it’s totally great that folks are developing things around the MOD on their own!

but was just thinking, as you, that by the time i source parts and do the build, it’s not really worth it vs. buying the one from MOD. :wink:

Yeah, I guess it is a wash. I intend to build my own custom footswitch as a project. Can’t wait to assemble these and get coding!

3 Likes

nice! i’ve been thinking about various controllers for a while now… just been too busy to get into implementation, but the the shield i do have is sitting over there on my workbench, beckoning!..

please share pictures and code, as will i… we’re all interested in learning from each other!

1 Like

Will do!

3 Likes

Very good :smiley:
I would be very interested to some code, and things you are doing, to get inspired !

thanks in advance

Arduino is very powerful. I work with them often at my company. We use them for scientific equipment, manufacturing, etc.
For inspiration, take a look at all the sensors that are available. There’s a lot of other cool stuff too. For instance, not long ago I saw RGB lit rotary encoders, which work with i2c (the two-wire bus format).
My plan is to eventually make an 8 encoder panel to control the DUO, plus other things, like Bitwig. For the DUO it would be perfect for dialing in tones. I could use the center-press buttons on the encoders too. It’d be sweet; I don’t quite have the time lately. Though, it’d be a fun project for anyone really.

2 Likes

nice… i’ve been looking into i2c, and also some multichannel A/D converters to increase the number of possible encoders on one arduino uno.

1 Like

i2c is great. I know I’ve seen multichannel A/D that work over i2c.
Btw, here’s the RGB lit, i2c encoder I mentioned: https://www.tindie.com/products/saimon/i2cencoder-v21-connect-rotary-encoder-on-i2c-bus/
They’re costly, but it could be a killer addition for a controller project where visual feedback is desired, as the RGB diode is addressable as well. In fact, there’s a bunch of awesome features about it, including it’s own MCU, GPIO and EEPROM … powerful.

1 Like

Well, first hurdle complete! The board is soldered up and working. It took some balls to just plug it into my DuoX but…it works! At least the power routing and LED. I’m not using an Arduino so it’ll take me some coding to integrate the control chain driver and test that part of it out. Maybe over the holidays.
Google Photos

3 Likes

beauty… way to go, dude! :love_you_gesture:

Hey Guys! So I have made some progress… Long story, but I decided from the start I wanted to build my project using micropython. Initially I tried to integrate the control chain C library (which is really well written, BTW!) directly and access it from Python. I had this working with a custom build of micropython to properly integrate it, but after struggling (with micropython) trying to break it out into a separate loadable module I decided to just port the whole thing to pure micropython. The result (so far, as it is not complete) is available on Github.

But after a few late nights, handshaking is working and it shows up in the UI!

device

switches

Now to get assignments and updates working! :slight_smile:

For now this is running on an STM32 development board, but eventually this could easily be run on any of the many Adafruit boards that support micropython with an appropriate shield to add the RS485 circuitry and ethernet jacks.

I’ll keep you posted on my progress.

Cheers,
Mark.

11 Likes

Beautiful; congrats on your achievement! I work with Python, too and this certainly lowers the threshold for trying to work with the hardware. Cheers!

2 Likes

Hey Everyone,

An update on this… I only get big blocks of time to work on hobbies over the Christmas holidays, it seems. :slight_smile:

I have finally finished my footswitch and boxed it up in a semi-rugged case. I got a surplus Blackstar footswitch at my local music shop, gutted it and shoe-horned an Arduino shield-based system into it. I also managed to finish the implementation of the Python-based footswitch firmware adding indicators in addition to the four pushbuttons. The result is featured in this short demo video (sorry for the poor smartphone video quality):

You can find all of the code on GitHub here:

I have a small amount of cleanup left and more polishing on the docs, but it all works great.

So why did I do this as opposed to just using the C library with an Arduino sketch? Well, I thought it would be an interesting challenge. I also thought it would be interesting (if it seemed to work well) to open the door to other platforms like the plethora of Adafruit boards running CircuitPython (a variant of micropython). It seems this is indeed possible.

So what’s next? Well, the improvements I can see as next steps are:

  • Some code cleanup and doc improvements to get it working on other boards.

  • Check in a schematic of my wiring into the GitHub repository.

  • Update the code to use the latest changes to the control chain protocol from the past year that add support for tap tempo and multi-color LEDs

  • Just use the C version of the control chain protocol. This will be faster and more maintainable, but the main issue is getting it compiled/integrated into the micropython/CircuitPython build. The last time I tried I had to modify the core (to hook up the timer), but I needed to do that anyway to enable threads so maybe that is the best approach after all?

I also would like to design/build a smaller Adafruit Feather or even a Teensy shield that has the control chain circuitry on it so I can make this on a much smaller shield that fits on more modern Adafruit form-factors that support CircuitPython, or the uber-powerful Teensy 4.x. I think this would be the next logical step in terms of hardware to open the door to much more hacking. Maybe next Christmas? :wink:

Anyway, this was super-fun and I am happy to answer any questions or support anyone who wants to tinker with it! In the meantime, I am going to start playing with the various looper plugins now that I have footswitches to play with!

Cheers,
Mark

11 Likes

Thanks, @mark_melvin! I browsed your code and found it very readable and easy to understand. Nice!

The whole flashing and executing on a micro controller process seems rather involved. I will certainly try to make use of your efforts when time permits but probably run it on a Raspberry Pi Zero. Do you see any reason why this would not work?

@eggsperde - yeah the initial flash is a little involved, but the beauty is you just upload/flash your main Python file (main.py) once you have initially flashed.

It should work on a Raspberry Pi since the unix port of micropython runs on that. I don’t have a Raspberry Pi but may be able to pick one up to help get it working if you need some help. The setup will be a bit different (no flashing required - just build the micropython executable and use that to run your main script) but you’ll need to follow a guide to build micropython.

Just from looking at the imports in your code, there are no unusual requirements and I’d probably try to make it run with CPython. This seems feasible, considering the differences between cPy and uPy. Then again, in software development, optimism is rarely a good thing :slight_smile:

1 Like

Yeah, unfortunately it isn’t quite so simple. The problem will be the use of a few micropython specifics - in particular:

  • time.ticks_ms and time.ticks_diff (which can easily be implemented in pure Python)
  • the micropython-specific timer, UART and digital I/Os
  • the use of micropython.schedule

Honestly, it is probably easier to just compile micropython on your Pi and use the code as-is (although you’ll still need to update it to select your specific digital I/Os). See these instructions:

https://www.raspberrypi.org/forums/viewtopic.php?t=191744
(You don’t need to install micropython-lib)

However - I just tried this on WSL and it turns out the unix port doesn’t have the Timer, uart or digital I/Os either. Looks like this will require some additional hacking to make this work with a Raspberry Pi… :frowning:

Mark.

1 Like