is there a full pin out for belamini somewhere?

Ive a couple of questions...
- can I inject 5v/gnd into gpio to power it , like you can with bela
- i see theres a 3 pin header next to analog header, L/R/GND, are these audio output?
- is there any way to get audio in/out via the gpio headers?

    thetechnobear - can I inject 5v/gnd into gpio to power it , like you can with bela

    I the pin labelled SYS VIN in the pinout above should be the one, but please double check the PB manual before you try, because I haven't tested it.

    A full pinout of the Bela pins should show up in the IDE. The 3-pin socket is the DC-coupled line out.

    Not sure what you mean about accessing the audio from P1/P2. The digital signals for the audio are there but the analog signals are ony on the molex and the three-pin line-out socket

      giuliomoro thanks that worked

      pin p1/1 (5v sys), and p2/p16 (gnd sys), I like the way its silkscreened onto the bela and mini, makes me feel more confident than just counting pins 🙂

      anyway heres is what I was up too...

      alt text

      so this is the AE Modular (tangible waves)
      had it for a while, was always going to connect it to the Full Fat Bela, but she is too big to fit in the case... but bela mini is 'just' about the right size.

      so here, Ive got it powered up, and then running an LFO to drive the frequency of an oscillator.

      AEM is great for this, its all 5v , so no converters needed for analog in, and its modules are cheap, so feels much safer than messing with Eurorack.

      this connects to the AEM ribbon, which has the following pinout, so lots of options.
      http://tangiblewaves.weebly.com/diy-info.html

      what would be ideal is if I can convert the audio in/out......

      what i need to do is to get from Belas AC output, to AEM 0...5v, centred around 2.5, I managed this before with Axoloti, so just need to dig that out again... and try to make it small enough to go in the case.
      (Belas audio i/o is not DC coupled is it?)
      I guess then I could also put a couple of level converters in to allow a a couple of digital inputs too.

        Looks neat!

        thetechnobear (Belas audio i/o is not DC coupled is it?)

        The audio input is AC coupled and so the headphone out on the Molex connector. The 3-pin female socket line-out - however - is DC coupled, with the following levels:

        • writing a "1": 2.29V
        • writing a "0": 1.34V
        • writing a "-1": 0.40V
        • codec powered down: 0V

          giuliomoro

          I did try to plug the DC coupled output, but it all got a bit weird 🙂

          initially I just plugged in out DC R, directly to AEM's mixer , Beagle powered itself off.
          thought Id blown it ... wouldn't power on until I plugged it into a usb , then it was all fine again!
          (so this obviously 'reset' something)

          next time, I tried it, I left the audio (AC) output jack plugged in.. and viola it worked.
          so obviously it needed a ground, other it resets (!)

          next I tried using out DC R + DC Gnd into ground on AEM ribbon (as well as the GND going to sys GND) ,
          this worked too except I can hear a 'whistling' in the background,

          ok, now the signal has a DC offset (of 1v compared to what AEM wants) but I dont think thats it.
          because if I plug in the audio AC again, the signal is fine...

          (this is kind of interesting, as in past experiments, Ive similarly connected things directly to AEM but always used the audio (or cv) jacks to provide the ground... so perhaps this is needed, perhaps this is an audio ref ground?)

          a 'side question'
          do I some how need to protect the analog in on bela from being connected to an 'input' on the modular.
          (I know output dont like being connected together (but I dont have this) , but not sure about inputs)

            thetechnobear (this is kind of interesting, as in past experiments, Ive similarly connected things directly to AEM but always used the audio (or cv) jacks to provide the ground... so perhaps this is needed, perhaps this is an audio ref ground?)

            I don't understand exactly what happened. Is the final outcome that in order for the line out to work properly you need both one ground connected for power (P2_16?) and another ground (from the audio jack) connected for the signal, at which point you get the whistling? And if you have only one of the two, it doesn't work?

            thetechnobear a 'side question'
            do I some how need to protect the analog in on bela from being connected to an 'input' on the modular.

            No, it's fine to connect inputs together, that is exactly what happens when you use a multiple: one output feeds multiple inputs. It seems that on the AEM you have max 5V, so you should not need any protection for the analog inputs. However, you may want to wire up a passive resistor divider with ratio ~4.096/5 and a decently high input impedance (>80k ?), so to get the full 5V range on your inputs, without a "dead end". You could similarly use a resistor divider with ratio ~3.3/5 to safely connect a 5V (max!!!!) trigger to the PocketBeagle's digital inputs.

              giuliomoro I don't understand exactly what happened. Is the final outcome that in order for the line out to work properly you need both one ground connected for power (P2_16?) and another ground (from the audio jack) connected for the signal, at which point you get the whistling? And if you have only one of the two, it doesn't work?

              no, I get whistling , if I connect
              the AEM GND (on ribbon) to both Sys GND (p2 16) and Audio DC GND (on the 3 pins mentioned above)

              however, if I then connect a cable from belas audio jack to aem audio jack the whistling goes.


              I thought about this later...
              given that the AEM modules only have the ribbon GND, and they don't have any noise - surely this ground cannot be the issue.

              Im thinking perhaps the problem is on the bela/bbb end...
              is the issue that I'm essentially connecting sys GND (p2_16) to the audio DC gnd... and there is then some how noise coming thru the sys gnd?

              though im not sure why then connecting the 2 audio jacks would then 'stabilise' it!?!

              (all this is guess work on my part, just based on shady memories about talk of now wanting to mix 'ground references' and ground used for power... but perhaps thats misremembered 🙂 )

              giuliomoro you may want to wire up a passive resistor divider with ratio ~4.096/5 and a decently high input impedance (>80k ?), so to get the full 5V range on your inputs, without a "dead end". You could similarly use a resistor divider with ratio ~3.3/5 to safely connect a 5V (max!!!!) trigger to the PocketBeagle's digital inputs.

              thanks, sounds like a good plan 🙂

                thetechnobear no, I get whistling , if I connect
                the AEM GND (on ribbon) to both Sys GND (p2 16) and Audio DC GND (on the 3 pins mentioned above)

                however, if I then connect a cable from belas audio jack to aem audio jack the whistling goes.

                So in the 'working configuration', which one of these do you have?

                1. both P2_16 and the line-out GND connected to the ribbon and the audio jack into the AEM audio jack

                OR

                1. only P2_16 connected to the ribbon and the audio jack into the AEM audio jack

                ?

                  giuliomoro
                  sorry, fresh morning, some coffee, and tracked down my issue! GND is on P2_15, not P2_16... fixed that.. and everything works fine.

                  sorry about the confusion, the 'power 5v and gnd' was the one thing I kept leaving plugged in,
                  as power didn't appear to be an issue, given it was always working... lesson learnt , double check everything!


                  so what i have now is:

                  AEM                   |             BELA             
                  P1 (ribbon) P1_1 P3 (ribbon) P2_15 LFO A0 MIXER A1 AUD DC R

                  run the analog patch and I have an (complex/expensive) siren 🙂

                  really happy with it, super simple (if i had been a little more careful!) and the PB/belamini is such a handy size

                  going to now look at the physical side to mounting, and put in a few resistor dividers to the voltage levels correct, then should be done.

                  Great! Sorry I didn't spot the P2_15/16 mistake earlier. I split this out to a dedicated thread.

                  Ok, its done....

                  so what we have is:
                  - 8 CV input
                  - 2 audio/cv outputs
                  - based on Bela Mini, so A8 1ghz, low latency
                  - fits in AE Module , 2U module (5x10x3cm!)

                  it was a very tight squeeze as I wanted it to fit into 2U , even the bela sticker I had just had to be trimmed 🙂

                  Trying to cram 8 voltage dividers, and a mcp 6002 with 4 resistors and 2 headers, on a 5x3 cm board, challenged my (not great soldering skills) , but just about possible to do as i used a double sided protoboard.

                  it could quite easily be extended to have some digital IO (5v) ... and Id like probably add some LEDs as well.
                  probably could be squeezed in a 1U 'expander'.

                  that said, If I was doing again (or if I do the expander), I might be tempted to go to 4U, as just help space things out a bit ...
                  (if anyone else plans on doing, unless you plan to get PCBs made up, or are good at soldering id recommend 3U/4U, and save pulling out your hair!)

                  anyway heres some pics

                  alt text

                  alt text

                  alt text

                  alt text

                  7 days later

                  hi @giuliomoro et al 🙂

                  so Ive noticed Ive got a slight high pitched noise coming thru...
                  (didnt notice previously, as i had a LP filter following it 😉 )

                  in the following plots,
                  the top one is belamini generating a 440hz sine connected to the scope. (powered via usb, or gpio i see the same)
                  the bottom, I disconnected belamini and instead generated the sine from the wavegenerator (so testing my circuit, in isolation to bela)

                  (Im using an analog discovery 2, so it can provide power/wave generator and scoping - nice device 🙂 )

                  the noise looks similar, but you can see some repeating peaks, a ~3khz intervals,
                  which im guessing is what i can hear. even though it looks pretty quiet (-60db) in the plots, compare to the main signal ~0db), but given nothing else on FFT, its all I can think it is.

                  is this some kind of switching noise?
                  I disabled the LEDs, as mentioned in another but made no difference.

                  I was very tight on space on the protoboard, so left off capacitors to see if it 'would do', so half expected this 😉
                  just wondering if there is a simple solution?

                  im wondering in particular is it some kind of noise coming from powering the op-amp from the same supply as bela?
                  Ive sometimes seen a capacitor put in between the supply (5v) to ground, would this help? what kind of value?

                  alt text

                  note: (for completeness, and in case its part of the issue)
                  i used 3.3k / 4.7kohm resistors for the opamp, to get the gain i need (1+3.3k/4.7k) as its what I had, that were close enough ... without using a series of resistors, which ... you guess it, i didnt have space for 😉

                  a month later

                  ok, so I had a bit more time to look at this...

                  so it appears the issue is purely down to powering the Belamini from the AE module power lines.
                  basically what happens is, even with just the belamini connected, (not my circuit), other modules start having noise on their outputs - particularly noticeable as belamini starts, but then turns into a high pitch sound later.

                  before I started, I kind of expected this, as id heard the switching of microprocessors does this, but it appeared ok.. however, Ive now found thats was because I used modules on a separate power line /ribbon 😉 (so faulty testing)

                  so the question is....

                  the BelaMini needs 5v, and I have 5v on the ribbon, what do I do, to stop the belamini 'polluting' the power line?

                  Is this the role of a voltage regulator? or a large capacitor? (to smooth out the load requirements of the belamini?)
                  ( I tried to look at some other schematics e.g. mutable clouds, but they use a regulator to drop the voltage from 12v to 3.3v, which is not what i need.... but wondering if this is also doing the 'stabilising' !?)

                  Can someone point me to a simple solution/schematic... and if its a voltage regulator/cap, which model/specs?

                  (Im preferably after something really simple given my skill set, or lack of 😉 )

                    The BelaMini probably draws about 420mA, how much spare current can the AE modular power supply provide? If you are exceeding the PSU's limits, then this normally translates in the provided voltage being saggy and noisy, in turn affecting the audio and CV I/Os.

                    I am not familiar with the topology of the AE, but is there any way you could get the 5V for the ribbon that goes to Bela from a stand-alone 1A PSU (e.g.: a mobile phone charger?). That'd be a matter of breaking out the 5V and GND wires from the PSU, connect the GND to the power GND of the AE, but connect the 5V to the BelaMini input only.

                    thetechnobear however, Ive now found thats was because I used modules on a separate power line /ribbon 😉 (so faulty testing)

                    not sure what you mean by this.

                    power supply is 9v 1.3a, and there is not much current draw from the modules, so I think this should be ok.

                    'separate power line/ribbon' , so the AE modular, has a master module, which takes the 9v PSU and then (among other things), has two ribbons from it, one feeding top row, the other the bottom row - so the noise only appears on the same row as the bela mini is on.

                    I could possibly power it separately but that's not ideal (but I do mean to do this as a test anyway) as two things to plug in... though if powered from the usb, then this obviously is useful for programming too.
                    this means drilling the case, and also 'fixing' the module position - not really a big deal.
                    (unless I do like salt, and get a small extender to put on the front panel)

                    another option, would be to look to take the power supply from the 9v supply already present, and the put thru a regulator down to 5v but again this kind of fixes the modules position, and is a bit more complex.

                    Ive asked Robert, and he thinks perhaps an inductor , which also someone on the muffwiggler forum thought too, but the size of this needs to be calculated.

                    @giuliomoro, do you know how this was done for Salt? was there a similar issue?
                    ( unfortunately terminal tedium (rPI eurorack) don't have a schematic so not sure how they solved the issue)

                    small update: (more info)
                    so I tried powering the belamini from usb (just taking gnd to make it common) , and viola the noise goes away.
                    so definitely power related.

                    I had a quick look at the terminal tedium, which i think is similarly taking 5v from eurorack to supply a rPI3, and whilst i cannot find the schematic(!) , I can see on the BOM they use an 10uH inductor (mouser #542-78F100-RC), but without the schematic I cant see how its connected, or if its used in conjunction with something else (capacitor) - or 100% confirm it is using the 5v supply (but does look like it)

                      thetechnobear another option, would be to look to take the power supply from the 9v supply already present, and the put thru a regulator down to 5v but again this kind of fixes the modules position, and is a bit more complex.

                      Ive asked Robert, and he thinks perhaps an inductor , which also someone on the muffwiggler forum thought too, but the size of this needs to be calculated.

                      @giuliomoro, do you know how this was done for Salt? was there a similar issue?

                      On Salt we use this to DC-DC convert the +12V rail to +5V.
                      We could have used the +5V rail, but normally PSUs don't provide much current on the +5V rail. We could have used a linear regulator (e.g.: LM7805), but it tends to heat up a lot (500mA with a voltage drop of 7V is 3.5W), which is not so good for enclosed environments (although LM7805 are indeed used on some PSUs to generate the +5V rail).

                      In your case you have a 4V drop (from 9V to 5V), so that would be about 2W on the LM7805, which could be more manageable. If you go this way, make sure you put a reasonably sized heatsink on it (check the datasheet for the required dissipation characteristics of the heatsink).

                      If you were to try with the inductor, that should go in series with the 5V rail before it hits the Bela Mini. You may also want to add a capacitor in there if needed. Check, e.g.: chapter 5 here.

                      thetechnobear so I tried powering the belamini from usb (just taking gnd to make it common) , and viola the noise goes away.
                      so definitely power related.

                      That's great. To double check you are not pushing the limits of the PSU, I'd also try to replace BelaMini with an equivalent 10ohm resistance (e.g.: R = 5V/0.5A = 10ohm), get at least a 2W resistor (or many lower-rated ones in parallel, e.g.: 16 1/8W resistors in parallel). Power the modular up with this dummy load and make sure the other modules have no degradation in the performance. This wouldn't necessarily be the same noise that you'd get when BelaMini is powered (because that would also be modulated by the current usage of BelaMini), but you may find weird interactions between LEDs and CVs, weirdness in the tunings, etc.

                      thetechnobear (unless I do like salt, and get a small extender to put on the front panel)

                      You'll find a number of ready-made micro-USB male to panel-mount USB-B on Amazon. We couldn't use them on Salt because of space constrains, but you may be luckier.

                        wow, thanks giuliomoro thats a ton of information... a bit overwhelming of first glance, but definitely the answers are in there 🙂

                        I'll also take a look at the micro-usb adapter... this could be pretty handy for patch upload as well.

                        hmm, much to muse over, didn't realise the power noise side has so many sides to it, goes to show what a great job you've done on Salt!

                        @thetechnobear just curious about one thing in your report. Does the high pitch change if you stop the audio calculations? I mean if there is no software running? or is it the same?

                          Hypasus thats a good question!
                          it seems to be the same pitch BUT ive not tested with a patch that changes calculations constantly.
                          Ive a suspicion, it would change, since the pitch changes as BelaMini is booting.

                          Ive yet to decide what to do... partly as Im finding it complex to get a idea what values to use for the inductor and capacitor, which increasingly look like the 'correct' solution (or at least without hacking AEM master module)
                          Robert at TangibleWaves/AEM, has said he will do a bit of research, but his very busy producing modules at the moment, as AEM has been selling well recently - which is good news!

                          (id hoped there would be just a general rule of thumb, kind of grab a 10uH inductor and a 1uF, and see if that helps - but having read the great article posted by giuliomoro, Ive realised its more complicated than that 🙂 )

                          I looked at the usb front panel adapter, I suspect they will be a bit deep, which probably would mean putting it on the side of the case. also it would mean I need to have USB plugged in to use the module at all, which is not ideal (ok, for dev, but not for just using the module 'standalone')