Axoloti and sensors


#28

there are basically two different methods to wire a soft pot to measure position, either you connect 5v and ground to the outer two connectors and measure at the middle point, or you do it this way:

http://www.ooooo.be/devices/ribbon4/ribbon4.htm
look under "better multi touch version" for the wiring.

hope this helps.


#29

I'm using the Sharp GP2Y0A21YK0F sensor, connected to 5V, GND and one of the analog GPIO pads. Sensor has a range of 10 to 80cm.

No need for special objects, but you may want to invert the signal in some cases because it makes more sense for controlling sound.

The sensor you are mentioning will probably work in the same way.


#30

Hi Xoanxil

I actually more or less followed my plans, using two ribbons, one for position and one for pressure.
For the position related ribbon, I wired it up as johannes explained in his post (that lokki linked to two posts up).
So I'm using 2 resistors and two analog gpio's. That way I have a low position and a high position (dual touch)
For the patching and scaling part, I'm having to put two math/exp objects in series to have a usable signal. And I still havn't found a way to tune scale of the two signals (for example if I connect the low and high signal to two different oscillators, they won't be in tune for the whole distance of the ribbon).
So I often use only one signal for the tuning, and the other for something else (cutoff, fm amount...)
I've also put a joystick on my ribbon box, that I use for octave up and down, and pitch bend. When I press down the joystick (it has a built in switch) it send the signal thru a quantizer object (in case I want to play in tune).

A funny thing, is that each time I do a gig somewhere using the ribbon synth, people come and ask me about the dual touch function. So it's quite a "unknown" function, even in the "DIY / synth / geek" community


#31

Thank for your answers,

I have made some trials some time ago with Arduino using only one resistor this way http://www.eerkmans.nl/wp-content/uploads/2014/03/meter_resist.png.

The result was that you get "0" when you dont touch the ribbon. If I dont use the resistor it generate unstable numbers.

Using the "better multi touch version" what will be the behaviour? I am waiting for my Axoloti board so I cannot make trials by myself now.

I have reading the article and it is great although I don´t understand the electronic working completely. I have only basic knowledges about and it is not too clear for me. Can you shed some light...?

Attending to the practical installation How do I have to connect everything?:

Ribbon has three pins, so:

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

and then the maths inside Axoloti patcher.

Another questions:

  • What volts conection I have to use, 3.3v or 5v?
  • Do you have some experience about what ressitences values is better to use?

Thanks janvantomme about using Sharp GP2Y0A60SZ too. Yes, it probably works but according the article it is not best way.


#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!