Hello to all, I try to bult a midiusb console to control the tractor software. I would like your opinion about how I am planning do this project.
Well, this project will have 4 elements. buttons, potentiometers, encoder and leds. And maybe a lcd display for fancy thinks.
My question is that if the Arduino Leonardo can handle all this work.
In my mind I think I will use around 130 leds. For this I will use the max7219 probably 3 off them with i2c bus.
I will use around 38 potentiometers. With multiplexer 74hc4067
And around 60 buttons. With PCF8575 I2C BUS.
I will use 8 Encoders and in my my mind is to multiplex them with 74hc4051
The way I imagine the code is that. Arduino Leonardo have 4 interrupt pins. I will use the 2 interrupt pins for the encoders.
for the buttons i will not use any, and i will use the 2 remain interrupts for the 2 potentiometers mutliplexers. or vice versa. with this approche i assume i leave all the CPU processor power(arduino) to handle the leds.
in my previous console that I built with Arduino uno and I use it more than a year now, I didn’t face any problem at all. and i didnt use any inteupts,
that console have 3 74hc4067, for buttons and potensiometers. 3 encoders, and 3 74hc595 bitshifters
one reasson i built a new one is that i need 130 led or more , and from what i read, i cant conect more that 4pcs 74hc595, on 3 pin (so-s1-s2) because arduino is a 32 bit, so i was out off pins.
WHAT IS YOUR OPIONION ABOUT THIS PROJECT.
Thank you in advance.
It depends on what the code does, and a spec would be nice - but 38 potentiometers ? . How does the UNO project work , has it some capacity left ?
I would say make a start with one or two of your inputs that are new and see how you get on, then expand the project with this or a better processor if need be .
I’m no great fan of the Leonardo, check through all the available Arduino types and make your choice . My gut choice for this would be using a PC
Draw a block diagram showing the build, an understandable description of what all those inputs are supposed to produce, or go back to bed, dreaming. Will this ever be built?..
Use an engineer's description, not tons of poetry.
Regarding circuitry, post schematics.
Max7219 uses SPI bus, not i²c. You could use ht16k33 which does use i²c and one chip can drive 128 LEDs. It can also handle 30+ buttons.
You will need fewer pins if you arrange your buttons as a matrix. But if you need to press several buttons at once, you will need a diode in series with each button.
This might not work, or not work well. In my experience, for smooth operation of encoders without loosing steps, an Arduino external interrupt pin and a regular Arduino input pin is needed for each encoder. Leonardo has 5 external interrupt pins, but one of those cannot be used with i²c bus.