Arduino cases, cable jumpers, shields

Hi,

Electronic newbie here…
Just finished my first project for a gas sensor with a buzzer.

I’ve used a deck card box and cable jumpers.

I was wondering if anybody had suggestion on how, according to these pictures, I could:
-Use angled cable jumpers or a shield to improve the robustness of the design (please link parts)
-A better box
-Affordable solutions

Any bad comments about my project?
Thanks

/* Testing MQ-2 GAS sensor with serial monitor
   Suitable for detecting of LPG, i-butane, propane, methane ,alcohol, Hydrogen or smoke
   More info: http://www.ardumotive.com/how-to-use-mq2-gas-sensor-en.html
   Dev: Michalis Vasilakis // Date: 11/6/2015 // www.ardumotive.com                     */

const int gasPin = A0; //GAS sensor output pin to Arduino analog A0 pin


//Example code KY012 active buzzer
int speakerPin =8;


void setup () {
  pinMode (speakerPin, OUTPUT);
  Serial.begin(9600); //Initialize serial port - 9600 bps
}



void loop () {

  int gasSensorValue = analogRead(gasPin); // read sensor

  if (gasSensorValue > 70) {
    analogWrite (speakerPin, 255);  // Do an off-on pattern starting with off
    delay (500);
    analogWrite (speakerPin, 0);
    delay (10);
  } else {        // Shut the buzzer
    analogWrite (speakerPin, 255);

  }

  Serial.println(gasSensorValue);
  delay(500);
}

Use angled cable jumpers or a shield to improve the robustness of the design (please link parts)

If this is a permanent installation I would be inclined to either remove the female sockets from the Arduino and solder the external connections directly to the board, or to use an Arduino board that does not have sockets in the first place and solder directly to that.

This will show you how to keep your Uno board and put your project on a standalone AVR. Make it go on the breadboard then look to more stable packaging -- the connections must be the same.

http://www.gammon.com.au/breadboard

With this, you can fit your project in an Altoids tin or piece of PVC pipe that can hold the gas sensors too.

If you don't want to mess with chips, that same tutorial (and the great software in it) can show you how to program an Arduino Mini, just treat it like a pre-wired breadboard. The Mini has no USB.

If you want to run cable wires outside the box, covering them with heat-shrink tube will make them much tougher but not as easy to bend.

If the sensors can run at 3V, you could set up an AVR to run 8MHz or less at 3V right off 2 AA batteries. You can't do that with an Uno that I know of! Nick's blog even shows how to use the internal oscillator, you don't need a crystal and caps or resonator using that -- less parts.

There are smaller AVR's than Nick shows there that might do the job cheaper & smaller.

UKHeliBob:
If this is a permanent installation I would be inclined to either remove the female sockets from the Arduino and solder the external connections directly to the board, or to use an Arduino board that does not have sockets in the first place and solder directly to that.

Great idea. Yes this will be a permanent solution soon. I don’t think my component are security compliant in any ways, but at least I got something to work with.

Next thing would probably be to get a battery pack.

I just have those 9v. Batt. Connectors. I heard it won’t last long and I need 1.5v batteries in pack.
Any ideas for a DIY batt pack using that connector (see picture) and how much 1.5v batteries, six?

GoForSmoke:
Gammon Forum : Electronics : Microprocessors : How to make an Arduino-compatible minimal board

Thanks for the reverse engineering learning idea!

GoForSmoke:
With this, you can fit your project in an Altoids tin or piece of PVC pipe that can hold the gas sensors too.

Altoids tin +1 !

GoForSmoke:
If you want to run cable wires outside the box, covering them with heat-shrink tube will make them much tougher but not as easy to bend.

heat-shrink tube +1. << New to all this… thanks

GoForSmoke:
If the sensors can run at 3V, you could set up an AVR to run 8MHz or less at 3V right off 2 AA batteries. You can’t do that with an Uno that I know of! Nick’s blog even shows how to use the internal oscillator, you don’t need a crystal and caps or resonator using that – less parts.

There are smaller AVR’s than Nick shows there that might do the job cheaper & smaller.

I’ve got a sensor and a buzzer.
The 3v onboard is enough for the buzzer
The sensor requires 5v.

What can I do if I need more power from the arduino?
There are only 2 connectors, 3v, 5v?

What cost effective AVR would you recommend for my project specs?

Thanks again!
Regards

If you build a bare chip with minimal components, like no 7805 voltage regulator but instead get a tiny boost or buck converter and either use 4 batteries and buck 6V to 5V or use 2 batteries and boost 3V to 5V with shorter life.

The Arduino Mini is closest to a minimal duino and they're cheap. Just take care which chip you get in some knockoffs, 88's and 168's and ATtiny's!

You should only put limited current through an Arduino, 100 mA total continuous, 20 mA per pin continuous. If you need more then you control transistors or chips to apply power from an external source to the job. That can be the same source that feeds the Arduino, external just means it's not going through the Arduino, doesn't count against Arduino limits.

I don't think that your sensor or buzzer will draw much but over not so long a time the buzzer could drain batteries. The gas sensors only have to check occasionally.

See if there's a bendable plastic or metal tube that could hold your wiring and batteries.

I use an Arduino Pro Mini and solder directly to the headers. They have low power consumption, come in 5V or 3.3V versions, and have a built-in voltage regulator

You can see my technique for making a sturdy enclosure from a solid 2x4 here.

I would recommend that you buy a pack of pro minis off of eBay, (you will soon be using them all the time!) and a few rolls of color-coded hookup wire, along with a decent soldering station. (if you don't already have one)

Have fun!

For an Uno, I would use something like this (search for screw shield, I think this one comes from seeed studio).

For a Nano, you can use something like

No idea if something similar is available for other models like mini or micro.

Hello, thank you for your awnsers.

I am not sure I understand how to feed the different sensors with a different current source than the arduino.

Could anybody provide a schematic on how to do this?

I need more power and pin for power. The Uno only has two:
1 gas sensor
1 active buzzer
1 liquid display

Thank you
Regards

I showed you the maximum total and per-pin currents. I did not say that you parts exceed maximums.

With an Arduino pin you can use very small voltage and current to control transistors that act as switches for higher voltages and/or more current. A 3V pin can control a 12V circuit with almost no current, ON/OFF/ON/OFF/ON/OFF all day faster than you can see if desired. With transistors to bridge between voltages and allow more power flow than pins you can run motors if you want.

YOUR parts may not require this. They may run just fine at 5V using less than maximum. The only reason you might use them then is to use less power by running the controller at 3V to run some 5V parts. Battery life is why you would do this.

A 9V battery run through a buck converter will last about 50% longer than a 9V battery run through a 7805 voltage regulator slash current-waster. Voltage regulators suck the life out of batteries, the voltage they regulate down to, the worse they suck, but cheap suckers still get put on boards just like in big corporations.

GoForSmoke:
I showed you the maximum total and per-pin currents. I did not say that you parts exceed maximums.

With an Arduino pin you can use very small voltage and current to control transistors that act as switches for higher voltages and/or more current. A 3V pin can control a 12V circuit with almost no current, ON/OFF/ON/OFF/ON/OFF all day faster than you can see if desired. With transistors to bridge between voltages and allow more power flow than pins you can run motors if you want.

YOUR parts may not require this. They may run just fine at 5V using less than maximum. The only reason you might use them then is to use less power by running the controller at 3V to run some 5V parts. Battery life is why you would do this.

A 9V battery run through a buck converter will last about 50% longer than a 9V battery run through a 7805 voltage regulator slash current-waster. Voltage regulators suck the life out of batteries, the voltage they regulate down to, the worse they suck, but cheap suckers still get put on boards just like in big corporations.

Sorry again, I don't quite understand.

What do you mean by:

"YOUR parts may not require this."

What is "this"?

I am looking for an electrical part solution, or any solution at all that allows me to duplicate the 3v and 5v pin on the UNO.

I am running out of "power PIN" connectors. You said there is plenty of power so we got that out of the way.

My cable jumper are already filling up the 3v and 5v PIN, now I want to add a liquid display.

Any clues?
1 gas sensor
1 active buzzer
1 liquid display

I am currently using a 9v. PSU on site plugged in the UNO. Is there any tidy solutions for power distribution?

Thank you
Regards

I am looking for an electrical part solution, or any solution at all that allows me to duplicate the 3v and 5v pin on the UNO.

Do you have any objection to soldering wires to a strip of Veroboard or soldering connectors to the board and plugging jumpers into them ?

No Bob, I don't think so. It would be fine.

This project is going to be a work in progress though, so I need to be able to make some changes later, so perhaps de-soldering if needed?

Is there something I could use which would allow me to change the connections later? Small tidy electronic terminals or anything?

But yeah, let's hear your solutions first...
Do you have any illustrations? I am new to pretty much new to everything in electronic...

Thank you
Regards

Is there something I could use which would allow me to change the connections later? Small tidy electronic terminals or anything?

That sounds like a job for a breadboard until you have firmed up the design.

arduihome21:
Sorry again, I don't quite understand.

What do you mean by:

"YOUR parts may not require this."

What is "this"?

"This" was about how to power things that need more current to run than you can safely put through your Arduino.

IF your parts do not use more current through any pin (pin current max is 40mA, continuous max is more like 25mA) or all pins totalled (board total max is 200mA, continuous max is closer to 100mA)
THEN you don't need to use external power.

You expressed concern about powering devices. I want you to know how it's not a show stopper.

The thing to do next is find out how much current each of your parts needs. I am guessing that they probably don't need much.

If the 9V is not through a battery and you don't care about a little waste then you could split the PSU output wire so that you have the barrel jack to go to the Arduino and 9V that does not go to the Arduino, your external (to the Arduino) power. Run that through a 7805 regulator (might need a little heat sink, might not) and you have 5V external power.

There are little hobby boards with power jack, regulator and multiple PWR and GND pins but you can roll your own and save bucks as well as shipping time.

You can get smart LCD units with serial interface. One member, Dr. Liu here sells them, they have a 328P chip, keypad and supporting library.
http://www.inmojo.com/store/liudr-arduino-and-physics-gadgets/item/serial-lcd-back-pack---phi-panel/

As you zero in on what you will do, the very large number of "can do it this way" answers will become fewer.

arduihome21:
I am new to pretty much new to everything in electronic...

Do you understand current from power from voltage?

Ohm's Law?

GoForSmoke:
If the 9V is not through a battery and you don't care about a little waste then you could split the PSU output wire so that you have the barrel jack to go to the Arduino and 9V that does not go to the Arduino, your external (to the Arduino) power. Run that through a 7805 regulator (might need a little heat sink, might not) and you have 5V external power.

OK thanks that's what I needed.
I just got a couple of those LM7805 modules because I start to have quite a few components hooked up:
Gas Sensor
Buzzer
RTC
LCD + Pot
Temp. Humid. sensor.

Does this exceeds 100mA?
How do you calculate Ohm's Law law for this, do you know by heart roughly the consumption for these components?

Thanks

GoForSmoke:
Do you understand current from power from voltage?

Ohm's Law?

Hi GoForSmoke, I've got these battery cells pretty cheap around here.

To power up my arduino sensor setup with Liquid LCD setup I've got 2 questions:

-How many batteries do I need for the charge to last 3-6 month for sure (these are 1.55v)?
-What is the best way to do a DIY battery cell pack, with cable shrink (PVC Heat Shrink Wrap Tube), I solder cables on each end of the series?
-Do I need a LM7809 module or something equivalent for the current input or this is gonna suck up power and drain the batteries too fast maybe??

Thank you
Regards

arduihome21:
OK thanks that's what I needed.
I just got a couple of those LM7805 modules because I start to have quite a few components hooked up:
Gas Sensor
Buzzer
RTC
LCD + Pot
Temp. Humid. sensor.

Does this exceeds 100mA?
How do you calculate Ohm's Law law for this, do you know by heart roughly the consumption for these components?

Thanks

How do I know what current your parts draw? Maybe very little and maybe they don't get used more than once a second and never all at once. How much current your project draws maximum doesn't have to be the total possible.

Better questions are 1) do any of those parts draw more than 100mA, and 2) when will you post the parts data?