Jump to content

[solved] Encoder problem and other "scratch box" issues


Simson91
 Share

Recommended Posts

OK, I think I made an error in the schematic. I just checked my circuit and I'm using a 360K resistor, not 47K. I don't know where I got the 47K value from...

Also try adjusting the TOUCHSENSOR_DELAY at the top of the code, if that doesn't work. Try a few different values.

Let us know how you get on.

Link to comment
Share on other sites

  • Replies 52
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hey, I just built in the 360K resistor but I still don't get any output .. there is still no ( well 0.01V) voltage on RD4 or J14...

I'll to express how I connected everything:

RD1 (4.9V) ----360K-----RD4

                              l

                              l

                      wire to touch

I hope you guys kind of see how it is, its weird because there realy is not much that could possibly go wrong.

Thanks

Simon

Link to comment
Share on other sites

Bugger. I think you just stumbled upon a second error in my schematic.

The wire to touch should be on the other side of the resistor. i.e:

RD1 (4.9V) ----360K-----RD4

                  l

                  l

          wire to touch

In my defence, I didn't even know what a capacitive touch sensor was until I started this project (talk about the blind leading the blind)

AND I'VE JUST NOTICED ANOTHER PROBLEM. RD1 should NOT be at 4.9v.

I just noticed on the core module there's a 10K pullup resistor on RD1, that's probably what's causing it. Remove R9 from the core module for now (assuming you're using a "real" core module and not my hacked up variant).

Please accept my apologies for the crappy schematics. I applaud your dedication - I'd probably have given up by now.

Link to comment
Share on other sites

:D Thanks,all my respect goes to you because you did it without an instruction and I'm just using the stuff you put online, so asking some questions or stumbling over some little errors are things I'll have to go through other wise it would be boring. ::)

You were right, I had a 10k pullup resistor on RD1, so I'm gonna remove that whole part now (so no 5V at RD1 either right?) and will be back with some (hopefully) good news soon. :) 

Simon

Link to comment
Share on other sites

Now I don't have any voltage in there. RD1 shows barley 0.03 and RD4 0V ... Do I have to put the 5V anywhere in the circuit or should it come from one of the pins?

Another question: I'm still using the first code that you uploaded, does it even include the touch sensor? because I noticed that you posted it before you came out with the touch sensor capability. 

Link to comment
Share on other sites

Yes, you'll need the latest code. Finally a problem that's not my fault :P (although if you had used the correct code from the start it still wouldn't have worked, because of my earlier mistakes)

Get the latest version here : http://www.midibox.org/forum/index.php/topic,11167.msg97570.html#msg97570

You'll need to uncomment the USE_ADC_ENCODER line, since you're using pins 3&4. I.e. change :

//#define USE_ADC_ENCODER
to
#define USE_ADC_ENCODER

Even when you use the latest version, it'll still hardly show any voltage on a multimeter, that's normal - it sends a VERY brief voltage spike from RD4 every few milliseconds. If the voltage is still there on RD1 a little while later, then the sensor isn't being touched. That's how a capacitive touch sensor works, apparantly.

Link to comment
Share on other sites

Thats was indeed my fault.

Somehow I got a prblem compiling the code:

Linking Project

error: missing definition for symbol "_CVRCONbits", required by "_output\main.o"

error: missing definition for symbol "_CVRCON", required by "_output\main.o"

error: missing definition for symbol "_CMCONbits", required by "_output\main.o"

I didn't expect that. Maybe its more simple if you or someone else could send me the .hex file?

Thanks

Simon

Link to comment
Share on other sites

Hey rasteri,

I really have to apologize for that, sorry. So I uncomment the use adc encoder lines but then I didn't save it and tried to compile it. Anyways,

it works, I compiled the code umploaded it and the touch sensor officially works, thanks!

There is one thing though, the encoder doesn't work anymore. Maybe I forgot to change something in the voltage for encoder comparators?

I guess it can't be too hard to fix since it worked with the first release of your code.

I was really happy to see the touch sensor work though, thanks so much for going over everything with me again.

Simon 

Link to comment
Share on other sites

Just for test purposes I ordered the Numark CP-Pro as used in the whole Numark DXM series. It's probaly not a very good fader but someone told me its underrated. It will work for me since I'm not really a scratch pro. I'll get it tonight :)

/edit: Of course I will get a better one if everything works fine and if it would improve my sound :)

Link to comment
Share on other sites

I've used the dxmpro, the fader seems pretty good.

I dunno how easy it'll be to interface though. It doesn't seem to be anything exotic like optical or magnetic, but it comes with a 5-pin connector, so there might be something weird going on. You could probably just desolder the entire bottom PCB though, check the picture.

3418_dxmpro_cf2_big_jpgd13b7551d48a05c28

Link to comment
Share on other sites

I just connected everything like you said above, if I don't ground pin2 it goes loco when I touch the case of the fader or do something else like spin the wheel. If I ground pin2 like it was before (because otherwise it would go crazy) I don't get any signal (then there is no voltage on the wiper either. Maybe it needs to be grounded through a resistor like the photodiodes?

:)

Link to comment
Share on other sites

Here's how I think it should be wired up :

FADER - 1(wiper)       2(fixed)          3(fixed)
           |              |                 |
           |              |                 |
        PIC pin2         +5v               GND

Is that what you have?

If so, what voltage do you get on the wiper pin? (it should be between 0v and 5v depending on the position of the fader knob).

And no, there shouldn't need to be a resistor to ground. The fader IS a resistor to ground.

More stuff to try - while moving the fader, measure the resistance between pins 1+2. Then between pins 1+3. Then between pins 2+3. Tell me what range of values you get for each.

EDIT : BTW, That's pins 1,2,3 on the fader, not the PIC...

Link to comment
Share on other sites

Some weird stuff: The voltage on the two fixed points is 5V like it should be I guess but on the wiper the voltage is 0,3V and it doesn't change when I move the fader.  ??? ???

resistance between 1+2 = not connected (too big to measure)

resistance between 1+3 = not connected??

resistance between 2+3 = 50k

the problem is I don't see any changes when I move the fader, that is very strange to me.

EDIT measured the resistance between 1+3 again (my multimeter seemed to go crazy) and got no connection either. And the one between 2+3 is 50k

...man this thing got me nuts  ::)

Link to comment
Share on other sites

Or maybe a defective multimeter... or wiring... where exactly are you taking the measurements from?

Maybe I can save you some time figuring this out, by pointing out that it's (probably) a logarithmic curve (it's an audio fader after all) and as such will not work properly, if at all, with a midibox.

Link to comment
Share on other sites

I'll probaly send this fader back. I could open it but I would loose my warranty. I'm not sure if I should try a different one or get the same one again to see if the problem was this fader.

Oh and I took the measurements directly on the pins of the fader.

!EDIT: All right, I opened the fader and I was lucky, one of the little wipers was like a millimeter from the contact, so I bend it down aand...

It works perfectly. I connected everything and my crossfader is now up and running in traktor. Thanks for all your help rasteri! I'll try to get some conductive paint to get my vinyl to work as the touch sensor and my box is gonna be completed.

EDIT: Picture of "beta wooden box" :)

Thanks again

Simon

3424_Foto_23_jpg825d25391a1acbfea5cd13fa

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...