Welcome, Guest
Username: Password: Remember me
NOTE: This forum is community powered. Please be mindful that long time community members are here to help as part of a community effort. If you have a specific issue (e.g. hardware, failure), please use our tech support portal (Support menu - > Contact Us). Thanks a lot of your help in making a better community. :-)

TOPIC: Readout of Volume

Readout of Volume 3 years 4 months ago #25245

  • rhosch
  • rhosch's Avatar
  • Offline
  • Junior Boarder
  • Posts: 33
  • Thank you received: 6
  • Karma: 0
OK, that's just beyond fantastic. Unless something changes before I get ready to purchase (revamp of the 2x8/4x10HD platform similar to the new 2x4HD specifically) I won't be working with the SHARC models but seeing as both interface with the vol-FP I would imagine the control scheme is very similar if not identical.

When I do get to that point, I will find out! Then I can work on expanding on your effort using an address translator to synchronize volume and state among an arbitrary number of identical miniDSP units.
Last Edit: 3 years 4 months ago by rhosch.
The administrator has disabled public write access.

Readout of Volume 3 years 4 months ago #25396

  • devteam
  • devteam's Avatar
  • Online
  • Administrator
  • Posts: 8459
  • Thank you received: 1039
  • Karma: 156
Dear All

Just popping in to say we're super proud and happy of the great community work ongoing for this project! :-)
Great stuff guys.. Keep it up.. We're lurking and not able to provide 100% support else we're going to use all our engineering resources doing tech support on explaining programming of an arduino (rather than developing new exciting platform) but I see some amazing community effort and just wanted to thank all involved! :-)

DevTeam
MiniDSP, building a DIY DSP community one board at a time.
The administrator has disabled public write access.

Readout of Volume 3 years 4 months ago #25417

  • haggismonster
  • haggismonster's Avatar
  • Offline
  • Junior Boarder
  • Posts: 35
  • Thank you received: 17
  • Karma: 4
haggismonster wrote:
I revamped the code to be object oriented and more complete. This version has the follow features:

  • Tracks volume state so you can always get the current volume with Sharc.getVolume()
  • Tracks muted state so you can always get the current mute state with Sharc.isMuted()
  • Gives you full control of muting with: Sharc.toggleMute(), Sharc.muteOn(), and Sharc.muteOff()
  • Allows you to set a specific volume level with Sharc.setVolume(123); // in the range 0-255 where 0=no attenuation, 255=full attenuation
  • Allows you to increase/decrease the volume by X number of 0.5dB increments with Sharc.volumeUp(100) or Sharc.volumeDown(123);
  • Change preconfigured configuration using Sharc.changeConfig(2); // in range 1 - 4
  • By default it waits for the MiniSHARC to initialize before proceeding.

....

I've moved the code to Github: github.com/h4gg1s/MiniSHARC-Arduino

See this Arduino project file for a demo of how to use it: github.com/h4gg1s/MiniSHARC-Arduino/blob...iniSHARC-Arduino.ino
The administrator has disabled public write access.
The following user(s) said Thank You: devteam, mrung, Vector

Readout of Volume 3 years 1 month ago #26804

  • mrung
  • mrung's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 3
  • Karma: 0
Hi,
I have followed this thread with great interest. I have a miniDSP 10x10HD (containing the miniDSP 8x8 Kit board and the VOL-FP) and the missing readout of Volume is really frustrating. I would indeed like to add a display or substitute the VOL-FP with e.g. an Arduino with a display (and a different user interface by the way).

In some of the above posts I get the sense that rhosch wants to do something similar for a 4x10HD.

In this thread it seems to be the assumption that the messaging from the VOL-FP to the 8x8 Kit board is the same as to the MiniSHARC.

However, looking in the MiniSHARC manual it seems that the messaging uses a 5 wire cable from a 5 pin header on the VOL-FP. That seems appropriate for an I2C connection (and pin numbers given in previous posts also refer to a 5 pin header/connector).

To the 8x8 Kit board the VOL-FP uses only a 3 wire cable from (another) 3 pin header. This cannot be I2C. A brief test with an oscilloscope confirm that the 3 wires are just GND, 3.3V and one data line. That was a disappointment because it must be a different protocol/interface - and it does not seem to leave the possibility for 8x8 Kit board to return volume and other status information.

Has anybody looked into this? Or have I got it all wrong? rhosch, have you got any further in your project with the 4x10 HD?

BR Martin.
The administrator has disabled public write access.

Readout of Volume 3 years 1 month ago #26808

  • bwaslo
  • bwaslo's Avatar
  • Offline
  • Junior Boarder
  • Posts: 31
  • Thank you received: 8
  • Karma: 6
mrung,

An I2C interface (a 3 wire system, see: en.wikipedia.org/wiki/I%C2%B2C) could look pretty much like you describe when no information is being sent. The SCL and SDA lines default to Vcc (pulled there via resistors). I don't know whether the 8x8 is I2C, but your description may not rule it out. Make sure you look while there is activity on the line (spin the volume control, for instance),

It might also be "1-Wire" interface, with only data and ground.
Last Edit: 3 years 1 month ago by bwaslo.
The administrator has disabled public write access.

Readout of Volume 3 years 1 month ago #26809

  • rhosch
  • rhosch's Avatar
  • Offline
  • Junior Boarder
  • Posts: 33
  • Thank you received: 6
  • Karma: 0
I have not yet purchased the 4x10 HD and started my investigation/modification. It is still on the to do list, but there are lots of things needed to complete and I just haven't gotten to that part of the system yet.

I'll certainly post my findings (and more likely, questions!) here when I do.
The administrator has disabled public write access.

Readout of Volume 3 years 1 month ago #26870

  • mrung
  • mrung's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 3
  • Karma: 0
As the VOL-FP is powered from the main dsp board four physical connections are required to carry an I2C:
• Vdd (3.3V)
• GND
• SLC
• SDA

The three pin header used to the 8x8 Kit board is:
Pin 1: Vdd
Pin 2: GND
Pin 3: X
where X is some kind of serial signaling.

The five pin header used to the MiniSHARC is:
Pin 1: I2C SDA (as explained by Mungam)
Pin 2: I2C SCL (as explained by Mungam)
Pin 3: X
Pin 4: Vdd
Pin 5: GND
where X at pin 3 is the same signal as at the three pin header pin 3.

So I believe that the signaling to the 8x8 Kit (and probably also the 2x8 Kit) board is some other kind of serial signaling. I can already now see how operation of the VOL-FP knob is signaled and how IR RC signals are passed on to the main board.

I shall look further into this after travelling for the next couple of weeks. I shall use my Aardvark I2C Host Adapter to learn more about how the VOL-FP uses the I2C and compare those data with “X” (captured by a logic analyzer). There could be a hint in that.

The ADAU1445 SigmaDSP used on the 8x8 / 2x8 Kit boards has on- board I2C support and it is indeed also supported by the SigmaStudio development tool in which the software (the plugins) are developed (and the same development tool/environment used also for the MiniSHARC plugins, I believe). So I should be very surprised if the board does not have a I2C port somewhere (enabled or not…). I shall search for such port and hope that the Aardvark can help me explore the capabilities of that – if found.

It is a pity that the devteam finds it being like “opening a can of worms” sharing information / delivering documentation in this area. At least a hint why the VOL-FP signals in different ways with the various DSP main boards could explain a lot - and would be highly appreciated.

BR Martin.

PS: I found it convenient to post in this thread as the topic relates to some previous posts here. However, as it is more related to the 8x8/2x8 Kit (and the VOL-FP) it should perhaps be in a new thread somewhere else in the forum. Please, let me know if that would be more appropriate.
Last Edit: 3 years 1 month ago by mrung.
The administrator has disabled public write access.

Readout of Volume 3 years 1 week ago #27657

  • Vector
  • Vector's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 2
  • Karma: 0
Awesome thread, just what I was hoping to find!

I have been considering building a digital 3-way crossover and almost bought a nanoDIGI 2x8 K, then I wondered how volume would be controlled. It appears the nanoDIGI master volume is controllable via IR remote, however there's no volume feedback without having a PC connected. I wondered whether the previous volume setting is retained on power-up, but couldn't see an answer in the manual... On other miniDSP products, some resort to spinning their volume knob anti-clockwise until they think the volume is low enough, then creep up from there.

From my perspective (being new to miniDSP and in the research stage), volume indication seems to be a feature hole, especially considering the advanced maturity of the other aspects of miniDSP's products.

Even on the LinkwitzLab website; LX521 Supplies page, the comment is made: "But the DSP lacks an indication of volume level." The DSP challenge page (section A) hints at a struggle with this issue, eventually volume control was implemented with a specialist multi-channel analog device (which also solved a gain issue).

Anyway, this was a long way of saying thanks to all the contributors of this thread (and the mods for not nerfing it). I'm now satisfied I'll be able to achieve the result I want, and it seems I'll be dropping an order for a miniSHARC and getting back into microcontroller programming - something I used to really enjoy!

P.S. The mods seem concerned about their resource load if they were to release more details about I2C control, so I'd like to make the point that the community here appears quite strong and knowledgeable, so in many cases I think customers would help fellow customers. Who knows, sales might even increase! ;)
The administrator has disabled public write access.

Readout of Volume 3 years 1 week ago #27662

  • haggismonster
  • haggismonster's Avatar
  • Offline
  • Junior Boarder
  • Posts: 35
  • Thank you received: 17
  • Karma: 4
Vector wrote:
Awesome thread, just what I was hoping to find!

Hi Vector, it's good to hear you find it useful! At present there's one major feature it lacks - a feature to set mute on/off. I don't even know if the MiniSHARC supports a mute command on the I2C bus.

I've not quite given up hope of the DevTeam sharing the required byte sequence, but failing that I've got a couple of ideas for a work-around:

* Brute force. There search space isn't too large, and I2C is plenty fast. I could write some code on the Arduino to basically start sending values from 000000 to ffffffff and checking the mute value after each attempt. If that's too slow I could write a more complex search. Either way, if there's a mute feature it should be found... eventually. Aside from mute, it would probably be too much effort to use this technique to identify other commands on the I2C bus.

* Reverse engineering. I have a solder rework station and PIC reader/programmer. I could pull the firmware off the MiniSHARC's PIC18f27j53 and run it through IDA Pro. It shouldn't be too hard to find the I2C control sequences. The advantage of this is we'd find ALL of the available commands. One downside is that the DevTeam might frown upon it. Another downside is that I might brick a MiniSHARC... but that doesn't really matter because I have two: one that's fully functional, and one that has faulty I2S bus - I only get S/PDIF from it. I'm fine with that one being a sacrificial lamb!

I can't think of another way to figure out the mute command. Any ideas?
The administrator has disabled public write access.
The following user(s) said Thank You: mrung

Readout of Volume 3 years 1 week ago #27664

  • Vector
  • Vector's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 2
  • Karma: 0
haggismonster wrote:
I can't think of another way to figure out the mute command. Any ideas?

Perhaps mute could be implemented relatively simply and without resorting to anything extreme, like this:

[mute pressed]
1. Store current volume level in microcontroller memory
2. Send continual volume reduction commands to the DSP over I2S until its response indicates minimum volume.

[mute pressed again]
1. Send continual volume increase commands to the DSP over I2S until the volume level response meets (or exceeds) the stored value from step 1 above.
2. To safeguard against excessive volume, quit sending increase commands if no responses are received (or allow one retry after a small time delay).

Depending on the DSP's response lag and I2S speed, the effect may resemble a quick fade out/fade in, but that's not a bad thing.
Last Edit: 3 years 1 week ago by Vector.
The administrator has disabled public write access.
The following user(s) said Thank You: mrung, haggismonster

Readout of Volume 3 years 4 days ago #27717

  • mrung
  • mrung's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 3
  • Karma: 0
I don't know for sure if this is an opportunity in this case but for my 10x10HD the plug-in allows for a "master mute" to be programmed for the IR remote control.
As far as I have seen the VOL-FP operate in my system it captures received IR codes and just pass them on (encapsulated in a certain message format) to the main dsp board. The recognition of an IR code takes place on the main dsp board (based on the learning carried out using the plug-in panel) - I assume.
Emulating reception of such an IR code may allow for a mute function.

Just a thought... I have not spend much time sorting out all details of the handling of IR codes (I don't normally use IR remote control with my system).

Otherwise, I like the creativity of ALL the proposed approaches above. :)
The administrator has disabled public write access.

Readout of Volume 3 years 4 days ago #27718

  • mrung
  • mrung's Avatar
  • Offline
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 3
  • Karma: 0
As owner of a 10x10 HD I also feel the need for a readout of the volume - and long term creating a user interface different from that of the VOL-FP – as I wrote a few posts about.

However, after looking further into how the VOL-FP and the dsp main board communicates in the OpenDRC and in the 10x10HD (2x8, 8x8, 4x10HD etc.) I do see similarities, but indeed also severe differences. So I will start a new thread about volume readout for the 10x10HD.

Thank you for the inspiring posts and important information and observations already brought to our attention in this thread.
Last Edit: 3 years 4 days ago by mrung.
The administrator has disabled public write access.

Readout of Volume 3 years 2 days ago #27743

  • haggismonster
  • haggismonster's Avatar
  • Offline
  • Junior Boarder
  • Posts: 35
  • Thank you received: 17
  • Karma: 4
Vector wrote:
Perhaps mute could be implemented relatively simply... Send continual volume reduction commands to the DSP over I2S until its response indicates minimum volume... Send continual volume increase commands to the DSP over I2S until the volume level response meets (or exceeds) the stored value from step 1 above
...
Depending on the DSP's response lag and I2S speed, the effect may resemble a quick fade out/fade in, but that's not a bad thing.

Yup, this is a great option. It'd be nice to see if there's a real mute feature, but if not... this might work pretty well. I don't have any speed/timing data yet - I'd need to write a little bit of code to try it - but the latest firmware should be plenty fast.
mrung wrote:
I don't know for sure if this is an opportunity in this case but for my 10x10HD the plug-in allows for a "master mute" to be programmed for the IR remote control.

As far as I have seen the VOL-FP operate in my system it captures received IR codes and just pass them on (encapsulated in a certain message format) to the main dsp board. The recognition of an IR code takes place on the main dsp board (based on the learning carried out using the plug-in panel) - I assume.
Emulating reception of such an IR code may allow for a mute function.

Just a thought... I have not spend much time sorting out all details of the handling of IR codes (I don't normally use IR remote control with my system).

It's exactly the same for the MiniSHARC, and is in fact the reason why mute is "broken" in the current version of the library - it's not really broken, it's just hardcoded for a specific IR remote! So I guess there's another mute option - pull the mute IR commands off a VOL-FP's I2C bus with a logic analyzer... :whistle:
The administrator has disabled public write access.

Readout of Volume 3 years 22 hours ago #27776

  • haggismonster
  • haggismonster's Avatar
  • Offline
  • Junior Boarder
  • Posts: 35
  • Thank you received: 17
  • Karma: 4
I did some tests. It turns out that up-to-date firmware (version v1.8 / 2.18 from June 2016 [www.minidsp.com/userdownloads/opendrc-minisharc-plug-ins]) has MUCH faster volume ramp up/down than any of the older firmware.

On firmware 2.18 it's possible to go from zero attenuation (max volume) to full attenuation (muted) in roughly 180ms, which to me is perfectly acceptable for mute feature. The reverse is identical - from mute to max volume takes under 200ms.

I'll update the Arduino-MiniSHARC codebase to reflect the changes and let you guys know when it's done.

-H
The administrator has disabled public write access.

Readout of Volume 3 years 8 hours ago #27787

  • haggismonster
  • haggismonster's Avatar
  • Offline
  • Junior Boarder
  • Posts: 35
  • Thank you received: 17
  • Karma: 4
Ok, the final code is up (github.com/h4gg1s/MiniSHARC-Arduino). Mute/unmute works :)

In the end I went with 300ms to mute, which gives a very fast response with a slight fade out effect.

Unmute takes 2.5 seconds, which is much better if you've been listening at high volumes because the fade in effect gives your ears time to adjust.

All comments, bug reports, feature requests, etc gladly accepted!
The administrator has disabled public write access.
The following user(s) said Thank You: devteam, professorpolymath
Moderators: devteam