TK.

MIDIbox KB

182 posts in this topic

I have the original schematic here. There is a little circuit, which amplifies the aftertouch signal and invert it afterwards. This circuit needs 15V. So I don't think, that 3,3V will damage the device...

 

So, I should use a smaller resistor?

Share this post


Link to post
Share on other sites

A smaller resistor is necessary to increase the range over which it outputs...

 

I am going to suggest that you replace the 1k pullup with an 82R (Ohm) resistor which is connected to 5V rather than 3.3V 

This will yield an output that ranges from close to 0V to a maximum of slightly under but close to 3.3V at the input of the ADC, A0.

 

The current will be 22mA to 60mA which may be a little on the high side (300mW in the pullup resistor will get hot if you hold the strip down for long) Also I don't know the current/power rating of the device.

This problem (if it is a problem) can be overcome by adding an op amp to the circuit with a higher pullup.

 

The calculations are based on 150R with the device not pressed. I can post the calculations if you want.

 

 

 

 

Share this post


Link to post
Share on other sites

Do I need to "enable" 5V on J5 anywhere or should I use the 5V of a J8/9 instead?

Share this post


Link to post
Share on other sites

Just connect the pullup to 5V where it is conveniently found.

Beware though, that the device may get damaged by the (large?) current with this method. I have no data on it.

Maybe better to use and op-amp and less current through the device.  

Share this post


Link to post
Share on other sites

Hey!

I don't have detailed informations too. Just the schematic, but it  says nothing about the current...

What do I have to do exactly by using an op-amp? Do you have a little schematic for that?

Share this post


Link to post
Share on other sites

Can you take a photo (or scan) and post the schematic?

 

Yes, there is a simple circuit and some calculations, but I'd like to see the circuit that you have first, thanks. 

Edited by Duggle

Share this post


Link to post
Share on other sites

Hi All

 

I would like to midifi a Wurlitzer electronic piano, while not affecting the current sound and action.

 

Would it be possible to use the these;

 

 http://za.mouser.com/new/vishaysemiconductors/vishay-TCxT1350X01-optical-sensors/

 

with MBNG?

 

These switches can measure speed also, would this allow me to calculate velocity on the MBNG?

 

I'm looking for a contactless solution, if there are other options to accomplish the same then I would love your input.

 

Regards

Share this post


Link to post
Share on other sites

In theory this should be possible to measure the velocity with these sensors, but it would require (some small and easy to integrate) software changes. The internal LEDs of the opto sensors have to be permanently activated, which means that time multiplexing won't work.

 

Instead, each sensor output has to be connected to a dedicated DIN input. No DOUTs required.

 

I would strongly recommend you to try it out with one or three 78-TCUT1350X01 (double sensors) before buying the complete set for your piano. I can help you with the software extension (because it's easy to test at my side, and could also be useful for other projects)

 

Best Regards, Thorsten.

Share this post


Link to post
Share on other sites
Can you take a photo (or scan) and post the schematic?

 

Yes, there is a simple circuit and some calculations, but I'd like to see the circuit that you have first, thanks. 

 

Hey,

 

of course, here is the excerpt of the schematic (bottom).

 

@TK: That sounds interesting. I'll order a few and give you feedback as soon as they are arrived.

post-10331-0-36315000-1383039910_thumb.j

Share this post


Link to post
Share on other sites

Thanks for posting the schematic.

The positive input of the op amp is at 0V and the negative has a pull-down of 15k to -15V. This means there is only about 1mA flowing through the aftertouch sensor.

 

My suggestion is to use the 1k pull-up to 5V.

Based on your measurements from before this will produce a signal of between about 0.05 to 0.7V across the sensor.

 

This the circuit you need plus a spreadsheet to calculate the resistors, plus a couple of worked examples.

The purpose of the circuit is to shift and amplify the signal to get the best possible voltage range for the ADC. A single op-amp of an LM324 plus a few resistors and a trimpot is all that is needed. 

Change the blue values (ViFS,ViZS) which represent the minimum and maximum input voltages to the voltages you measure with the sensor connected between 0V and a 1k resistor tied to 5V.

 

Let me know if anything about this is not clear, I can help.

Share this post


Link to post
Share on other sites

Hey!

I measured 0,09V and 0,6V.

I put it in your spreadsheet and I get 4900R as a result. So I just put the parts like in the blog entry example together and set the trimpot to 4900R. 

 

3.3V on the schematic goes to 3.3V anywhere on the core.

 

5V on the schematic goes to 5V anywhere on the core.

"Wiper" on the schematic goes to one side of the sensor.
The other side is connected to ground.
 
Is that correct?
 
 
//edit: But why the second resistor (Rg1AMod) in the mod-wheel example?
Edited by FantomXR

Share this post


Link to post
Share on other sites

Hi, I wasn't that clear.

The circuit you should make is like the one labelled "App Note cct" on the schematic rather than the exact circuit of the other two examples.

 

So the values of R1, Rg1,Rg2, and Rf need to be defined.

 

I neglected to mention that Rf and Rg2 get entered to the spreadsheet (by the designer) and Rg1 and R1 get calculated by the spreadsheet.

It makes sense therefore to put a preferred, available value into the cells for Rf and Rg2.

We can use a trimpot (using the wiper plus one end) for R1, and closest available value Rg1.

 

I tried by putting 1M for Rf, and 10k for Rg2.

This yielded  374k for R1 and 173k for Rg1.

In practice, I would make R1 a 1M or 500k trimpot, and Rg1 180k.

 

You can try different values in the spreadsheet for Rf and Rg2 but I think it is best if all values end up less than or equal to 1M. 

 

 

Share this post


Link to post
Share on other sites

Ah, okay! Now it's getting clear.

 

To summarize the result:

Rf = 1M

Rg1 = 180k

Rg2 = 10k

R1 = 500k trimpot

 

Correct? ;)

Share this post


Link to post
Share on other sites

Yes.

Remember the power rails for the LM324, that's 0V and 5V. 

A plug type breadboard is good to test the circuit before soldering the final hardware.




//edit: But why the second resistor (Rg1AMod) in the mod-wheel example?

This is just an easy way of getting 50k, because 100k was already in the circuit, just use 2 in parallel for the 50k!

Share this post


Link to post
Share on other sites

I bought the parts today and put them together.

Please see attachment.

 

One side of the sensor goes to the LM, the other one to GND on the core.

I double checked the connections on the board...

With this circuit connected to the core I measure 0,75V between GND and wiper of the pot and 0,62V between GND and pin 2 of the LM. But I measure nothing between GND and pin 1. Even if I press and hold a key.

 

Do you see a mistake?

 

post-10331-0-62291100-1383263013_thumb.j

Share this post


Link to post
Share on other sites

First of all, quickly, do you have a 1k pullup to 5V on pin3 of the LM324?

Does this pin vary from 0.09V to 0.60V as you press the sensor?

 

edit: Also where is Rg2 (10k)?

Edited by Duggle

Share this post


Link to post
Share on other sites

I don't have the 1k pullup. I will add this.

 

I was not sure, if Rg2 is still necessary, because I use a trim pot. I can't see Rg2 in your examples too. But I can add this anyway.

Share this post


Link to post
Share on other sites
 

The circuit you should make is like the one labelled "App Note cct" on the schematic rather than the exact circuit of the other two examples.

 

Let me know if this is not clear.

Share this post


Link to post
Share on other sites

I added the pull up at first.

On pin 3 I measure 0,61V depressed and 0,09V pressed.

 

I will add the 10k between pin of trimpot and GND.

Share this post


Link to post
Share on other sites

Yes, your're on the right track. Make sure you wire the trimpot (R1) as a variable resistor (wiper and one end are used).

Share this post


Link to post
Share on other sites

okay, I wired the 10k to GND. Now I measure 0,51V depressed and 0,01V pressed.

But I connected the pot like a pot.... I change this... wait a second ;)

 

//edit: Okay, I changed the wiring. One side of the pot goes to 3.3V, the wiper goes with 180k to LM and with 10k tied to ground. I measure 0,61V and 0,08V between GND and pin 3. I'm wondering what we want to reach or what do we want to get. I'm also not sure, what sense the trimpot has. By changing the trimpot, the voltages stay the same.

 

Thanks for your help!

Edited by FantomXR

Share this post


Link to post
Share on other sites

In the meanwhile I checked with MIOS Studio and it's working really well now!! Thank you so much... that is awesome! :)

But it seems that it makes no difference on which value I put the trimpot. It's now full turned "on" so 500k and it's working fine like this.

Share this post


Link to post
Share on other sites

Glad to see you're making progress.

What is the voltage range on pin 1 of the LM324?

Share this post


Link to post
Share on other sites

Ah, got it! I adjusted the trimpot. Now I have 3.3V on pin 1 depressed and 0V when pressed! I think, this is how it should be, right?

Share this post


Link to post
Share on other sites

Wonderful!

The feedback Rf determines the gain, this changes you're range from about 0.55V to 3.3V, and the part of the network of around R1 determines the offset (which is very small as your minimum 0.05V is very close to 0V anyway). So if your're seeing very close to 0V up to 3.3V as you press the sensor through it's range, then it works as designed!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now