Axoloti and sensors


#32

Thank you very much mtyas. I am planning the same with two ribbons, possition and pressure.

So it would be something like that:

Ribbon GND --------> Axoloti GND
Pin A ----------------> resistor (100k?) -------> GPIO 1
Pin B ----------------> resistor (100k?) -------> GPIO 2

What resitor values are you using?

And then math inside the Axoloty patcher

Isn´t it?

I am not still understand completly how the conections for sensors works in Axoloty because I have not yet received it but I am anticipaiting the human interface.

Are there some place where I can find detailed information about all the conections? How many analogue sensors can I conect... I guess I have read someplace 16? Is that rigth?

I am also a bit confused about volt. I can see 5V and 3.3V conection on the board but someplace in the web informacion it said use 3.3V for not damage it. Are there more specific information about this?


#33

I don't think the resistor value is very important [Correction, it is important, see lokki's post], just make sure they are the same. I can't remember what I used, and I can't see inside the box. I think 10k or 100k should be fine.
I used a conductivity meter to find the right pins on the ribbon.

for the circuit, I followed this diagram.


You have pin1 --> ground
pin2 --> resistor and gpio1, resistors other side goes to VDD
pin3 --> resistor and gpio2, resistors other side goes to VDD

For information about inputs and outputs follow these links :
Axoloti in/output overview
General input output examples

For the voltage question, 5V is only used for usb power, just as you can power it by the barrel jack with any supply between 7V and 15V.
But all gpio's only function with 3.3V


Using body as resistor via gpio
#34

the resistors do matter. basically you are creating two voltage dividers, one is formed by r1 and ra and the other by r2 and rb. since you are creating a voltage divider with a fixed resistor you will not get the full scale of the adc reading. so depending on the value of r1 and r2 you will get a different range from the adc. here is the relevant part of johannes document:

What value do we take for R1 and R2 ?

There is no reason to take different values for R1 and R2, that would break symmetry.
The maximal voltage we can find on outA is when the ribbon is actuated at the rightmost position, meaning RA = RT. This voltage should not be too low, since the A/D converter measures the range from 0V (GND) to 5V (VDD) (VDD could also be a different voltage but that does not make any difference) is divided in, say, 1024 steps (for a 10-bit Analog-to-Digital converter). If the maximum voltage on outA is only 5% of VDD, we can measure only 51 different steps. This keeps us from using a very large resistance for R1 and R2.
On the other side, if we take a very small resistance for R1 and R2, half of the voltage travel will occur in a small zone of the ribbon near the terminals.

what resistance is your soft pot? you will have to choose resistors based on that. 100k seems to high.


#35

I understand. My softpot is this:

"the resistance linearly changes from 100Ohms to 10,000Ohms"

Thank you very much for your answers.


#36

Thanks lokki for correcting me concerning the resistors values. I guess the reason why I need to pass my signal through two math/exp objects is because I'm using too small resistances then. I'll open up my box and try and change them to find out


#37

I am trying https://www.pololu.com/product/2474 Pololu Carrier with Sharp GP2Y0A60SZLF

Connected up just as you have it, on the 5V line , but I'm not really getting much mojo at all.... I had it working with an Arudino sketch, to test it out and try to get a feel for its sensor curve, but its not really doing much when connected to the Axoloti.


Using 5V peripherals on 3.3V axoloti
#38

Can you verify with a multimeter (measuring VDC) if +5V is present on the polulu breakout? And can you observe a changing voltage output on the polulu breakout? Is "EN" connected to something (it's not needed)?


#39

Sorry I making a mistake I wrongly assumed the +5V and GND was repeated down those pads, but it seems the +5V (measured on mine at 4.94V ) is only available on the two pads labelled as such, not the row of pads below the labelled connections.


#40

Thanks again lokki for explaining the importance of the resistance values using the softpot.
I opened up my box, and found I was using 220ohm, so I changed them to 10k and the scaling is so much better (nearly linear) . Amazing !


#41

cool! i had to learn it as well :slight_smile:


#42

Hi,

Maybe this is a silly question but I apreaciate your help.

I am going to conect this accelerometor to axoloti (https://www.sparkfun.com/products/9269) .

It is analog and very similar, or even the same, to this other used here (http://www.axoloti.com/examples/general-input-and-output/).

Why is it conected VDD instead VDA in this schematic? The accelerometer says VCC ¿?


#43

Connect VCC of the accelerometer to VDDA of Axoloti, GND to GND, and X,Y,Z to any of the inputs select-able in the gpio/in/analog objects and all will be fine.


#44

Thanks johannes. I will use VDDA...


#45

Another newbie question... Can I use any ground pin regardless the voltage pin I use? I mean, can I use the GND closer to VDD for analog sensors? Does it make any difference?


#46

All GND pads are connected, does not make a difference.


#47

Thanks again Johannes!


#48

Hi again,

Finally I am connecting the ribbons and I am trying the double touch option. When I don´t touch anything one gpio is around 0 but the other is around 31.

If I play only with one finger one rise up from aroud 0 to the nay value I am tpuching but the other rise down from 31 less ratio than the first.

If I play with two fingers the first has the same behaivour and the other move fine two less points behind the first.

My question is how to avoid the second one to produce that 31 when it is not touched or rise down when only use one finger. I think it is not very musically useful but maybe you have some solution or trick that I cannot see.

Thanks in advance


#49

which wiring exactly are you using? the one in johannes's post?


#50

pin1 --> VDDA ( I invert this to get 0 when not touched)

pin2 --> resistor and gpio1, resistors other side goes to GROUND = 0 finger/around 0, 1 finger/any value, 2 fingers/any value

pin3 --> resistor and gpio2, resistors other side goes to GROUND = 0 finger/around 31, 1 finger/rise down, 2 fingers/any value

The problem is when pin 2 is not touched or using only one finger.


#51

if you go from left to right when you look at the soft pot and enumerate the pins 1, 2,3. it is pin 2 that should be grounded, pin one should get a vdd through a resistor, pin 3 as well. pin 1 and pin 3 are also directly connected to the two gpios (not through the resistors). both gpios will read high (max value) when not pressed, that is to expected with this method.

see attached pic for a schematic (from a few posts above):

https://sebiik.github.io/community.axoloti.com.backup/uploads/default/original/2X/f/fff82e99266465e76a9325b293e5608e3d6b1f31.png

does this clear thing up?