Show Posts
Pages: [1] 2 3 ... 17
1  Using Arduino / General Electronics / Re: 2n2222 Inverter circuit on: June 25, 2014, 08:32:10 am
I connected the AVR RX pin to wrong place, ugh. Working now! With NAND solution I simply connected one input of gate to +5V, and the other was TX pin from MIDI chip. USART RX pin was connected to NAND gate output.
2  Using Arduino / General Electronics / 2n2222 Inverter circuit on: June 25, 2014, 08:11:19 am
I've got USB MIDI chip, TTL compatible, which connects to USART pins on Arduino. Sending MIDI data from Arduino to that chip (which in turns sends received data to PC via USB) works without any additionalo circutry. However, MIDI Out on that MIDI chip is marked as active high, while AVR USART pins are active low, therefore, in  order to send data to Arduino via that chip, I need some kind of inverter. Official documentation for that chip recommends 7400 NAND gates. I've tried that and it works without any issues. However, given that 7400 is a 16-pin DIP with 4 NAND gates, most of that chip is left unused, so I figured I could use 2N2222 transistor as inverter circuit. Since I know virtually nothing about transistors, I have no idea how am I supposed to connect. it. I found this circuit somewhere on internet, however that didn't work (RX LED on Arduino isn't flashing at all). I'm guessing I should change the resistor values to something else, any advice?

3  Using Arduino / Microcontrollers / Re: Pro Mini, USB MIDI chip and sending and receiving MIDI on: June 20, 2014, 07:36:23 pm
Okay so, datasheet says for MIDI out that is an "active high" pin. Can someone please explain what does that mean? Does that require connecting the pin to +5V or some other thing?
4  Using Arduino / Microcontrollers / Pro Mini, USB MIDI chip and sending and receiving MIDI on: June 20, 2014, 02:45:55 pm
I built a MIDI controller based on Arduino Pro Mini. Everything works fine, and so far, I've used the serial conversion to MIDI. Both sending and receiving the MIDI works as expected. To explain the previous setup a bit more:

1) Pro Mini is connected to PC via CP2102 module
2) I convert serial messages from Arduino with hairless-midi application
3) I route converted messages to my MIDI software via virtual MIDI cable (loopBe30)

Everything works fine. Therefore, I ordered a USB MIDI chip, more specifically, Altmustech AU-123. I've designed a PCB for it. Datasheet (attached) says it's TTL compatible, so, only change I did in my code was to change the serial baud rate from 38400 to standard MIDI speed, 31250. I've connected RX/TX pins directly to that chip, and my PC recognizes the device as USB MIDI. A good start. Sending MIDI data from Arduino to PC via that chip works perfectly fine, however, receiving does not. It's as if the messages sent to that chip are somehow inverted, except they're not. For instance, sending MIDI note 0 on channel 1 with 127 velocity should result in following message:

144 0 127

However, on Arduino end I'm receiving this:

243 1 0

I can't find any sense in that. Any suggestions? Note that my code for this test consists merely of this:

Code:
void loop() {

if (Serial.available() > 0) Serial.write(Serial.read());

}

If I go back to previous method, 38400 baud rate with serial-to-midi conversion, I receive the expected input on Arduino end.
5  Community / Exhibition / Gallery / Anandamidi MIDI controller on: June 04, 2014, 11:26:36 am
New MIDI controller from me. 16 buttons, 6 pots, 3 faders and 10 LEDs.

Hardware base:
Arduino Pro Mini
4051 multiplexer
button/LED matrix

Software base:
Ownduino (my own minimal implementation of some Arduino functions)
MIDI library 3.2 (with some modifications to make it more minimal)
OpenDeck library (my own matrix/pot/mux library)

Very happy about this project, I still have some minor work around the case but this is mostly it.
Source is freely available here: https://github.com/paradajz/Tannin (source is based on that controller, it's 95% the same)

Pictures:



















And here's a tryout video:

https://www.youtube.com/watch?v=B0tTqctuLCI

EDIT:
Way more details about the project on my blog:
https://shanteacontrols.wordpress.com/
6  Using Arduino / Project Guidance / Re: Choosing correct microcontroller for the job on: May 29, 2014, 02:51:05 am
Sure.

Thanks! Awesome approach. However, doesn't that interrupt line require debouncing?
7  Using Arduino / Project Guidance / Re: Choosing correct microcontroller for the job on: May 28, 2014, 04:21:25 pm
I don't know if there is a shift register that outputs a low if any input is clocked in as a low. That's why I suggested the diodes in a Wired AND configuration - any button low creates an interrupt, the interrrupt pulses the latch line, and you have the input high/low states captured.

Can you draw a schematic with one chip in that configuration? I'm still having difficulties with understanding the setup.
8  Using Arduino / Project Guidance / Re: Choosing correct microcontroller for the job on: May 28, 2014, 12:51:22 pm
RGB LED is 3 LEDs in one package.
Thus 102 RGB LEDs is really 306 LEDs. You can see that on any datasheet.

Ah, I see. Thanks.

I would use 13 shift-in registers with pullup resistors and  buttons that Gnd a pin when pressed.  Scan all inputs in frequently and look for 0s to act upon (10 times a second? 25 times a second?) Or use 102 diodes with cathode on each pin and common anodes, use the anode as an interrupt and scan when an interrupt comes in. Read in the 13 bytes using SPI.transfer at 8 MHz transfer rate, can shift them into an array in about 13uS, then scan the array for 0s to act on.
Might be I2C expansion shield that can do that also, but at slower speed (100KHz or 400KHz transfer rate).  How responsive do you want it?

Interrupt driven shift register? Which register is capable of that? Responsive, well, instantly? Since it's supposed to be Ableton Live controller, you need "instant" (in human terms, not microcontroller) reaction.
9  Using Arduino / Project Guidance / Re: Choosing correct microcontroller for the job on: May 28, 2014, 12:20:38 pm
You're gonna need more external hardware than you think.
102 RGB LEDs is like controlling 306 LEDs.

Euh, what? Care to explain?

102 pushbuttons, can arrange as a 10x11 keypad as long as only 1 will be pushed at a time. keypad.h library.

No, I need multiple presses.
10  Using Arduino / Project Guidance / Re: Choosing correct microcontroller for the job on: May 28, 2014, 09:39:34 am
It entirely depends on what you want to do with it.
you've only said what input/output you have, but not what your processing needs are. If you just want to get the values of all those things via serial communication, and be able to set the values of those leds also via serial communication, even the most basic microcontroller would probably suffice (unless you want extremely fast update rates).

If you want to have realtime control over those leds with the buttons & potentiometers as inputs with all kinds of special patterns, memory/cpu intensive processes, ... then you'll needs one of the more powerfull versions.

Ah yeah, sorry. The use would be within MIDI controller. I also want to control LED brightness/colors... Now that I think of it, two MAX7219 chips would probably be best solution for LEDs. Controller needs to both send and receive serial.
11  Using Arduino / Project Guidance / Choosing correct microcontroller for the job on: May 28, 2014, 09:29:13 am
I need advice on choosing the correct microcontroller for this kind of setup:

102 pushbuttons
102 RGB LEDs
44 potentiometers
5 rotary encoders

Multiplexing (matrices) is the obvious choice for that many buttons/LEDs. I was thinking about 2 8x8 matrices for that part. (shared columns on buttons/LEDs). Two ULN sinks, two shift registers for button inputs (4021 or something better/faster? but not very expensive) and two LED drivers (which ones?). Each ULN would be connected to a decoder, and those two decoders would then have their select pins chained. Correct approach? Shift registers for buttons would have clock and latch pins chained as well (correct?). So, 3 pins to shift through 16 columns and 4 for 16 rows of buttons. Not sure about the LED driver part. For potentiometers, I was planning on using 6 MPC3208 chips via SPI. Rotary encoders... Don't know which components to chose for that job.

So, which microcontroller do you suggest? ATmega1284? Is that enough power to drive all that without too much delay? Or should I choose ARM for this?
12  Using Arduino / Project Guidance / Re: New to Arduino, want to control light with MIDI keyboard on: May 18, 2014, 06:40:09 am
Watched the link to your project but didn't really get it. Though you describe it exactly as I'd like it. Please tell me more about how it works!

I am not turning the LEDs on directly in controller firmware, as in "when button x is pressed, turn on LED y". Instead, I am sending commands to Traktor (software I'm using for DJing). That part is irrelevant for you. However, upon selecting some of the options in Traktor, Traktor then sends MIDI data to controller, and only then I'm processing them. So it's like "upon receiving note X, turn on LED Y", instead of "turn on LED when button is pressed". That's what you want to do. The only difference is, in my case, the software is sending MIDI via USB, and your synth does the same thing via MIDI connector, so you only need to interface MIDI out from your synth to Arduino TX pin, and then parse input data (MIDI library does that for you).

I suggest you also take a look at "Arduino Basic Connections" book, you can find it online for free.
13  Using Arduino / Project Guidance / Re: New to Arduino, want to control light with MIDI keyboard on: May 17, 2014, 08:14:27 am
I don't think there's need for starter kit. Your idea is really simple actually, and I already have a project which is very similiar to that (MIDI controller which reads MIDI notes and turns LEDs on according to note/velocity). You'll need MIDI library, circuit to pass MIDI out from your synth to RX pin to Arduino and of course, circuit and code for LED control.
14  Using Arduino / General Electronics / Re: Decoupling power supply on: May 06, 2014, 05:13:07 am
If you current is small and relatively constant, you may not need any additional capacitors. However, installing some capacitors (one electrolytic 10uF @10V or higher at the entrance, and 0.1uF capacitors to decouple every IC component on board) will likely improve board performance.

Quote
If you have any analog signals to deal with, you need to take an even closer look at board layout, decoupling, and so on. Especially if you're dealing with very sensitive ADCs, op-amps, and the like. I.e. you'll spend as much time troubleshooting the power supply to make sure it delivers clean power as designing the actual circuit that uses said power.

Well, it's really simple 2 button row/2 LED row/8 shared columns matrix with 6 pots on 4051 multiplexer and 3 additional faders connected directly to Pro Mini. Really small currents, but I'm mostly interested in smoothing out the main voltage as much as possible, because of those analog components. Plus I'm eager to learn good PCB design (ground planes, decoupling etc.)

Quote
Some folk also like to run their USB power through ferrites to help deal with transients / high frequency noise on the line. 10uH 0805 chips and the like are pretty common for that. Only a good scope though would tell you how much of a difference such chips actually make.

Unfortunately, I don't have one.
15  Using Arduino / General Electronics / Re: Decoupling power supply on: May 05, 2014, 04:42:50 pm
Lots of info, thanks. My power source is USB from laptop, so, what's the best choice?
Pages: [1] 2 3 ... 17