From breadboard to permanent installation - best practices?

I am building a pair of moving antennae for a costume. I currently have everything working on a breadboard and would like to know if there’s anything I should keep in mind when I start to build something more durable. This is my first Arduino project, and I’m sure there are plenty of possible pitfalls.

The antennae turn randomly, then pause before turning again. I’m using a potentiometer as a variable speed control, and also have two buttons to change the antennae’s behavior. (One turns them towards the person I’m talking to for a few seconds; the other speeds up the random movement for a few seconds.) It’s all controlled by an Arduino Uno.

I’ve included a circuit diagram - hopefully without errors. (Since it’s working on the breadboard, if you notice anything strange in the diagram, it’s probably a mistake.)

Everything currently runs off six AA batteries. (Wall power obviously isn’t an option for a costume.) Since this is a Star Trek costume, I was planning to put the batteries and the circuitry in a tricorder case. (For those who don’t know the series, it’s a rectangular box you wear on a strap, and hangs about waist level.) Although the tricorder case will provide some protection to the circuit board, it’ll get jostled a bit as I walk around, and there’s always the possibility of someone colliding with you, so I was thinking it’d be better to solder the parts in place instead of just using a breadboard.

The servos that turn the antennae take 4.8 to 6.0 volts. The datasheet doesn’t give amperage. When I checked them with a voltmeter with the antennae in place, they mostly seem to draw around 400mA when turning, with occasional spikes of 800mA. I am using a 7805 voltage regulator to step the 9v input down to 5v, which unfortunately has a maximum of one ampere output, but haven’t noticed any problems in testing - perhaps because the spikes are so brief?

Any suggestions are welcome. Thank you!

If you are planning on using the arduino board in your final build I would suggesting using one of their proto shields. It is essentially perf board you can assemble your circuits on and just stick it on top of the arduino.

For a "permanent" build, use a "Pro Mini" which does not have the USB interface, which saves a small amount of power along the way and is significantly smaller than a UNO. These generally come without pins soldered in place, so you can just solder your connecting wires directly to the holes-pads. If you need to mount other components, you can use some pins on the Pro Mini and then solder it by them to a piece of stripboard on which you also mount the other devices.


I am curious as to why you are using a 9V battery if you only ever need 6V directly connected for the servos and 5V (a couple of diodes in series or a LDO regulator) for the Arduino.

Paul__B:
For a "permanent" build, use a "Pro Mini" which does not have the USB interface, which saves a small amount of power along the way and is significantly smaller than a UNO. These generally come without pins soldered in place, so you can just solder your connecting wires directly to the holes-pads. If you need to mount other components, you can use some pins on the Pro Mini and then solder it by them to a piece of stripboard on which you also mount the other devices.


I am curious as to why you are using a 9V battery if you only ever need 6V directly connected for the servos and 5V (a couple of diodes in series or a LDO regulator) for the Arduino.

Pretty much sums up what I do. Pro Mini's are where it's at for permanent builds (or nano clones; but they're bigger and less power efficient; FTDI adapters are ~$5, or ~$2 if you get the cheapest CH340G adapters and solder a wire onto pin13 of the chip for DTR)

Strip board sucks, but there aren't good alternatives readily available.
The best stuff (IMO) has the pins grouped into rows of 4, instead of long strips that you have to cut, so it's like breadboard, only you solder it. I haven't seen this for sale though.

Definitely agree on the battery; 2 of those AA batteries are just adding weight and making your regulator hotter.

Paul__B:
I am curious as to why you are using a 9V battery if you only ever need 6V directly connected for the servos and 5V (a couple of diodes in series or a LDO regulator) for the Arduino.

The Uno spec sheet recommended 7-12 volts and said that "the board may be unstable" with less*, and 9v seemed like a convenient value within that range.

(The next question might reasonably be "so why did you get the Uno?" Since it was my first project and I wasn't sure where to start, I picked what looked like a middle-of-the-road board.)

  • Which seemed weird since the USB connection is only providing five volts, but I really did not feel knowledgeable enough to go outside the specs

I've tried an Mini plus LCD powered directly by 3 AA cells, no problems so far.

The 7V limit applies to the Uno on-board 5V regulator, which requires at least 7V for proper operation. When the regulator is not used, the voltage can be reduced below 5V as well.

Hi, do you have room inside the case for one of these DC-DC converters? They are very small.

This can replace your 7805, provide 1.8A @ 5V and do it much more efficiently, making better use of your 6 x AA cells. You can power the Arduino directly from it using the 5V input instead of the barrel connector, as well as powering the servos. At least one large cap (eg 1000uF) might be a good idea to cope with those sudden surges from the servos.

Paul

WrinkleWaffle:
The Uno spec sheet recommended 7-12 volts and said that "the board may be unstable" with less, and 9v seemed like a convenient value within that range.

Which seemed weird since the USB connection is only providing five volts, but I really did not feel knowledgeable enough to go outside the specs

Ah well.

The mark-up for a weblink is "url", not "link". :grinning:

You have a regulator on the UNO - indeed, on almost all Arduinox - which requires a "drop-out" voltage of the order of 2V to regulate 5V. Probably somewhat less. But it is 5V on which the ATmega328 chip actually operates and which you can provide via the 5V pin in similar fashion to using USB and with the 16 MHz clock, it can actually be significantly less. Whether the regulator is really "unstable" or not is dubious, it simply cannot regulate to 5V on too little an input voltage.

So if you use a 6V battery which with fresh cells will be up to 6.4V, that is over the rating of the ATmega328 chip but perfect for the servos. If you put one silicon power diode in series with the 5V pin on the Arduino, it would reduce by about 0.6V, so maximum 5.8V with those fresh batteries, two diodes in series will be fine but the voltage will sag as the batteries discharge - but it will probably keep working.

You could use four Ni-MH batteries directly with no diodes as long as you disconnect from the Arduino to recharge.

The alternative is as explained, to keep your 9V batteries and use a really efficient switching regulator to derive a consistent 5V - for both Arduino and servos - as the batteries age.

Thank you to everyone for your help!

  1. I added the suggested capacitors.

  2. While the official Arduino datasheets should be the first place I look for information, they clearly should not be the last place! I changed the design to run on six volts and four AA batteries so I won't need the voltage regulator.

  3. I built the circuit board using the Pro Mini - it wasn't as user-friendly as I'd found the Uno to be, but I did get everything working.

  4. I'll keep the suggested proto shield in mind for future projects, though I think the smaller (and cheaper) Pro Mini is a good choice for this one.

I am going to wear this to an event at the end of the month and will post again with links to video and pictures in case any other forum readers are interested in doing something similar.