layout guidance needed

I’m trying to prepare a layout for my project using fritzing. The device will send midi messages when you press a footswitch and an LED will light up. The code is more or less working but I know from experience what a jungle of wires you can end up with - I want it to be as tidy as possible, so intend to use some veroboard to mount the resistors.

I’d appreciate any comments about this layout, is there a better/neater approach?

Hi,

Here's one example of an approach; may not be applicable to your project:

https://arduinoinfo.mywikis.net/wiki/Arduino-Project-Planning-Packaging-Mechanical

|500x321

Your switch wiring seems wrong, Looks like all 4 will short out Vcc.

I'm guessing the black wires from the switches to ground are not supposed to be there.

For better comments on your implementation it would be better to group devices in the enclosures they will inhabit and make the interconnect cables more obvious. i.e. could draw a dotted eclipse around the groups to wire that will make up a cable.

I would solder header pins onto the Arduino, then put 2 rows of female header-pins on a exp-printplate, mount the DIN-plug (s) on that and if the resistors don't fit in the foot switches, mount them on there also, add midi-in/thru and the other DIN plug already. Are those other button supposed to be for use by your hands ?

Deva_Rishi: Are those other button supposed to be for use by your hands ?

feet

I’ve revised the wiring

|500x305Oh those things at the bottom are the LED's so i would mount all components on a piece of prototyping board which include some female header pins to stick the male header pins of the Arduino in and put 1 enclosure around it, which can have the DIN plugs coming out the side and a have a powersupply input on it as well, the LED's sticcking out the top, the foot switches i don't know how they look..

OK, so it is generally ill-advised to have the switches connecting to Vcc 5 V. :astonished:

Two reasons not to distribute Vcc anywhere you do not need to:

  • Risk of it shorting to ground.
  • Increased susceptibility to noise/ interference pickup.

Paul__B: OK, so it is generally ill-advised to have the switches connecting to Vcc 5 V. :astonished:

I'm only going by 100s of arduino images that show the same layout https://www.arduino.cc/en/Tutorial/Button

nickrobinson:
I’m only going by 100s of arduino images that show the same layout
https://www.arduino.cc/en/Tutorial/Button

It is better to let the buttons be ‘active-Low’ so they get grounded-out when pressed using either the internal pullup or putting your own pull-up resistors.

nickrobinson: I'm only going by 100s of arduino images that show the same layout https://www.arduino.cc/en/Tutorial/Button

That teaches you that you need a pull up or pull down resistor with a switch, to give the pin a wel defined logic level when the switch is not pushed (not part of the circuit).

Once you know that, you never use external pull up/down again. Well, maybe only some (additional) stronger pull up in very noisy environments and/or with long wiring.

Most processors used here have buildin pull up, that can be enabled with code. pinMode(switchPin, INPUT_PULLUP);

Pull up, and the switch wired between pin and ground could also be safer. No 5volt running to the switch, that can shortcircuit to ground.

With pull up, logic is reversed. The pin is now normally HIGH, and goes LOW when the switch is pushed. if (switchPin == LOW) { // do something Leo..

Wawa: Most processors used here have buildin pull up, that can be enabled with code. pinMode(switchPin, INPUT_PULLUP); Pull up, and the switch wired between pin and ground could also be safer.

That's wonderful - thanks for letting me know. Less parts, simpler wiring, it's all good ;)

nickrobinson: I'm only going by 100s of Arduino images that show the same layout https://www.arduino.cc/en/Tutorial/Button

That is (just one of the instances) why we find the Arduino "tutorials" which have proven unable to be corrected, to be less than useful and in fact, counter-productive. :astonished:

The (hyperbole) "100s of Arduino images" turn out to be many copies of a very few. :roll_eyes: