PDA

View Full Version : Digital "modelling amp" semi-DIY



gpjt
21-02-2020, 02:36 AM
Hi all -- for a while I've been planning to build something roughly equivalent to a modelling amp head. The idea is to use a Raspberry Pi (https://www.raspberrypi.org/) (credit-card sized barebones computer), some kind of USB sound card, and -- at least initially -- the Guitarix amp modelling software as a base. It would have an LED touchscreen to allow configuration and adjustment of the modelled stack. As all of the amp modelling would be happening in software, the power amp stage could just be a class D or "class T" amp attached to the line out of the sound card. Should be easy enough to build a decent case to keep it all tidy.

I see that pretty much all of the threads here are to do with making classic analogue amps, so maybe this isn't the right place to post build notes/thoughts on this... on the other hand a lot of the posts elsewhere on the forums suggest that people are using digital amps when playing, so perhaps there might be some interest?

I've done some initial tests of the stack apart from the power stage, and have something roughly working -- will post a bit about that next, but if the consensus of the forum is that this isn't the right place to post about the build, just let me know and I'll stop :)

gpjt
21-02-2020, 02:54 AM
First step: a Raspberry Pi 3 screwed on to a 7" touchscreen. Using a version 3 here rather than the new version 4 because the 4 has micro-HDMI output, and I don't have a micro-HDMI cable to hand.

33853

Next, plug everything together. A total rat's nest. Note that the sound card (top right) is at a bit of a funny angle. It works fine despite that, but it's not an acceptable long-term solution:

33854

Power on and boot test. Works fine, no magic smoke escaping from the hardware... touch screen works out of the box, so I can unplug the mouse (which means that the jammed-together USB stuff will no longer be an issue):

33855

Next, install and fire up Guitarix. Plugged in guitar and headphones. Getting the software working well was quite a lot of work; the normal operating system setup does not work at all well for real-time audio processing and initially I was getting about 100ms latency with any non-trivial modelling going on. That's 1/10s between hitting the string and hearing the note, which makes it really hard to play at all -- I don't even want to imagine how hard it would be to keep in time with the rest of the band with that.

However, with some tweaks to the OS setup, that came down to 5ms, which is -- at least for me -- perfectly playable. If there is interest in this thread, then I'll post about that, because there's some interesting stuff in there about how digital audio processing works.

33856

Anyway, what I've got here is a horrendous mess that actually works pretty well as a simple modelling headphone amp -- kind of like Amplitube, but no need to pay lots for branded models. I think the whole thing could be shrunk down quite nicely -- the limiting factors are the size of the screen, and the power supplies that will be needed (USB for the computing stuff, and probably 12v or so for the power amp stage).

Only problem so far is that there's a lot of hum when I'm not touching the strings or bridge on the guitar -- I suspect that there's an earthing problem, which sounds plausible with this hacked-together mess.

dave.king1
21-02-2020, 03:07 AM
Keep it coming, not only is this the right place for it it's different and interesting

PJSprog
21-02-2020, 03:18 AM
Absolutely interesting.

Simon Barden
21-02-2020, 04:20 AM
Hum from non-string touching normally just indicates a lot of electrical noise around. The guitar strings give your body a proper ground connection so stop it acting like an aerial, plus any signals it does intercept get taken to ground, so can't pass on to the guitar.

Shielding the Strat (if not already done) will help cut down on the noise significantly, but it's still got single coil pickups so you can't totally kill the hum.

A grounded metal enclosure for the Pi would probably help, as would moving it as far away as possible from the guitar.

RocknRolf
21-02-2020, 06:13 AM
Definitely interesting @gpjt!
Keep it coming!

As I get a bit older, still young though, but able to sit in one place long enough to build stuff, I have entertained the thought of doing something like this in the future, tough you are bringing it to the next level :D

Very interested to see where this is going

Marcel
21-02-2020, 06:21 AM
Definitely the right place for this project. Modeling amps are as accepted in the guitar community as tube amps.... so post away

Plenty of interest from this corner of the woods... ;)

Andy40
22-02-2020, 02:28 AM
I got my popcorn....go

gpjt
22-02-2020, 03:13 AM
Thanks for the encouragement, everyone :)

Super-busy day today with work, will post more tomorrow.

gpjt
23-02-2020, 08:57 AM
Spent the day noodling with the setup as it is right now, trying to work out if it's the right way to do things. It works really well as a headphone amp; there's no need for a keyboard, and it's just about usable without a mouse. Setting things up after power-on is a bit of a pig, because it forgets how the internal connections are set up and you need to essentially draw lines on the screen between a thing that represents the audio in to a thing that represents the input to the emulated amp stack, then another from a thing that represents the stack output to the audio out, and that needs more precision than is easy with my sausagelike fingertips. It needs to start up with all of the virtual connections pre-set and Guitarix already running. That feels like a Linux software configuration thing, which is a big chunk of my day job, so I'll work that out.

Bill of materials so far:

* Raspberry Pi 3 B+
* 7" IPS touch-screen with HDMI in for video, and USB out for the touch-sensitivity. No case.
* El cheapo USB sound dongle
* 6.3mm to 3.5mm audio jack adapter
* HDMI cable to link the monitor to the screen
* USB cable for the touch-sensitivity bit.
* USB cable to charge the screen
* USB cable to charge the Raspberry Pi

Plus a pair of headphones, a guitar (Squier Bullet Strat, which is a lovely little thing for the money but undoubtedly does *not* have shielded cavities) and a lead, of course.

The Pi3 is a bit underpowered for running all of this; although I could get latency down to just over 5ms, as soon as you start using the more complicated amps with a few effects (bass boost, reverb, presence) it glitches. But the Pi4 is much more powerful; the only reason I'm using a Pi3 at the moment is that I don't have a micro-HDMI cable to hand. Amazon Prime to the rescue!

Plugging all of that stuff together is pretty simple and obvious, I won't bore you with it. Things will get a little more interesting later, because I want to reduce the trailing cables by making my own short-run cables -- but that can wait for a bit. And once I have a software setup I'm happy with I'll give the details, but I suspect it'll be fiddling with that for a little while before I'm happy with it.

Time to move on to the rest of the amp!

Having thought about this a bit, what I'm building here is basically a combination of a PC with a decent audio I/O system, and an amplifier. It seems to make sense to split it into three separate modules:

* The digital stuff -- compute board, monitor, DAC/ADC -- which will need at least two high-quality USB power inputs, alongside an audio input and output. The audio output should be routable to a headphone jack or to the power amp. It would also be nice to design it so that an effects loop could be put in between those, but maybe that's something for the longer run... Oh, and USB ports so that a mouse and/or keyboard can easily be plugged in as needed. This should not be over-shielded, as I suspect that the Pi's WiFi could be useful.
* The power amp. This will need a volume control, audio in, audio out, and power in -- looks like 12v is likely to be needed for this.
* The power supply. This will need to provide the USB power out, and also 12v. I'm thinking that building this kind of like a desktop PC PSU would be the way to go -- a self-contained unit holding all of the dangerous-voltage stuff. So I'll get a metal project box, whack a kettle plug connector into it, earth the box as a whole (just solder yellow-and-green to the box) and then split the input to two separate units inside the box, one USB adapter (maybe a stripped-down Anker unit, I like their stuff) and one 12v adapter. Run the cables out through holes in the box. As all of the high-voltage stuff will be in an earthed metal enclosure, it should be safe and also well-shielded in RF terms.

For the box as a whole, I think I'll put something together out of pine and thick plywood, aluminium on the front and back, box corners. Basically the classic amp head look.

gpjt
23-02-2020, 09:45 AM
Searching for pre-built power amp boards; as you'd expect, there are no cheap mono ones out there, so it looks like it'll be easiest to get a stereo hifi one and just leave one channel unused. This looks like a solid option (https://www.amazon.co.uk/Droking-Amplifier-Immersion-Bookshelf-Speakers/dp/B07HKBPCD1/ref=sr_1_21?keywords=amplifier%2Bboard&qid=1582424813&s=electronics&sr=1-21&th=1).

Marcel
23-02-2020, 12:40 PM
Searching for pre-built power amp boards; as you'd expect, there are no cheap mono ones out there, so it looks like it'll be easiest to get a stereo hifi one and just leave one channel unused. This looks like a solid option (https://www.amazon.co.uk/Droking-Amplifier-Immersion-Bookshelf-Speakers/dp/B07HKBPCD1/ref=sr_1_21?keywords=amplifier%2Bboard&qid=1582424813&s=electronics&sr=1-21&th=1).

Or you could leave it stereo and go the Roland Jazz Chorus amp path...

Simon Barden
23-02-2020, 05:44 PM
This? https://www.amazon.co.uk/Nobsound-TPA3116D2-Amplifier-Subwoofer-Digital/dp/B07H3S6Y43/ref=sr_1_4?keywords=single%2Bchannel%2Bamplifier&qid=1582454608&sr=8-4&th=1

gpjt
24-02-2020, 06:48 AM
Simon, your search skills are clearly better than mine! That's a really interesting point, though, Marcel -- I've been thinking of this as a way to run normal amp simulations, but as there's basically a guitar signal going into a computer and then getting fed to the headphones/speaker output, there's no reason not to run effects through it and have two speaker outputs -- say, a flanger that pans from side to side in time with its "whoosh" (there is undoubtedly a name for that and as a shoegaze fan I should know it, but I don't). Anyway, that sounds worth pursuing.

Had a bit of a brainwave about the power supply. There was something unsatisfying about the idea of splitting the mains two ways, and then having separate converters from the mains voltage, one for the power amp at 12V+ and one for USB at 5V. I was looking at my laptop's power brick and realised that it's 20V at 3.25A, so 65W. 20V is pretty good for most of the amp boards I've seen. Moving a little further along that line of thought, car cigarette lighters are normally 12V, but apparently trucks and buses can be 24V or more -- and it seems that most devices designed to plug in to a car dashboard can handle at least 24V -- at least, the good quality ones can. And good car USB chargers are easy enough to get (https://www.amazon.co.uk/gp/product/B07PGT7LSR?pf_rd_p=f20e70b1-67f9-48d1-8c78-ba616030b420&pf_rd_r=RXFSSBS9CNAH26WNYPAG).

So a 60W or so laptop brick sounds like an excellent option for powering the amp. Ideally, I want everything inside the amp box -- so, get a project box, have a hole in the side so that the kettle lead cloverleaf "socket" (which of course is actually a plug) is accessible from outside. Put the car USB adapter inside there too with the USB cables coming out; wire it across the 20V output of the power brick, and then in parallel have the 20V output wires to go out to the amp. Ground the metal enclosure with a wire to the 0V wire from the PSU, and we have a shielded metal enclosure which can be bolted inside the amp case.

But if that all doesn't work, and the power supply introduces buzz or hum, then at least the laptop power brick could be moved outside the case, leaving just the USB conversion in there.

Does that sound sane to those more experienced with the analogue side of amplification?

[edit: remembered that laptop bricks tend to have cloverleaf inputs rather than kettle plug]

Marcel
24-02-2020, 03:37 PM
Using the brick supply is probably a good and quite safe way of doing things, however I'd be cautious on incorporating the brick inside my enclosure. The brick itself will most likely radiate quite a lot of RFI (Radio Frequency Interference) which if outside your modeling amp enclosure should not cause any issues. If it is inside your enclosure then it has the best chance possible to wreak havoc of all manner of types....

Of note is that VOX with their VT series of modeling amps chose to have their brick separate from the amp chassis, and have it supply power to the amp in typical laptop style via a suitable DC rated connector. It would be my assumption that those that have the "brick" inside the chassis have selected a device that is designed and built correctly for that important job.

Brick type power supplies are convenient and light, but as they are all switch-mode devices they do offer their own set of challenges, with RFI being the biggest problem on the analogue audio noise floor. RFI is not an issue on the digital side typically, though at high levels it can cause digital data corruption... Give it a try inside your enclosure though don't be surprised if you get better analogue noise floor results with the brick separated and away some distance from your main modeling chassis.

Also, the cheaper the "brick" the higher the RFI is likely to be. One way to make a good switch-mode supply cheaper is not fit the components that keep that nasty RFI under control.

gpjt
25-02-2020, 04:28 AM
Hi Marcel -- thanks for the thoughts! As an experiment, I plugged my stock Squier Strat, which I'm pretty much sure has no cavity shielding, into the current version of the amp -- dialed down to a clean sound -- and then used the guitar as a poor man's RFI detector.

When the guitar was far away from any power sources, it was completely fine -- no audible buzz at all, even when not touching the strings.

Putting the guitar's input jack near a good-quality Dell laptop brick caused lots of buzz to come through the amp -- putting the selected pickup near the brick made it much louder. The effect with a mains to four-USB charger made by Anker was less but there was still some buzz. In both cases, touching the strings to add an extra earth through me had a minimal effect in reducing the buzz.

Do you think that putting the brick inside a grounded metal enclosure would reduce the RFI?

Simon Barden
25-02-2020, 04:30 AM
Do you think that putting the brick inside a grounded metal enclosure would reduce the RFI?

As long as it has sufficient cooling available, it isn't going to do any harm and may obviously do some good.

Marcel
25-02-2020, 06:03 AM
When the guitar was far away from any power sources, it was completely fine -- no audible buzz at all, even when not touching the strings.



I think that is your clue..... Separation.

Keeping the brick itself generally away from the amp (and guitar) will be your best long term bet. I know in my case with my VOX VT40x the amp sits on a stand or on on another cab to get it off the ground for better listening, and its associated brick inevitably sits on the floor some feet away. I'd probably put most of my 'best practice' shielding efforts into the modeler amp enclosure, and try and have the brick as far away from things as practical.

Putting the brick in its own shielded ventilated enclosure will reduce the RFI by some small amount, but is probs also just making things more difficult for yourself for not much improvement. Much of the RFI is radiated by the brick itself, and often a sizable portion is radiated by the leads to and from the brick.

gpjt
25-02-2020, 07:17 AM
Thanks, guys -- makes sense. I do like the tidiness you get with a traditional amp, where there are no extra boxes littering the place and causing trip hazards... but this is probably the wrong thing to obsess on right now. I normally play through a Orange Micro Dark, which also has an external power brick, and by putting the amp on top of the cab and the brick on the floor behind it, everything works OK with no noticeable RFI. I assume that the signal to from amp to speaker is high enough power that any RFI is just drowned out, because the brick is not far from the speaker input.

(As an aside, would a transformer-based power supply produce less RFI than a switching one? Intuitively I would guess it would be much better, as there would be no high-frequency stuff going on -- just the normal 60Hz mains cycle. Not planning on using one in this build, just interested.)

Marcel
25-02-2020, 10:25 AM
(As an aside, would a transformer-based power supply produce less RFI than a switching one? Intuitively I would guess it would be much better, as there would be no high-frequency stuff going on -- just the normal 60Hz mains cycle. Not planning on using one in this build, just interested.)

You are very correct there.... Transformer (or analogue) based supplies produce virtually nil RFI.. ever!!..... On my ham radio rig for 7MHz SSB work I resorted to a very old Yeasu 12VDC regulated 20A transformer supply because every suitably sized commercial switch-mode supply created noise hash across all frequencies from broadcast medium wave AM radio right up past 27MHz CB frequencies and beyond. And in certain situations even VHF and UHF were unusable depending on the switch-mode supply used.... They (switch-mode supplies) often produce far more RFI than they ever should, and sadly most people would never notice. Many ham radio operators resort to incorporating batteries for their 12VDC HF/short wave gear simply because of the RFI issue with switch-mode supplies and the increasing unavailability of good regulated 12VDC transformer based power supplies of useful amperage size.

What most people of the general public do notice is those switch-mode brick supplies are compact and light weight and convenient with many voltage options, whereas a transformer supply is typically fixed voltage, large and heavy and cumbersome. And the bigger the output current the more the size and weight become an issue. Under 1A and things are pretty even size and weight wise... get to 10A and the the switch-mode might crack 1kg and the transformer version could easily hit 10kg and still be comparable in size. Step up to 50A and weights shift to 5kg and 50kg respectively.... I have a Regulated 12VDC only 60A (800W) rack mounted 8RU high brute of a transformer based power supply that easily weighs in at over 50kg, and a variable switch-mode 0V to 60VDC 70A 2RU high rack mount unit that would be hard pressed to reach 10kg..... Weight and convenience is an issue to many if not all, and often at the expense and detriment of RFI.

You will notice that any RFI problems will be most apparent in and around the higher impedance and small signal areas of the project. RFI in of itself is only a tiny signal which appear to be big when beside other small signals on high impedance circuits such as those coming from a guitar. Once you get to line level the impedance's of the circuit are often lower and the wanted signal is often higher so RFI still being the same size will have far less overall effect. On output stages that have high currents on lovely low impedance 4, 8 or 16 ohm values then the tiny RFI signals will be near impossible to detect. The net result is having a buffer/small boost pedal on a relatively short lead to the guitar often defeats many RFI problems in most situations due the slightly increased signal size and a change to typically a lower instrument line impedance from the pedal to the amp..

dave.king1
25-02-2020, 05:02 PM
If your Squier cavities are black rather than bare timber I suspect you'll find it's conductive paint and therefore shielded which is what my CV Thinline has