Page 1 of 4

New ARM based MegaDrum.

PostPosted: Tue Dec 04, 2012 8:50 pm
by dmitri
From today, 4th December, I introduce a new MegaDrum hardware version. It is STM32F103RCT6 (Cortex M3 ARM) based running at 72MHz with built-in USB support.

For now the main advantage of the new version is a reduced by around 2ms latency over USB thanks to elimination of an intermediate USB chip.

To assure all MegaDrum owners I have to state:
1. I will continue to support Atmega644 and Atmega1284 based MegaDrum hardware and release new Atmega644/1284 firmware versions for any foreseeable future.
2. I will continue to offer Atmega1284 based modules/kits (if they remain in demand) along with ARM based kits/modules with a small price difference between them.
3. Everyone, who ordered Atmega based kits/modules in the past, will get a 15% discount when ordering ARM based kits/modules.

This is the view of the top and the bottom of the ARM based board:
stm32_back_2.jpg

stm32_5.jpg


This is the view of STM32F103RCT6 on the board:
stm32_chip.jpg


The ARM based board is slightly smaller then the Atmega based board, see the comparison:
stm32_vs_atmega_1.jpg


And these are the test results showing the difference in latency between ARM and Atmega based hardware. The test was done on a MacBook Pro with Intel Core i7 and built-in Audio running GarageBand. Both ARM and Atmega boards were configured with 1ms Latency (10) and 1ms MinScan (10) on an input. The latency was measured between the signal on the pads output and the signal on the headphone output.
These are minimal and maximum latency on the ARM board:
stm32_6ms_800_2.png

stm32_8ms_800_1.png


These are minimal and maximum latency on the Atmega board:
atmega_8ms_800_1.png

atmega_10ms_800_1.png


As you can see the total latency (MegaDrum internal latency + USB latency + Audio latency) with the ARM board varies between ~6ms and ~8ms.
The total latency with the Atmega board varies between ~8ms and ~10ms. The difference between the boards is 2ms on average.

Just to show the MegaDrum's internal latency I measured the latency between the signal on the pads output and the moment data is sent over USB (MIDI LED pin signal goes down):
stm32_led_800_1.png

stm32_led_800_2.png

As you can see the MegaDrum's internal latency varies between 1.2ms and 1.8ms.

Re: New ARM based MegaDrum.

PostPosted: Tue Dec 04, 2012 9:03 pm
by chrishopf
Hi Dmitri,
good work!!! This is a very modern micro you are using! At my job de are also using much derivates of this stm32 family.
Is the pinning of the connectors compatible to the atmega-board?
How about the features of the firmware, same as for the atmega?

With respect to your work
Christian

Re: New ARM based MegaDrum.

PostPosted: Tue Dec 04, 2012 9:07 pm
by everson
dmitri,
Are there any particular reasons why you switched to ARM?

Re: New ARM based MegaDrum.

PostPosted: Tue Dec 04, 2012 9:08 pm
by dmitri
chrishopf wrote:Hi Dmitri,
good work!!! This is a very modern micro you are using! At my job de are also using much derivates of this stm32 family.
Is the pinning of the connectors compatible to the atmega-board?

No.

How about the features of the firmware, same as for the atmega?

Same as Atmega for now but ARM gives me more freedom for adding new features mostly due to larger RAM.

Re: New ARM based MegaDrum.

PostPosted: Tue Dec 04, 2012 9:13 pm
by dmitri
everson wrote:dmitri,
Are there any particular reasons why you switched to ARM?

The main reason is a reduced latency over USB thanks to elimination of an intermediate USB chip. I've been told several times that even 2ms latency reduction can make a difference for some.

Re: New ARM based MegaDrum.

PostPosted: Tue Dec 04, 2012 9:31 pm
by angr77
Dmitri...the X-mas continues!!

Very nice!! I am impressed by your progress!!

Anders

Re: New ARM based MegaDrum.

PostPosted: Tue Dec 04, 2012 10:51 pm
by Trommeltotti
dmitri wrote:The main reason is a reduced latency over USB thanks to elimination of an intermediate USB chip. I've been told several times that even 2ms latency reduction can make a difference for some.

dmitri wrote:As you can see the total latency (MegaDrum internal latency + USB latency + Audio latency) with the ARM board varies between ~6ms and ~8ms.

Audio latency? Did you use for measure a audio-interface with ASIO driver or for Mac with Core driver? If yes, which buffer size settings you use for this test?

So know with the new ARM hardware version without intermediate USB chip is the separate Midi Out port gone?
Is the new Positional Sensing addon board compatible with the new ARM Hardware?

with best regards Trommeltotti

Re: New ARM based MegaDrum.

PostPosted: Tue Dec 04, 2012 11:08 pm
by dmitri
Trommeltotti wrote:
dmitri wrote:The main reason is a reduced latency over USB thanks to elimination of an intermediate USB chip. I've been told several times that even 2ms latency reduction can make a difference for some.

dmitri wrote:As you can see the total latency (MegaDrum internal latency + USB latency + Audio latency) with the ARM board varies between ~6ms and ~8ms.

Audio latency? Did you use for measure a audio-interface with ASIO driver or for Mac with Core driver? If yes, which buffer size settings you use for this test?

Mac OS has built-in low latency Core Audio. I have no idea where to change buffer size settings on Mac so if there are any such settings I used defaults.

So know with the new ARM hardware version without intermediate USB chip is the separate Midi Out port gone?

Standard MIDI In/Out ports are still there on the board.

Is the new Positional Sensing addon board compatible with the new ARM Hardware?

Yes, it is.

Re: New ARM based MegaDrum.

PostPosted: Tue Dec 04, 2012 11:21 pm
by Trommeltotti
OK, nice to hear this I should buy this interesting stuff immediately. Next day's I send you a private massage.

dmitri wrote:I've been told several times that even 2ms latency reduction can make a difference for some.

Of course your are totally right! If you are using VSTi plug ins like Superior Drummer under real-time conditions your will fight for every millisecond less latency on your system! For example: ROLAND module gear will generate about 4-5ms seconds latency from Trigger input to Midi Out port already before it's passing computer components. Alesis Trigger I/O will generate internally around 6-7ms latency before a Midi event is passing computer components. That's to much time for real-time conditions. So thanks to @dmitri for probably better solutions in this case.

greats Trommeltotti

Re: New ARM based MegaDrum.

PostPosted: Wed Dec 05, 2012 12:37 pm
by chrishopf
Hi Dmitri,

regarding the connectors we perhaps misunderstood. Can I replace the ATmega board by the ARM board without changing my existing cable harness? If not, what has to be changed?

To understand the changes with the result of better latency with the STM32some statements and questions:

The STM32 has 3 ADCs with 1us conversion time at 56MHz or 1,1us at 72Mhz in comparison to the ATmega has only 1 ADC with 13 us conversion time. Did you use all 3 ADCs of the STM32? Fast interleaved mode?

The STM32 has an DMA function on the ADC. Did you use it or do you read the ADCs by interrupt or daisy chain?

The ADC of the STM32 has two bits more resolution. Did you enhance the some functions for example the custom trigger curves?

Christian