Adding an External Volume Control

One way to go about it is to install just Raspbian. Set your sound to the onboard audio jack, confirm it works, then copy that config.txt to a safe place like a thumb drive.
Then install the X-Hat software and compare the two config.txt files to see what was changed.
Then edit the current one to get the stock audio back.
Or rename the current config.txt to config.bak and copy in the one you saved.
Then see if it breaks the X-Hat.

The encoder is likely going to be very hard to setup for volume. IMHO anyway.
Do you have a plan for that already in the works?

Hi alphanumeric

I did try installing base Raspbian and thought I’d be able to get something like retroarch up & running but I couldn’t.

I looked at the encoder because it seems to be plug & play, it comes with the wiring for the buttons & joystick and from what I can see you just plug it into the Pi via usb, then setup the button & joystick mapping in retropie and off you go, it leaves the Pi’s audio alone so all I need do then would be to plug in a mono ring tip jack with a log pot for volume and wire it straight to the speaker.

I know I’m going to have to put a power switch on as well I was looking at the on/off shim but considering the trouble I’m having with the xhat set up so far it’s put me off pimoroni stuff.

Or is this wishful thinking.

Obviously I’d prefer to get sound control through the Picade xhat working and then maybe work out how to put external volume control on there, but this is where I am.

Also if anyone’s reading this and is put off from getting a Picade please don’t be they’re great, it’s just that I’m having sound control issues.

Ok, when you said encoder I was thinking this, https://shop.pimoroni.com/products/rotary-encoder-illuminated-rgb
Can you please post a link to the “encoder” you want to use?

it’s on a different Pi site, is this allowed?

I think so? I’ve linked to Adafruit stuff, but they also sell Pimoroni stuff. I think I know what it is now anyway, after a Google search. From the product description it “should” work. I’m having a hard time buying into the Zero delay bit though.

Hello again alphanumeric

yep the “Zero delay” is the bit that stopped me in my tracks (from buying it immediately), I can’t see how it converts the button & Joystick output through to usb without some kind of slowdown, but yeah in case were looking at different things:

https://www.modmypi.com/raspberry-pi/arcade/arcade-controllers/zero-delay-arcade-usb-encoder-and-wire-set

So do we still think “zero delay” isn’t and that there may be a bit of lag?, but the features description does make a bit of a thing about the lack of lag

Anyway thanks for taking the time for a reply, also I had a thought that maybe there really is something wrong with the xhat and that maybe I should contact Pimoroni to ask for some sort of sound control setup instructions, because there doesn’t appear to be any.

Yeah, thats what a google search led me too. I haven’t looked all that close at it but if it emulates a HID (keyboard mouse) device maybe there isn’t all that much lag? I play FPS games on my PC with a keyboard mouse all the time. Now that I give it more thought I guess its no worse than plugging in a joystick and or USB game controller?
I don’t currently own an X-Hat or Picade. I may buy one at some point, not sure when that might be though? So basically I can’t help you with that part of your problem, the setting the volume issue.

If you go to the Shop page, there is a “contact us” link at the bottom. You can use that to contact Pimoroni directly, just put a link to this thread in the support e-mail.

Thanks again
I’m going to do that, it’s my last day 'till Monday so I should have some time, and I will link back to this thread, will update here if I get anywhere.

Hi All

Had a reply from Matt at Pimoroni with a link to the retropie forums:

but it seems the posters there want to do what I want to do! ie at this point just control the sound without shutting down a game!, but as I’ve found there’s no real solution to be had.

If someone reading this has followed the link and understands what to do could you give me a hint.

I spent most of my free time over the weekend trying to get some kind of button mapping to control the sound but I get no where.
I’ve tried installing retropie without adding the pimoroni software for the Picade Xhat but obviously I had serious button & joystick mapping issues, I did get them to work (sort of), so I’m back where I was there doesn’t seem to be a great deal of support for the Picade from Pimoroni for this issue.

My next plan is to buy the zero lag arcade controller (in my link in a previous post) and get an on off button for the Pi ,wire in a mono ring tip jack plug to the Pi’s audio out jack and a log pot to the speaker and see what happens then, as in this link I found:

http://www.learningaboutelectronics.com/Articles/How-to-build-a-speaker-circuit-with-adjustable-volume

it shouldn’t cost too much to do either as I have most of the bits.

I’d like to ask if anyone reads this and knows how, how do I alter my Original Post title from " Adding an External Volume Control" to something more descriptive as I now realise I’d be really happy to settle for easier sound control on the Picade, and people on the forums may not be looking at my post because adding an external volume control isn’t for them.

Thanks for reading.

As per the VaFank post above, I got the in game volume control working using the hotkey and joystick up/down, but there are a couple of problems. First, it doesn’t control the volume in Emulation Station. Second, the volume level is reset when I exit a game, so I need to alter the volume every time I switch to a new game.

The system volume setting in Emulation Station works perfectly - it sets the volume for Emulation Station and all games. Because it alters the system volume, it also remembers the setting across reboots. The problem is that afaik, this volume setting can only be controlled through the Emulation Station menu, so it can’t be used in-game. Does anyone know a way to control the system volume using the hotkey and joystick combo?

Hi buddy concerning the volume reset when you change the game you can save your config in retroarch > save game override. In emilationstation, I dont think it is possible.
Nb : do you know how to change the brightness if the screen via Retropie (the screen configs doesnt save)?

Thx

VaFank, many thanks for the Save Game Override info, that will let me adjust all my games to get them running at the same volume level.

The next step is getting the system volume control working using keys. Maybe the best option would be to program the Pi and/or XHAT to adjust the system volume with Esc + joystick up/down, so it would work in ES and in-game. I don’t have enough knowledge of the Pi & XHAT to know if that’s even possible, let alone how to do it. If anyone can offer any advice I’m all ears.

Re the screen, if you’re asking about the 10" screen (which is what I have), then no, I don’t know how to change the brightness via Retropie. My guess is it’s not possible. It’s really odd that the screen menu system doesn’t have a save option - what’s the point of being able to adjust brightness, contrast, etc if you can’t save those changes. I noticed a couple of others complained about this in the forums, but I’ve not seen any response from Pimoroni yet.

Regards.

Thx for your answer 😉

Mills,

In retroarch settings you can make the Bind Timeout longer. I set mine to 7 seconds so I can configure my buttons carefully.

You made my day, thank you VaFank, it’s working for me.

Hi! I’m new to the Picade world and a newbie in electronics.

I had the same problem with my Pi 4, Picade with 10" screen and the latest Retropie.

I tried several things described in the forum, but nothing helped. So I asked a friend of mine who studied electronics, and he gave me some good advice.

He told me to order a part from Monacor called LP-100-8, which I soldered between the XHAT’s output and the speakers input. It works great, even if it’s fully turned up pretty fast. But it keeps the sound level acceptable for home use.

I drilled a hole into the left side of the Picade. Then I soldered the cables going to the speaker and two additional short cables to the volume potentiometer, see photo.