Arduino/Artemis + Wav Trigger based Drum machine - several questions regarding power and connectivity

Dear all!

I already spent a lot of time reading several topics in this forum. I am currently planning a Sample-based drum machine project around the SparkFun Tsnuami Wav Trigger and a Arduino-IDE compatible board (originally the UNO-based Redboard Plus but due to pin and memory constraints I'll switch to the SparkFun Artemis ATP which is based on the Ambiq Apollo3 Blue and in a Arduino MEGA footprint). Overall this drum machine is very much inspired by old rhythm drum machines like the Korg Minipops(Korg Mini Pops - Wikipedia) or Elka Drummer One. A short description of the project is below, before I come to the specific questions that I have come across:

Main center is the Super WavTrigger, which will be loaded up with 5 to 6 drum kits consisting of up to 12 sounds/tracks each (corresponding to different drum sounds like bass drum, snare drum etc.). The WavTrigger will be connected via I2C/Qwiic to the Artemis ATP board and communicate via the provided SparkFun library.

The sounds will be selected using a rotary encoder hooked up the the Artemis ATP and displayed on a I2C-connected OLED display, resulting in a trigger bank up/down signal to the Wav Trigger using the SparkFun-provided library.

12x 10K lin potentiometers control each track's volume and will be connected via a CD74HC4067 analog multiplexer to the Artemis ATP board.
2 additional potentiometers will control master volume and speed of the sequence and just be connected to Analog In pins of the Artemis ATP.
12 indicator LEDs for each track will indicate if that certain sound (like Bass drum, snare etc.) exists in the selected drum kit. I plan on using a TLC5940 breakout board for these 12 LEDs.
1 indicator dual color LED will show blink up according to the set speed and also be connected to the TLC5940.

There will be 16 flip switches for selection of pre-programmed rhythms - these I plan to connect to either the Artemis ATP digital pins directly or to a SX1509 16 GPIO i/o expander communicating via I2C with the Artemis board (the SX1509 will only be used for active low switches and not provide any currents per pin). The pre-programmed rhythms are stored in multidimensional int or bool arrays of size [16][12] (12 columns, each corresponding to a sound and 16 rows corresponding to each step in a sequence - this is the reason I want to use the Artemis ATP with its 384k ram since I'll have 16 of those besides all the other code and libraries which will not fit on the 2k ram of the UNO) . The pins and rhythms will be organized in a C struct.

There are several aspects that I'm currently puzzled about, which I'll try to explain in the following:

I plan with a single 9V 3A Wall Wart PSU with a power switch. This will connect via a barrel jack adaptor to the Artemis ATP which wants a 7-15V input and uses its own LM117 regulator to step it down to 3.3V - the CD74HC4067, SX1509 (should all use less than 1mA) and OLED display (25mA) will draw power from the Artemis board since they'll require little current. The Artemis ATP requires roughly 20mA in idle. The volume pots I plan to hook up to the 3.3V of the Artemis ATP board (in total they'd draw roughly 3mA). So all periphery would be less than 30 mA.

In addition, the power supply will be connected to an additional step down converter with 5V USB output to connect the Wav Trigger board to via its USB-C port (the preferred way of powering it). The Wav Trigger does not draw current from the Artemis ATP via the I2C connector and requires roughly 260mA. So far so good.

I am a bit lost regarding how to connect the SparkFun TLC5940 break out board both in terms of power and pins. I have 13 LEDs with 3.0-3.4V voltage range and 20mA current draw (I don't need to run them with full brightness though). The breakout board has a 2.2k resistor for Iref to limit current draw to 17.8 mA per channel which should be sufficient for my LEDs. So total power requirement would be 12x 17.8 mA = ~232 mA if using the TLC5940 in power draw mode (connecting LEDs to GND and the channel input). I am unsure if I should use a 2nd step down converter to convert the 9V PSU to 3.3V (so it can safely communicate with the Artemis ATP board that uses 3.3V logic level) and connect that to the 3.3V rails of the TLC5940 break out so I have plenty of current supplied by the PSU directly or, since the LEDs shouldn't draw more than 233mA, just connect the 3.3V rail to the Artemis ATP 3.3V and use the TLC 5940 in power sink mode (connecting LEDs to 3.3V and channel input)?

An additional question regarding the TLC5940 I have is regarding which pins to use. Using a regular Arduino UNO, the TLC5940 BLANK, XLAT and GSCLK+ are connected to OC1B, OC1A and OC2B clock compare pins, respectively. However, I can't find any corresponding OC1B, OC1A or OC2B pins on the pin mapping of the Apollo3 board - do I need to use one of the CLKOUT pads? Or any of the CT ones? Or can I use any PWM capable digital pin and have operate at a certain frequency?

Thank you for any input and I am happy to elaborate if more details are needed.

The OC2 are not pins but internal registers in the ATmega328 chip inside the Arduino Uno and classic Nano. They control the way the timers work. There is no equivalent in the Apollo3 in that page you posted. You need to get the Data Sheet of what ever processor is in that board and see how the timer counters work.

Sounds OK

1 Like

Thank you Grumpy_Mike! I wasn't aware of the OC2 being internal registers, thank you for clearing that up! The Artemis ATP board uses a Ambiq Apollo3 with ARM Cortex M4F. I think for my case it'll be much easier to use another SX1509 to toggle the LEDs. It can sink 15mA so I hope I should be fine using appropriate resistors to reduce the current to a good level (especially since I dont need them to be very bright), which should be in the range of what the board can provide itself (if not I'll use the second step down converter to power it). The Artemis ATP has 6 I2C/SPI buses so I hope I can control the Wav Trigger, 2x SX1509 and a I2C OLED without running into many problems with each of them having their own pull-up resistors already on the breakout board.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.