Jump to content

60mm faders for the mb64e without an ain module


ssp
 Share

Recommended Posts

im going around and around now and im not sure if someone has said yes i can in chat or no, or if i have been pointed by someone to a bit of info that says yes or no.

to put it plain and simple, im going to build a replica bpm unit using the mb64e however i also need 7 non motorised faders as well.

now i dont want to have to use an ain module so can i connect 7x60mm linear faders to the din4x board along with all the other encoders and buttons? if so what part of the code would i need to change.

i have spent the best part of 2 days going round and round reading and reading as much as i can  drawing things down and trying to figure this one out on my own, but the only thing im stuck on now is the 7 faders.

can someone tell me once and for all if i can use them on the din board and relevent procedure to the code if theres a code switch to use in the asm.

i have figured out hardware/ modules/ connections/ and all the other bits but its just these damn faders im lost on, i have found the infinity faders as used by behringer and digidesign etc and if need be i will have to stump up for those if i have to and they will work with the mb64e.

thanks again guys.

Link to comment
Share on other sites

Hey Y'all. (That means "everyone" in Southern-Speak)

Here's a link to the fader he wants to use.

It is NOT a simple fader..

http://www.infiniumtechnologies.com/downloads/20090617_2/download

It appears to have Analog, SPI, and UART options.

MIOS / MB64E Expert opinions requested.

Link to comment
Share on other sites

lyle i had a msg from thorsten, the answer was no to these. i guess im still looking for the definative answer.

sorry im a little bit pi553d off tonight as its been a bad day, meds are making me puke and im still trying to figure a few thngs out and trying to learn asm stuff

and as thorsten pointed out to me yes you can use the 8 motorfaders and 16 enc set up but i dont need motorfaders i just want 7 linear faders to act as encoders if possible running to the din board and not an ain board.

i think i need time out for a while now.

Link to comment
Share on other sites

to try something different, to break the mold and learn something new that maybe hasnt been done before. experimentation is the key, i just want to learn again, re-learn what i have lost, and trust me its heartbreaking for me not to remember things so easily any more.

i had a msg from thorsten whos taken the time out to get in touch and he has offered me a solution, thanks thorsten.

Hi Simon,

Faders are "analog signal sources" which have to be read with the internal ADC of the PIC. There is no way to connect them to a DINX4 module, as it can only scan digital sources like buttons or encoders (to say it on the hard way: this is absolutely nonsense - therefore you won't find documentation about such an option )

There is no need to use an AIN module, since you don't plan to connect more than 8 faders - accordingly multiplexing isn't required, just connect the fader directly to J5, let multiplexing and motorfader option disabled.

Code:

#define DEFAULT_NUMBER_AIN              8

#define DEFAULT_ENABLE_AIN_MUX          0

#define DEFAULT_ENABLE_MOTORDRIVER      0

Note: all unusued analog inputs (in your case: J5.A7 if faders are connected to J5.A0..A6) have to be connected to ground, otherwise the application will send out random values.

It is recommented to set DEFAULT_NUMBER_AIN to a value which is a power of 2 (1, 2, 4, 8, 16, 32 or 64)

You could already make some experiments with this option to get a better understanding, as you already own a core module. E.g., set DEFAULT_NUMBER_AIN to 1 and connect a trimpot between J5.Vs/Vd/A0

Thereafter set DEFAULT_NUMBER_AIN to 2, let J5.A1 unconnected, put your finger over A1 - you should see some random CC values. Clamp it to ground and the random values won't be sent (stable voltage). Now connect a second trimpot to J5.A1... etc

Link to comment
Share on other sites

OK, sorry you're feeling sick..

I'll dump a bunch of information here for you to look over later if you feel better.

Just in case you didn't read it already, there's a pretty good detail on the difference between an encoder and a pot in the WIKI FAQ. I don't know how to link it, but the question header is:

"What's the difference between potentiometers, sliders, motor faders and encoders?"

The parts of the difference that matter to you are:

Encoders connect to 2 DIN channels, pots and sliders connect to 1 AIN channel.

Encoders are "relative", so you don't need to motorize them if the setting is changed. but

pots are "absolute". so if they're in the wrong position, software will have to adjust things.

That last part is important to understand.. If the fader is at zero, but the setting is really at

50%, what happens when you move the fader? Does it "JUMP" down to 1, or does it wait for the fader to reach 50% before anything changes? MIOS has some choices to help with this, but each choice is a different compromise. Unless that are motorfaders. then MIOS will just move the slider to whatever position it needs it moved to.

Finally, getting back to the faders you have chosen:

They offer AOUT only if you buy them with that option. This is the ONLY option that MIOS is built to handle already.. But I looked further, and there is one little problem. These faders run on 3.3 Volts, and the AOUT will swing from 0 to 3.3 volts as you slide the thing around. MIOS normally expects 0 to 5 volts, so you'll need to "scale" those inputs in software. (could also be done in hardware, 1 op-amp per slider)

The SPI option is there too, in all models, It is "absolute", telling you the exact position of the slider with 8 bits of accuracy (256 steps). It is not "relative" like rotary encoders are, so even if you adapt SPI into encoder signals, you'll still have a problem with absolute/relative conversion. I don't see any way around that.

The UART option is not documented in the datasheet, but I'll guess it's as absolute as the SPI is.

So on to the bottom line:

You can make this thing into an analog slider (pot) by ordering the sliders with the analog option, then adding a op-amp and a few resistors to scale the voltage to 0-5 volts. These signals will work great with an AIN module, and MIOS will treat it like any other pot/slider. You may be able to skip the op-amps and scale it in software, I can't say for sure. (I know how to trick the PIC into it also, but I'm getting off-track)

You can challenge yourself to make an SPI to quadrature adapters with small PIC chips, and convert the voltage from 3.3 to 5 in the same step. But it won't be quite right, because MIOS assumes that all encoders are incremental, and these sliders will always be absolute.

You can challenge yourself to make UART to quadrature adapters with small PIC chips, and convert the voltage from 3.3 to 5 in the same step. But it won't be quite right, because MIOS assumes that all encoders are incremental, and these sliders will always be absolute.

That's all I can offer you. It' not what you wanted, but it's all out there.

I really hope that others will correct anything I have said wrong.

Feel Better,

LyleHaze

Link to comment
Share on other sites

OK, just dumping more information here.

I hope you get to feeling better soon.

We recently discovered that the faders you selected have an option for analog output, but it will be from 0 to 3.3 volts only. Most MIDIBox inputs span 0 to 5 volts.

Just as a reminder: Your sliders only support analog out if you order them with that option.

If you choose this path, I can think of three different ways to manage the voltage difference. Which method you choose depends on how you want to attack this problem.

The math way:

Reading a 3.3 volt signal into a 5 volt analog input will work, but the numbers will be a bit low.

If you multiply the result by about 1.51515, you'll get the "corrected" result. This is the easiest way, but you get a lower resolution..

Advantage: Easiest no-parts solution

Disadvantage: lower resolution, requires software changes.

The PIC hack way:

If the ONLY analog signals you are reading are from these faders, AND IF you are willing to sacrifice AN3 (PIC pin 5) you can: Connect AN3, (pin 5) to the 3.3 Volt supply that your fader is using, and add code to set Bit 0 of the ADCON1 register. This will change all analog inputs to be 0 to 3.3 volts. But you lose the use of AN3. Please check with Thorsten to see if this will cause problems, but I suspect it's the easiest fix.

Advantage:Simplest solution, especially for multiple faders. No "extra" parts, since you needed 3.3 volts to power the fader anyway.

Disadvantage: Cannot use 5 volt analog devices on this core, and you lose 1 analog input for reference.

The Op-Amp way:

Find any general-purpose op-amp that is billed as "rail-to-rail operation" that will work from 5 volts.

Build a simple circuit from this datasheet: http://www.national.com/an/AN/AN-31.pdf

The second circuit on the page is called "Non-Inverting Amplifier". That's the one you want.

Use 95.3K resistor for R1, and 47.5K resistor for R2. One circuit for each fader.

Advantage: No modifications to MIOS or Core.

Disadvantage: a few more chips, a bit more stuff to build.

As always, I'm open to discuss these options.

Have Fun,

LyleHaze

Link to comment
Share on other sites

ok i have found the relative sections in the asm file that thorsten pointed me to, and i have edited them. do i now need to compile that to hex or does the hex file use that asm in its upload? im off to have a read now and see what i can learn on this.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...