0

For those who can't find the bank/mode rotary encoders
Moderators: altitude, adafruit_support_bill, adafruit, phono, hamburgers

Please be positive and constructive with your questions and comments.

For those who can't find the bank/mode rotary encoders

by Hazard on Mon Sep 29, 2008 5:19 pm

Hello!
I started making my own home-built x0xb0x last year in November. On this last year I might actually only worked on it maybe once in a blue moon.
I still haven't found some parts or alternatives, like the potentiometers and the absolute encoders for bank/mode selectors.
I also need to make an enclosure (I guess I'll build it with wood) and solder the final leds.

Since I haven't found an affordable alternative for the rotary selectors, I came up with the idea of making a digital selector.

I am using one microcontroller, one rotary encoder+switch (like the tempo) and one 16x2 LCD.
The idea is to select the bank/mode with the rotary encoders, going back and forward in the options. When you press the encoder, the selector will switch between bank and mode. In the LCD it will be displayed all the time, the bank, mode and selector(bank/mode active) information.

The microcontroller is the ATmega48. It has enough pins for driving the LCD in 4bit mode, read the rotary encoder and send the information to the x0xb0x.
The x0xb0x has one signal that enables the respective selector encoders which is going to read. So in the microcontroller we have to emulate this behaviour. When the microcontroller pin senses a change in the x0x signal, it checks which information the x0x wants, bank or mode. The microcontroller then proceeds to put the value in the respective pins.

So, this is how we connect the pins of the microcontroller to the x0xb0x, LCD and encoder:

Encoder: A-PD0, B-PD1, Sw-PD2

LCD:
DataPins-PortD
Enable-PB6
RS-PB5
R/W-PB7

x0x:
Selector signal from x0x- PB4
Bank selector- PB0..3
Mode selector- PC0..3

You can donwload the schematic and the quick pcb layout here with the code and other resources. I have no way to check if it will fit in the enclosure with this pcb.
The code is not organized and not properly commented. It is commented half english e(and) meio(half) português(portuguese) :D

I think this all works, but the code need to be tidied up (like: put lcd strings in prog mem, check why appears jiberish in the lcd, and much more)

I'll post a video of it working later.

For those who can't find an LCD and a rotary encoder. The same approach can be used with 4 buttons(up down for bank and mode selector) and led displays or 7-segment displays. :)
Last edited by Hazard on Mon Nov 17, 2008 6:40 pm, edited 1 time in total.
Image
Hazard
 
Posts: 196
Joined: Tue Oct 30, 2007 7:27 am
Location: Portugal

by eil on Mon Sep 29, 2008 5:38 pm

Awesome. I really like the idea and hope to implement it in my x0x. I'll have to take a look at the LCD specs to see if it can be shoehorned into a stock x0x enclosure.

Of course, a different front panel will be needed, or perhaps an overlay.
eil
 
Posts: 440
Joined: Sun Aug 31, 2008 11:09 pm

by loydmilligan on Mon Sep 29, 2008 6:09 pm

I am going to mess around with this a little also. It seems like it might be a better idea to connect the lcd to the x0x micro. As long as you are adding an lcd you might as well use it as much as possible. Off the top of my head it could display actual tempo, current octave/note names, maybe it could display midi information, etc. Also, you could probably get away with just one encoder total (ie use this for tempo as well). which means you could implement this in the x0x code only adding an lcd... I think I am a little ahead of myself, hehe.

good idea though.
loydmilligan
 
Posts: 79
Joined: Fri Feb 29, 2008 10:58 pm

by Hazard on Mon Sep 29, 2008 6:24 pm

Here is the video: http://www.youtube.com/watch?v=ckw6V2XzhiM
I also though of making it display the tempo, counting the beat from the tempo led.
As far as connecting an LCD to the x0x microcontroller, I don't know if it is possible.. Maybe using a serial LCD by SPI.
Image
Hazard
 
Posts: 196
Joined: Tue Oct 30, 2007 7:27 am
Location: Portugal

Re: For those who can't find the bank/mode rotary encoders

by Sasha on Sun Oct 26, 2008 2:58 pm

Hazard, what are you doing is just great! Selfsourcing parts for x0xb0x makes sense only for those who lives in US. For rest of the world it is cheaper to buy real 303. Well, not really but you get my point. Mouser asked me something like 150$ for shipping the smallest possible package to my country. After so much time and energy we managed to get all those "US friendly parts" but I would rather go with your solution. Sourcing rare parts was way much easier than getting those Grayhills. :oops: If only ladyada offer those on their shop along with other crytical "non-rare" parts. Anyway, I`m looking forward to see your progression with this. I also like idea of LCD. Showing tempo is very usefull if the x0xb0x is MIDI master machine. Hope you`ll find a way to directly interface it to x0x microcontroller.
Good luck with your work!
User avatar
Sasha
 
Posts: 69
Joined: Wed Aug 15, 2007 8:29 am
Location: Belgrade, Serbia

Re: For those who can't find the bank/mode rotary encoders

by Sasha on Mon Nov 10, 2008 9:35 am

Hi again, I just downloaded the files you attached, and have a one question... what program have you used to draw the schematic and PCB? I cannot find an Eagle files nor some other PCB files that I recognize.
User avatar
Sasha
 
Posts: 69
Joined: Wed Aug 15, 2007 8:29 am
Location: Belgrade, Serbia

Re: For those who can't find the bank/mode rotary encoders

by Hazard on Mon Nov 10, 2008 11:40 am

Sasha wrote:Hi again, I just downloaded the files you attached, and have a one question... what program have you used to draw the schematic and PCB? I cannot find an Eagle files nor some other PCB files that I recognize.

You're right! I forgot! :D I'll post the files when I get home.

Update: Here is the file: Link

Be advised that it still needs some more coding to be useful, and that the board layout may not fit well in the x0x.
I still need to finish my enclosure to finish this interface...
Image
Hazard
 
Posts: 196
Joined: Tue Oct 30, 2007 7:27 am
Location: Portugal

Re: For those who can't find the bank/mode rotary encoders

by Sasha on Mon Nov 17, 2008 10:09 am

Hazard wrote:
Sasha wrote:Update: Here is the file: Link


That is the same file as before. Did you linked old one by mistake?
User avatar
Sasha
 
Posts: 69
Joined: Wed Aug 15, 2007 8:29 am
Location: Belgrade, Serbia

Re: For those who can't find the bank/mode rotary encoders

by Hazard on Mon Nov 17, 2008 6:33 pm

Sasha wrote:
Hazard wrote:
Sasha wrote:Update: Here is the file: Link


That is the same file as before. Did you linked old one by mistake?

I tried to update the old one. At least I think I did, I included the .sch and .brd files.

Edit: It seems that the file is on cache or something..
New Link
Image
Hazard
 
Posts: 196
Joined: Tue Oct 30, 2007 7:27 am
Location: Portugal

Re: For those who can't find the bank/mode rotary encoders

by Sasha on Tue Nov 18, 2008 6:10 am

This one is fine. Thank you.
Tell me... do I need to change the fuses for m48 and how? Or I just burn the hex? I`ll make programming adapter these days and give it a try.
User avatar
Sasha
 
Posts: 69
Joined: Wed Aug 15, 2007 8:29 am
Location: Belgrade, Serbia

Re: For those who can't find the bank/mode rotary encoders

by Hazard on Tue Nov 18, 2008 5:51 pm

I think it works with default fuses.
But it is faster if you disable the "CKDIV8" fuse.
Image
Hazard
 
Posts: 196
Joined: Tue Oct 30, 2007 7:27 am
Location: Portugal

Re: For those who can't find the bank/mode rotary encoders

by Sasha on Wed Nov 19, 2008 3:18 am

Can you please post the hex values of those changed fuses?
I`m still not comfortable with it and I`m kind of enough of experimenting... I almost broke the pins on my x0x MCU while taking it in and out of the programmer and x0x for so many times.
User avatar
Sasha
 
Posts: 69
Joined: Wed Aug 15, 2007 8:29 am
Location: Belgrade, Serbia

Re: For those who can't find the bank/mode rotary encoders

by Hazard on Thu Nov 20, 2008 4:56 am

Sasha wrote:Can you please post the hex values of those changed fuses?
I`m still not comfortable with it and I`m kind of enough of experimenting... I almost broke the pins on my x0x MCU while taking it in and out of the programmer and x0x for so many times.

Well, you shouldn't be afraid of fuses :P
Fuses
Image
Hazard
 
Posts: 196
Joined: Tue Oct 30, 2007 7:27 am
Location: Portugal

Re: For those who can't find the bank/mode rotary encoders

by Sasha on Thu Nov 20, 2008 5:11 am

OK, I see now... you just uncheck the CKDIV8, all others are default. Yeah, it not really to be scared about.
Thanks mate. ;)
User avatar
Sasha
 
Posts: 69
Joined: Wed Aug 15, 2007 8:29 am
Location: Belgrade, Serbia

Re: For those who can't find the bank/mode rotary encoders

by Sasha on Wed Dec 17, 2008 4:44 am

I bought MCU but the values of rest of the parts are missing. Can you list it or publish full schematic please? Thank you.
User avatar
Sasha
 
Posts: 69
Joined: Wed Aug 15, 2007 8:29 am
Location: Belgrade, Serbia

Please be positive and constructive with your questions and comments.