rasteri Posted June 20, 2008 Report Share Posted June 20, 2008 Those LEDs are lighting up in the correct pattern. That means the encoder wheel itself and optical components must be fine. The signal must be getting to the PIC OK too.I reckon it must be a software problem - maybe try writing a simple test app? I have no experience with MB64E, for the scratch wheel I wrote my own C program. And I'm not using DINs for encoder inputs (shift registers don't switch fast enough for scratching...)Either that or you just have the encoder connected to the wrong input pins of the switch register, or something. (I guess it must require the encoder to be on a certain pair of pins) Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 20, 2008 Author Report Share Posted June 20, 2008 I reckon it must be a software problem - maybe try writing a simple test app?I`m out of any programming skills :-[Either that or you just have the encoder connected to the wrong input pins of the switch register, or something. (I guess it must require the encoder to be on a certain pair of pins)Well, I connected it on right pins, and it works from time to time but mostly not good - very unreliable. I didn`t know DINs are not fast enough for scratching. I don`t spin it to fast but maybe it is still too fast for shift registers as the resolution is much bigger than it is on common mechanical encoders. I`ll try to move it very slow and see is there any change. I hope I wan`t be forced to lover the disc resolution even more. :-\ Quote Link to comment Share on other sites More sharing options...
stryd_one Posted June 20, 2008 Report Share Posted June 20, 2008 resolution is much bigger than it is on common mechanical encoders. Oh that explains it. You could try increasing the SR update speed but... That's really something bet suited to your custom app. Quote Link to comment Share on other sites More sharing options...
cimo Posted June 20, 2008 Report Share Posted June 20, 2008 sasha why don t you take a video of when it DOESN T work? that could help troubleshootingSimone Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 20, 2008 Author Report Share Posted June 20, 2008 Not sure is it problem but very possibly is. I probably couldn`t increase the SR update speed without some negative effects to the rest of box.. Could I? I will be using regular mechanical encoders with this one and alots of buttons and LEDs. Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 20, 2008 Author Report Share Posted June 20, 2008 sasha why don t you take a video of when it DOESN T work? that could help troubleshootingSimoneIt is easy to show it using MIDIO128 as the LEDs are well visible, but on MB64E isn`t much to show. I`ll try too shoot it. But first, I have to make sure is the maybe too much for SRs. Quote Link to comment Share on other sites More sharing options...
/tilted/ Posted June 20, 2008 Report Share Posted June 20, 2008 I'd think you could speed up the DIN refresh without causing horror. - of course, I know nothing about this.The DIN/DOUT chains have a large parallel-serial conversion to do (p-s for DIN, s-p for DOUT), this would tend to lead itself to timing issues, but not for most applications of a midi-controller. Scratching might be the exception here.If you could free up two pins of your core module (perhaps J7 or J10), then you could get better timing for a faster moving encoder.-but again, I can't help with the code.good at plugging things in, not so good with the 1s and 0s. ;) Quote Link to comment Share on other sites More sharing options...
LX Posted June 20, 2008 Report Share Posted June 20, 2008 Hallo SashaI use MB64E program too, and I'm quite asembler ready programer ;)If you tell me exactly what is your configuration of hartware of optical ENC I can maybe sovle your problem.What is your output from optical ENC? like tipical ENC? 2xDIN? Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 21, 2008 Author Report Share Posted June 21, 2008 Hi there. Yes, the output is typical quadrature encoder and I`m probably doing to use 2x DINx4 but I could live with 1x DINx4. I could maybe use some other CORE pins for that jog. I`ll do some intensive testing today, and let you know the results. Thank for an offer for help mate. Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 24, 2008 Author Report Share Posted June 24, 2008 Just to let you know the last results. Encoder seams to work fine now, but only if connected on SR5 and not further SRs. (I didn`t tried SR1-SR4 as those are reserved for buttons by default)I`m not sure could it be that registers further in chain could be more problematic because of the shifting speed, or something else is problem. On mentioned second DINx4 I used to hooked mechanical encoders before, but never optical transistors. Maybe the problem could be that I don`t have 100nF caps on module but as I never experienced problems with it I just didn`t bother to solder it. I need to do some more testing to locate the problem, but for now I have positive results. :) Quote Link to comment Share on other sites More sharing options...
cimo Posted June 24, 2008 Report Share Posted June 24, 2008 Just to let you know the last results. Encoder seams to work fine now, but only if connected on SR5 and not further SRs. (I didn`t tried SR1-SR4 as those are reserved for buttons by default)are SR6-8 working with "normal" buttons? Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 24, 2008 Author Report Share Posted June 24, 2008 Yes, they work perfectly with buttons. ??? Quote Link to comment Share on other sites More sharing options...
cimo Posted June 24, 2008 Report Share Posted June 24, 2008 [incompetent assuming]Since you connect them to optotransistors and it s a DIY encoded wheel, it is possible that the transistors are "flickering" creating problem with the SRs.Try to use an higher debouncing value and see if anything change, or maybe using caps after the transistors.[/incompetent assuming] Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 24, 2008 Author Report Share Posted June 24, 2008 You are maybe right. I`ll blame opto transistors and try increase debounce. Thanks for the advice. But you must know flickering cannot have anything to do with my DIY wheel. Its precision, mechanical strength and stability is superb!!! 8) Quote Link to comment Share on other sites More sharing options...
stryd_one Posted June 24, 2008 Report Share Posted June 24, 2008 I think you'll need debouncing OFF - otherwise it's gonna skip some of the inputs if you turn the wheel fast enough.... Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 24, 2008 Author Report Share Posted June 24, 2008 I don`t need to set debouncing off with current 40 steps wheel. I tested it turning fast as I could (connected on SR5) without noticing any skipping. I used default MB64E setting.Has anybody ever needed to increase debouncing for common 24 steps mechanical encoders? Quote Link to comment Share on other sites More sharing options...
LX Posted June 25, 2008 Report Share Posted June 25, 2008 Hi SasaI have conected 30 steps mechanical encodes to MB64E and all is good. Speed or number of steps of encoders is no problem. I think that your problem is setting of program. In your video I saw blink only 2 LEDs and it looks that you have at pin of your enc assigned standard button function. Watch your mios_tables.inc if you have at MIOS_ENC_PIN_TABLE set this row:ENC_ENTRY 5, 0, MIOS_ENC_MODE_DETENTED ; (5 is the SR5 and 0 is assingned pins(0-1) of SR) position of this row in the ENC list is the nuber of ENC (when the row is first then ENC1)Look to main.asm too if you have set good LEDrings assigment. In your cause I think that : LEDRINGS_SR_ENC1_16_CATHODES_1 5LEDRINGS_SR_ENC1_16_CATHODES_2 6LEDRINGS_SR_ENC1_16_ANODES_1 7LEDRINGS_SR_ENC1_16_ANODES_2 8and on the bigin of main.asm - Number of connected encoders must not 0So this is all what I remember, try to check this sets and if you good know this setting sorry for this reply ;)B.R.LX Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 25, 2008 Author Report Share Posted June 25, 2008 ... I think that your problem is setting of program. In your video I saw blink only 2 LEDs and it looks that you have at pin of your enc assigned standard button function.Lad, I used MIDIO128 to align the opto elements. So, transistors are connected to button inputs on video. Coresponding LEDs show the sequence. So, 2 LEDs that you see isn`t part of LED ring. After I aligned the opto elements I uploaded MB64E and connected transistors to second DINx4 module which is by default assigned to encoders, so it is not problem in configuration. Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 25, 2008 Author Report Share Posted June 25, 2008 I just tested other SRs with Voti`s encoder again and all are working fine. As I have no idea what could be a problem, I`ll use 5th SR for optical encoder and rest of SRs for mechanical and problem solved. Well, not in the right sense but at least I can make it functioning. Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 25, 2008 Author Report Share Posted June 25, 2008 And, here are some winding testing results. I mounted the encoder onto sub-panel. Even 40 steps seams pretty sufficient, I wonder how cool would be 80 steps. ::) I accidentally damaged first, 80 steps wheel. Even I wan`t be ever doing any scratching I wanted to try it. Probably not very scratch friendly as the resolution is not so high but to me it felt great and pretty responsive. Very fun.I must sad I`m extremely satisfied how rigid this HDD motor based platform is. As I didn`t want disk endlessly spins, I made small spring and glued a piece of cloth that is usually used for that kind of thing (don`t know the English word)As you may see, I started with wide spring but as it was too strong I needed to grind it down untill I was satisfied with it`s resistance.Mechanism is simply mounted on the spacers and rotate with disc while cloth is aply some traction on the HDD motor body. Quadrature disc isn`t mounted so mechanism can be visible. Quote Link to comment Share on other sites More sharing options...
cimo Posted June 25, 2008 Report Share Posted June 25, 2008 ..watching in real time probably one of the world most refined DIY built midi controller, how cool is that? Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 25, 2008 Author Report Share Posted June 25, 2008 Man, it is still far from it. Alot of work still needs to be done. ;) Quote Link to comment Share on other sites More sharing options...
/tilted/ Posted June 26, 2008 Report Share Posted June 26, 2008 Man, it is still far from it. Alot of work still needs to be done. ;)I'm sure it feels that way from your end, (-I know we can be our own harshest critic) but it is amazing to watch from this end!It looks like you are literally gripping the track, like it's coming off vinyl!Fantastic work.HDD motor, huh?*/tilted/ looks around for more things to break... Quote Link to comment Share on other sites More sharing options...
Sasha Posted June 26, 2008 Author Report Share Posted June 26, 2008 HDD motor, huh?*/tilted/ looks around for more things to break...Yes, I used floppy spinner motor before for this kind of job but HDD motor is much better as it is smaller. Some are berret than others. This particular one have big wider area that was perfect for mounting spacers for quadrature ring on one side, and top disk on another. Bad thing is that none of motors from HDDs are easy to fix to the rotor. All have very shallow non metric threads, so some improvisation is necessary. Quote Link to comment Share on other sites More sharing options...
Sasha Posted July 1, 2008 Author Report Share Posted July 1, 2008 It is essential for my application to have detended encoders. So I would like to disable encoder quadroubling, so they are handled 1:1.I tried to find it in a code but without much luck. :-\ Anybody know how to do it? 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.