Hi,
I'm using a chip that needs 5 Volt to operate properly. 3.3 also works, but I lose a lot of range with only 3.3 Volt.
The Bela schematics explicitly state to not use 5V with the digital pins, but I did not find more information on this elsewhere.
alt text
This is how the Proximity sensor switch chip is connected to Bela - quick sketch:
alt text
So Pin 4 in this sketch goes to
- Digital in 2 of Bela (12 in Pure Data) (not GPIO8 as in the drawing)
- with a 4.7k resistor to 3.3 Volt (which I would like to be 5 Volt)
- to a resistor, followed by a Led to 3.3 Volt again
--> I want on this drawing all 3.3 Volt to be 5 Volt. I have been prototyping first with Arduino and the sensitivity is a lot better, also clear in the chip documents.

Question ====> Can I use the Bela 5Volt pin in this set-up?
----> Or should I include a step-up from 3.3 to 5 Volt?
----> or should I just get my 5 Volt elsewhere? Does this influence the Bela digital ins?

Thanks!
Greetings from a quiet Brussels,
Wendy

the recommendation in the pin diagram refers to not using 5V with Bela's own digital pins. So if you are connecting it to external electronics which is happy to receive 5V, then you can use it (actually you should use the better 5V available at P9.07). The important thing, again, is that the 5V never reaches the Bela digital pins. From the MTCH101 datasheet:

The MTO pin can be considered as an open drain output. A pull-up resistor (usually 3.3k~10 k) is needed to interface with a host. The pull-up voltage can be any voltage lower than VDD. This allows a simple interface with a lower VDD host device.

This is ideal for your application because it means you can use 5V to power the MTCH101, its logic and its MTSA pin. You could then have 5V everywhere except for the pull up resistor connected to MTO, which should go to 3v3. Clearly, you are expected to test this first before connecting MTO to Bela, and verify that the voltage at the pin never reaches 5V.

just had a look at the datasheet - apparently the sensitivity can be adjusted, by balancing R1 and R2.
i would think these resistors could easily be replaced by a simple trimmer, to find the sweet spot for 3v3 operation?

maximum difference between 3v3 and 5v operation seems to be an 11ms increase in response time.
but maybe that's cricital, don't know what you're working on..

greetings from a quiet antwerp 🙂

Hello, London (?) and Antwerp (cool!),

The reason why I'm asking is this:
alt text
5 volt makes the detection distance significantly larger. But indeed it's VDD that needs this! From one of the spec sheets (I realize now - 💡 - 🔆 )

Figure 3 shows the relationship between detection distance and sensor size. Higher V DD voltage also extends the distance, because with higher V DD the sensor will generate stronger electric field for sensing.

@giuliomoro Where is

P9.07 ?

Here?
alt text

I'm trying with the potentiometer, but the sweet spot of activation is just so much further from the sensor with 5 Volt (which I now understand and did not before).
Thanks so much for thinking and reading along with me! First time I've used a smd sensor from scratch 😎

Greetings from Brussels, where at this hour 'there ain't nobody here but us pigeons',
Delving deeper into the electronics universe..

Ciaooo - keep safe - 👋
W

    hah. that graph makes sense. funny enough, it doesn't seem to show in the datasheet that was linked above.

    well, best to follow giuliomoro's advice (and the datasheet).. run the whole thing on 5v, except the pullup on the bela digital pin which should be 3.3v.

    i'm SO repeating what has already been said, haha

      dywen Where is
      P9.07 ?

      Here?

      yes

      dywen London (?)

      yes

      An interesting application mentioned in the datasheet is that if you need programmable trimming of the voltage into MTSA, you could use one of Bela's analog outs instead of a resistor divider.

        giuliomoro An interesting application mentioned in the datasheet is that if you need programmable trimming of the voltage into MTSA, you could use one of Bela's analog outs instead of a resistor divider.

        I know, it's with PWM, I believe. I chose the voltage dividers, because I have to figure out PWM with Pure Data... 😔

        London - cool, I'm listening to the Resonance fm Mixcloud now

        🎵

          dywen I know, it's with PWM, I believe. I chose the voltage dividers, because I have to figure out PWM with Pure Data... 😔

          No you wouldn't need PWM: that is just one of the available options. Figure 3-3 shows how to do it with a DAC: simply connect it through a 10k resistor.

            giuliomoro
            I know DAC as Digital to analog conversion in sound (sample rate 44100 hz, bit depth etc)
            I have to confess that DAC in this option I did not understand.
            --> SO if I connect to Bela with the Bela digital out and the 10K, what does Bela, hence Pure Data send?

            Bela's analog outs are a DAC, whose output is scaled between 0 and 5V (corresponding to the Pd range 0 to 1). So I was thinking that if for whatever reason you need the voltage on the pin to be adjustable programmatically (e.g.: different sensitivity over time, maybe in response to patch parameters/state), you could do so by connecting analog out 0 to MTSA and then send to it within Pd:

            [sig~ 0.5]
            |
            [dac~ 3] <<< corresponds to analogOut 0

            0.5 gives it 2.5V (scaling the 0..1 range to 0V..5V).

            Not sure if this is any useful for your case, I just thought it was a neat feature.

              giuliomoro hey, yes, it is a totally neat feature, this would give the switch chip potential theremin like features, gradual because it has to reset, but perhaps workable with bit detoriation for example.

              Super!

              Works like a charm. Soooooo nice to end my work morning (I have to take care of a lovely almost 4 year old, other parent starts working after lunch)

              🚸