MIDI LED lights via Nano 2.0

A while ago I build my first Arduino project - a little box that allows a MIDI player to send info to an Arduino Nano, through a MIDI shield. The MIDI notes are then supposed to decide when 5 LED-strips should blink. The LED strips are attached via RCA connectors.

I’m a newbie and got some great support on this forum, and now I’m making my second attempt to make a 2.0 version. In my existing project I get it to work with one channel, meaning I can decide when ALL of my five LED strips are supposed to blink with one MIDI note.
Now I want to control the five LED strips individually with five different MIDI notes.

By this time I know the code is working, so now I’d love if someone could just take a look at my stripboard overview to see if it looks okay before I start soldering it together.

Thanks!

soulitude

022edf1b9bc30d850dd6f384b257803236f14711.jpg

Thanks, PaulRB. I'm a forum rookie too, apparently.

Anyone with some knowledge and a few minutes over who could glance at my stripboard?

Well, for ease of installation, reliability and maintainability, i would not have all those off-board wires soldered into random places. I would place a bunch of screw-terminal connectors at the edges for the off-board wires.

If you want us to spot any mistakes, you'll need to post a schematic too.

Have you considered tri-pad board instead of stripboard?

Yeah, screw-terminal connectors is probably a wise choice. I'll see if I can squeeze them in.

Haven't thought about tri-pad boards, but maybe I should.

Okay, I've made my first ever schematic. There could be lots and lots of mistakes here, but I'm ready to learn.

|500x322

Hmm... more tweaking needed there. D1/TX is connected to ground, which could cause a damaging short. The top strip, controlled by D4, has no ground connection. Too tired to check more tonight!

One immediate mistake is that you have resistors in series with the FET gates and then resistors from the gates to source. Even with a large ratio, this constituted a potential divider and ever so slightly reduces the turn-on voltage applied to the gate which is clearly undesirable.

The concern that these pull-down resistors address does not belong to the FET gates at all, but to the situation where the Arduino ports are not initialised. As such, it makes no sense to put the resistors across the gates, but instead from the Arduino pins themselves to ground.


And you have a 220 Ohm resistor directly across the opto output which will render it useless. The opto should be connected from the input pin to ground, and use the internal pull-up of the Arduino pin - an additional pull-up resistor is generally unnecessary.

Thanks so much for the comments, Paul. Really appreciate it.

TX connected to ground and D4 missing ground connection were just sloppy mistakes. Reg. the MIDI in/opto part - I've looked at other MIDI in drawings, and they seem to be the same as mine?

I'm not quite sure what you meant with the FET gate resistors, so now I pulled them. In my stripboard overview I've got a cutout between the legs, does that make any difference?

So now it looks like this:

|500x370

That wasn't what Paul__B meant about the gate series resistors, you can put them back in. What he meant was where you had attached the pull-down resistors. They should be attached to the Arduino side of the gate series resistors, not the fet side.

A good technique to make schematics easier to read and draw is to make liberal use of power-rail symbols (5V, 12V & GND). Put them in anywhere that looks good, avoiding having to route connections all over the diagram, criss-crossing other lines etc. Pretty sure Fritzing had power rail symbols back when i used it.

Fritzing is much derided on this forum, a little unfairly perhaps. Problem is so many newbies post breadboard-layout diagrams from fritzing and call them schematics, which they aren't. Fritzing does have a passable schematic editor, and that's the place to start. When the schematic is done, fritzing can then help layout the circuit on breadboard, stripboard, even tri-pad board.

PaulRB: That wasn't what Paul__B meant about the gate series resistors, you can put them back in. What he meant was where you had attached the pull-down resistors. They should be attached to the Arduino side of the gate series resistors, not the fet side.

A good technique to make schematics easier to read and draw is to make liberal use of power-rail symbols (5V, 12V & GND). Put them in anywhere that looks good, avoiding having to route connections all over the diagram, criss-crossing other lines etc. Pretty sure Fritzing had power rail symbols back when i used it.

Thanks! I learn as I go. And since this is my first ever attempt of something that could look like a schematic, I hope it'll get better. I'll try to clean it up a bit.

I do understand the thing with the pull-down resistors now.

|500x396

How is the MIDI in part any different from this example?

Ah! I wasn't examining it carefully enough. I missed that you are using a 6N138 with three connections.

The series resistors driving the FET gates should be 330 Ohms in order to switch the FETs as quickly as possible whilst limiting the Arduino drive current to a safe level.

Paul__B:
Ah! I wasn’t examining it carefully enough. I missed that you are using a 6N138 with three connections.

Phew!

The series resistors driving the FET gates should be 330 Ohms in order to switch the FETs as quickly as possible whilst limiting the Arduino drive current to a safe level.

Okay, great. I changed them now. And cleaned it up a bit (also took away the MIDI shield for now).

Does the SPST power switch and the 3mm power LED seem okay to you?
I basically want switch 12V on/off and have a small white LED on the chassis to light up when 12V is on.

Power led should be fine, just under 20mA. May be a bit too bright in a dark room!

Suggest you complete the schematic, then re-visit the stripboard layout (maybe include those screw terminals) and re-post both for review?

soulitude: Does the SPST power switch and the 3mm power LED seem okay to you? I basically want switch 12V on/off and have a small white LED on the chassis to light up when 12V is on.

Well, if that is what you want, then by all means! let me see, a 470k resistor, 9V drop, will be running about 20 mA, won't it? With a modern high-brightness LED, that will hurt your eyes! (2 mA would more than suffice.)

I would tend to question why you want to switch off the 12 V in the first place? If it is a mains-derived power supply, there is no need to, 20 mA at 12 V is 240 mA, a quarter of a watt, hardly worth being concerned about. And that is only the pilot light, if the Arduino is not driving the other LED strips, they will be drawing zero current and zero power, no need to switch them at all on that account. If you are using batteries, well that is another matter.

Paul__B: Well, if that is what you want, then by all means! let me see, a 470k resistor, 9V drop, will be running about 20 mA, won't it? With a modern high-brightness LED, that will hurt your eyes! (2 mA would more than suffice.)

I'll change that to a 4.7K resistor for now. I guess I could just try that out when the build is done?

Paul__B: I would tend to question why you want to switch off the 12 V in the first place? If it is a mains-derived power supply, there is no need to, 20 mA at 12 V is 240 mA, a quarter of a watt, hardly worth being concerned about. And that is only the pilot light, if the Arduino is not driving the other LED strips, they will be drawing zero current and zero power, no need to switch them at all on that account. If you are using batteries, well that is another matter.

Well, I'm going to use this thing on dark music stages. So I'd like a LED to tell me if there's 12V running through the box before I'm using the LED strip MIDI blinking. And therefore it feels good to have a chance to switch the power on and off. I guess it's just a feeling.

PaulRB: Suggest you complete the schematic, then re-visit the stripboard layout (maybe include those screw terminals) and re-post both for review?

Will do! Thanks.

Okay, here we go. Let's see if I've understood what it is I'm doing here...

I've got a given space in my enclosure, which means I've got a given size of the stripboard piece. At the moment I can't seem to fit screw terminals, but I'm sure I could make that later on.

|500x486

|500x354

I would REALLY appreciate if someone could have a look at my last post.

I'm having a look during odd moments. Presumably you will cut tracks in some places not marked, like under the 330R and 4K7 resistors?

The 12V switch is wrong, it won't do anything connected like that. Why not wire the +12V via the switch to the board?

What about moving the opto-isolator chip up by one track and route 5V around the top of the Nano?

Have you investigated using Fritzing to re-draw the stripboard layout? It should help by flagging up any differences to your schematic.

PaulRB: I'm having a look during odd moments. Presumably you will cut tracks in some places not marked, like under the 330R and 4K7 resistors?

The 12V switch is wrong, it won't do anything connected like that. Why not wire the +12V via the switch to the board?

I had missed out on some cutouts as you said, also in between the switch wires. Sloppy.

I've made the stripboard layout in Fritzing now, and the circuit seems to be working perfect. I'll tighten the spaces up with the real stripboard later on.

How does the circuit in whole seem now?

Your stripboard seems bigger, in terms of strips x holes?

Don't forget that fritzing will let you cut a strip between holes. In practice that's very difficult. So when you cut a track in fritzing, do it on both sides of a hole.