Digital Control of Attenuation – Repository for DIY

I'm happy to announce that my Muses board has also been completed and working as expected. From the outset, I aimed for a high-res LCD screen because I like smooth fonts without jagged edges. That necessitated an MCU with enough memory and speed to accommodate the big font files. An ESP32 WROOM was used and the beauty of that MCU is that it can be programmed via the Arduino IDE, is very fast, has plenty of memory and it's really cheap.

My board houses both the Muses chip and ESP32 MCU, so no external connection between the two is necessary. There is also an amplifier for a stepper encoder with its components hiding below the plug-in MCU. I really like the precision and tactile feel of the stepper encoder compared to the rough click-clack feel of an average rotary encoder. It adds a luxurious touch to the whole attenuator concept. And I didn't even have to buy the stepper motor. It's from an old Teac Floppy drive. A micro switch will be mounted behind the stepper motor to provide a push switch action for selecting different menus, etc.

At this stage, the firmware is proprietary as I'm still refining it, although it's already working very well. There are a few enhancements that I will be concentrating on now that the hardware has been sorted out. I may make flashed MCU's available later. Still deciding what the best way will be to make my solution, which I call the LOGIqE Attenuator, available to others. Sharing the code may be problematic, because it's using so many libraries and font files, that it requires a properly set-up environment to compile.
 

Attachments

  • 5.png
    5.png
    248.4 KB · Views: 163
  • 6.png
    6.png
    244.8 KB · Views: 158
  • 7.png
    7.png
    263.7 KB · Views: 169
  • 3.png
    3.png
    291.9 KB · Views: 158
  • Like
Reactions: 14 users
Stepper Encoder Driver

OK, here you go. It's a very simple circuit. Everything you need to know is explained in the attached PDF, but I'll post some stuff here for quick reference.

The board is 28mm x 40mm.
 

Attachments

  • diagram.jpg
    diagram.jpg
    58.4 KB · Views: 134
  • Circuit.png
    Circuit.png
    5.6 KB · Views: 130
  • Top.png
    Top.png
    20.2 KB · Views: 119
  • 3D_view.png
    3D_view.png
    23.3 KB · Views: 126
  • Stepper Encoder Driver.pdf
    206.1 KB · Views: 64
  • Gerber_Stepper_Encoder.zip
    15.3 KB · Views: 32
Last edited:
  • Like
Reactions: 3 users
Finally got the ESP32/Waveshare that @Skylar88 so highly recommended prised out of the hands of the customs mafia. He’s right, after the learning curve there’s no going back to the Arduino. Even the learning curve isn’t an issue - well supported online. So, thanks for that enthusiastic endorsement @Skylar88.

And thanks, @jpk73 for that nice debounce library!

A few shots of progress - definitely not the finished article but…fun!

7B8195E3-FE41-4CB5-93F8-B9FDDDE0BF49.jpeg 49C1B328-08AE-4737-9B79-270CD0D3318A.jpeg 2E042611-570F-425B-9345-719445500C00.jpeg 74548D12-ECCC-4E39-8183-C5D2F3A5FCBB.jpeg
 
  • Like
Reactions: 5 users
We can always learn a new trick or three. Seven or eight years ago when I did my first sketches for controlling Soekris DACs I avoided libraries due to the limited 32k Arduino memory - now, with the ESP32, they make life simpler. Its really only the TTF fonts that eat up the memory, a real issue on the 328's but less so on the ESP32s. Then again, its trivial to parse TTF libraries online.
 
TTF fonts are scalable, xxx.setFontSize(x), No need to do it online. You're thinking bitmaps, I suspect.

By parsing I mean taking any (free to use) TTF font and running it through a free online converter like this and selecting ONLY the actual characters from the font you wish to use. Which drastically reduces the size of the file - a desirable thing :). Once you've selected those the converter generates a new TTF file.

Which you then convert to a binary array on another free online converter like this . Then you load the binary array (a .h file) from within the sketch using takkaO's great Open Font Render library and you have your customised TTF font embedded in the sketch. No need to have it in the Arduino library - another plus. And, of course, you can load and unload fonts within the sketch to save memory.

And, as mentioned above, those embedded fonts are scalable so you can create any size sprite or text using the TTF font or size it to whatever you wish. It's all outlined in Open Font Render. Pretty straightforward once you've tried it a couple times. Another plus for the ESP32.
 
Last edited:
  • Like
Reactions: 1 user
@derekr, thank you for the explanation. I'll give it a try and see if the quality of scaled up, parsed fonts is as good as what I'm getting on the LCD screen now.

The idea of parsing to only include the characters that you require sounds great. My way of doing it for eg. numbers 0-9 is to truncate the file at some point after the last number in the ASCII table, which is 9. I always cut the file a little past the last number because I have to guess where that point is. If the LCD screen displays garbage on some numbers, I know I have truncated it too soon. I thought I had the process figured out, but maybe there is a better way, which means using less memory.

:spin:
 
I'm busy designing a power supply board for the MCU controlling the Muses board and the input relays of the Iron Pre. It will use 2x Hi-Link smps - one 5V for the MCU and one 12V for the relays.

I've had the whole IronPre setup, including Muses and MCU measured with a PA analyzer and it measures OK without any kind of filter, but I would like to add some kind of filter in front of the two smps, just to help me sleep better, and while I'm designing the board. I've come up with a simple "filter" consisting of a 0.1uF/275V cap as well as a TC73 thermal fuse for each of the smps. There is also a MOV (Bourns MOV-10D561K). (see diagram below)

Would anyone care to comment on my choice of filter, or make suggestions? Please keep in mind that the AP measurements were already quite acceptable without a filter.

Edit: I had originally planned to use an AmyAlice filter, but given the clean AP measurements, I don't see a need for it.
 

Attachments

  • Two_smps.PNG
    Two_smps.PNG
    3.4 KB · Views: 59
Last edited:
Hi all,

@jpk73 suggested in this post i might post the link to my Muses 72323 library. Hope you find it helpful.

It generates the necessary control-commands for the volume-attenuator MUSES 72323. It does NOT transmit the commands to the chip NOR does it incorporate the gain-stages into attenuation-control. It just generates the plain 16-bit patterns as shown in the datasheet.

Please feel free to ask any questions.
 
  • Like
  • Thank You
Reactions: 2 users