rasteri Posted August 11, 2008 Report Share Posted August 11, 2008 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. Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 11, 2008 Author Report Share Posted August 11, 2008 All right, I don't have a 360K resistor laying around, so I'll get one tomorrow (reichelt is like 10 min. from here :)).Its already so much fun to play around with that thing, can't wait for my crossfader to arrive.I'll probaly take a video the next days... Simon Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 13, 2008 Author Report Share Posted August 13, 2008 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 touchI hope you guys kind of see how it is, its weird because there realy is not much that could possibly go wrong. ThanksSimon Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 13, 2008 Report Share Posted August 13, 2008 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 touchIn 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. Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 13, 2008 Author Report Share Posted August 13, 2008 :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 Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 13, 2008 Author Report Share Posted August 13, 2008 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. Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 13, 2008 Report Share Posted August 13, 2008 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#msg97570You'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_ENCODEREven 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. Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 13, 2008 Author Report Share Posted August 13, 2008 Thats was indeed my fault. Somehow I got a prblem compiling the code:Linking Projecterror: 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 Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 13, 2008 Report Share Posted August 13, 2008 Are you SURE you remembered to uncomment the USE_ADC_ENCODER line in main.c? It shouldn't be using CVRCON or CMCON if you have...I can send you a hex when I get home from work. I'll be about 2 hours. Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 13, 2008 Author Report Share Posted August 13, 2008 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 Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 13, 2008 Report Share Posted August 13, 2008 And we're back to it being my fault again! :PI enclose the latest version of the code. This should work.(ADC_THRESHOLD should have been set to 90, not 0x90...)main.c Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 13, 2008 Report Share Posted August 13, 2008 Oh and remember to uncomment USE_ADC_ENCODER again :P Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 14, 2008 Author Report Share Posted August 14, 2008 ;D ;D ;DWORKS perfectly, all right today my crossfader should be here and then I'll post a video if anyone is interested. Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 14, 2008 Report Share Posted August 14, 2008 yay :D Please post videos.What fader you planning to install? Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 14, 2008 Author Report Share Posted August 14, 2008 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 :) Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 14, 2008 Report Share Posted August 14, 2008 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. Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 14, 2008 Author Report Share Posted August 14, 2008 Yeah thats what I'll probaly do. According to this picture I thought I'd be pretty easy to use. Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 14, 2008 Author Report Share Posted August 14, 2008 Does someone know how to connect these 3 pins to my module? ::) I thought it be easy but after thinking about it a while I'm not too sure anymore. Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 14, 2008 Report Share Posted August 14, 2008 On your diagram, the leftmost pin is the wiper, and the middle and rightmost pins are the fixed contacts.Wire the wiper pin to pin2 of the pic, and the fixed pins to +5v and ground. Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 14, 2008 Author Report Share Posted August 14, 2008 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? :) Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 14, 2008 Report Share Posted August 14, 2008 Here's how I think it should be wired up :FADER - 1(wiper) 2(fixed) 3(fixed) | | | | | | PIC pin2 +5v GNDIs 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... Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 14, 2008 Author Report Share Posted August 14, 2008 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 = 50kthe 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 ::) Quote Link to comment Share on other sites More sharing options...
rasteri Posted August 14, 2008 Report Share Posted August 14, 2008 I dunno man, maybe you have a defective fader? If you can take it apart, make sure the little prongs are touching the conductive tracks. Quote Link to comment Share on other sites More sharing options...
stryd_one Posted August 15, 2008 Report Share Posted August 15, 2008 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. Quote Link to comment Share on other sites More sharing options...
Simson91 Posted August 15, 2008 Author Report Share Posted August 15, 2008 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 againSimon Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.