57
\$\begingroup\$

My first arduino project, I have made a headlight sensor that will activate an outside light when car headlights hit it. I know I could go buy one, but where is the fun in that?

Now I would like to make a "real" one to mount outside my house so I can reuse my arduino.

I really have no idea where or how to start. I have had a look but can't find any info on this...I am sure someone here will be able to suggest something.

\$\endgroup\$
  • 3
    \$\begingroup\$ "but where is the fun in that?" -- exactly right. \$\endgroup\$ – Pete Becker Aug 2 '17 at 11:34
41
\$\begingroup\$

I assume from your question you want the essential parts of an Arduino along with your circuit in a permanent form.

Here are my steps:

  1. Build the entire circuit on a breadboard or two. Then you know it all works.
  2. Transfer it to a permanent form of circuit, testing as you go.

Take it a step at a time, and it'll work out nicely.

1. Build the entire circuit on a breadboard or two.

Then you know it all works, and that you have all of the components ready to make your permanent circuit

This will involve making and programming part of your Arduino on the breadboard. I don't think you'll need the USB part, so it can be through-hole components which are relatively straightforward to begin with.

Here is a link to instructions which show how to make an Arduino without USB.

It can be programmed using your existing Arduino, you don't need a programmer. For example: http://arduino.cc/en/Tutorial/ArduinoToBreadboard

I'd make a sketch of the circuit schematic to ensure I understood what I had on the breadboard, and to guide the next step.

2. I'd recommend you transfer the whole thing to 'veroboard' (stripboard) rather than make a PCB.

Veroboard/stripboard will be much quicker and cheaper. You could easily spend 10x longer learning to use Eagle well enough to get a PCB made, than it would take to design and make the entire circuit on veroboard/stripboard.

You can do a design on squared paper, but there are some CAD programs to help if you google for veroboard CAD. I have never used them, I use paper and a soft pencil or a vector drawing package. A friend used PowerPoint because that's what he had to hand.

Here is an example of someone who has built an Arduino on veroboard/stripboard.

It shows the design he produced for veroboard/stripboard. Try to get a reasonable layout for your design before making it. This is where the soft pencil and eraser come in :-) Typically the first couple of attempts are too big or too small. Make it easy for yourself and get plenty of squared of graph paper :-)

This link shows what the process will look like.

You can follow veroboard/stripboard arduino design, and test that it works. Then focus on your extra circuit.

Use a socket for the microcontroller, and so don't solder it in directly. Most of the other parts are a few $'s total, so I'd get a few of each part for spares and practice (To put it in context, some electronics companies charge more for delivery than those parts will cost, so getting several sets of parts makes sense, especially if you intend to make some more things).

Total cost for the Arduino part should be under $10.

Good luck, and I hope you enjoy it.

\$\endgroup\$
  • \$\begingroup\$ Nice comprehensive answer. Thanks for that, will definitely take much of it on board \$\endgroup\$ – Steve May 14 '11 at 7:50
  • \$\begingroup\$ Nice answer. Any idea how I make sure the arduino pin connects don't get loose. What should I use for that? Should I solder them directly? \$\endgroup\$ – Kaushik Das Oct 30 '15 at 0:29
  • \$\begingroup\$ Fantastic answer! Really helped point me in the direction of where to go next. Thanks! \$\endgroup\$ – Xandel Aug 4 '18 at 11:35
13
\$\begingroup\$

Some others have mentioned the use of a shield. I'm gonna suggest trying your hand at your own PCB :) Although this tends to be a pricey/difficult/frustrating route, it's easily the most educational.

Get yourself a copy of Eagle and have a play with the schematic editor. You should be able to copy most of this from your prototype. You'll also find the arduino schematic a good reference for the bits on the dev board.

If you've already written software on your development board, then you should have a good idea of what is required in terms of flash/RAM size, counters, IO pins etc. It may take some digging to find out what the Arduino environment has actually used though, it tends to hide the technical details from the developer. The easiest thing might be to just use the chip on the arduino which I believe is the ATMega168.

Start browsing component supplier sites like Digikey and Element14 to find the components you need. Try and use things already included in the Eagle libraries, or try your hand at drawing your own footprints.

Then you can have BatchPCB fabricate your designs. Order all the parts you chose. Once everything has arrived, solder it together and pray it works when you switch it on :D

Of course this sounds pretty daunting if you're new to electronic design, just keep asking questions the whole time! Good luck ;)

\$\endgroup\$
  • \$\begingroup\$ The newer Arduino boards (Uno and Duemilanove) use the ATMega328P rather than the 168 that the diecimila has. \$\endgroup\$ – charliehorse55 May 12 '11 at 21:58
  • 1
    \$\begingroup\$ I'm going this route right now. I got myself a bunch of attiny45s (8 pin DIP is enough for my current project) and a USD13 avrdude-compatible programmer off eBay. I breadboarded the whole thing without using a dev board (not Arduino for me, but close), then i laid out the schematic in eagle and sent it off to seeedstudio's FusionPCB service. Fingers crossed! The whole thing has been an amazing learning experience. \$\endgroup\$ – drxzcl May 13 '11 at 8:48
  • \$\begingroup\$ Check arduino.cc/en/Tutorial/ArduinoISP for programming ATtiny's and ATmega's from Arduino, without buying a programmer. \$\endgroup\$ – jippie Apr 7 '12 at 10:15
6
\$\begingroup\$

Maybe go half way between Arduino shield and your own board using Arduino Pro or Pro Mini board

Pro - This board is designed for advanced users who want to leave a board embedded in a project: it's cheaper than a Diecimila and easily powered by a battery, but requires additional components and assembly.

You just add your additional components.

\$\endgroup\$
2
\$\begingroup\$

An easier way might be to make an arduino shield - you can get a prototype board in the shape of an arduino. Add whatever components you want to it and then simply plop it onto of the arduino.

\$\endgroup\$
  • \$\begingroup\$ I guess that gets a bit more to the underlying question. I am trying to learn some electronics, how do I determine the 'minimum' chip I would use or even what chip would do the job. How do you learn that sort of stuff? It seems like such an 'how long is a piece of string' type question that I don't even know where to start. \$\endgroup\$ – Steve May 11 '11 at 2:58
  • 1
    \$\begingroup\$ @Steve Since you mentioned that you don't know how to pick the minimum chip, here are some tips: First familiarize yourself with Atmel's site. Two pages which are worth putting in favorites are the megaAVR and tinyAVR pages. They have descriptions of AVR microcontrollers you'll be mostly using. \$\endgroup\$ – AndrejaKo May 11 '11 at 12:47
  • 1
    \$\begingroup\$ @Steve Next analyze part names. They will tell you some basic information about the part itself. For example the mega or tiny tells you what type of features to expect from the unit. First couple of digits tell you the available flash memory. It's usually 4, 8, 16, 32, 64 or 128 KiB. The rest or the digits I couldn't decode. Next, for each device, there's a short summary. If you click on the name and then click on the documents, you'll find its summary. Download the file and read it. It contains the basic information about the device and should be good enough for start. \$\endgroup\$ – AndrejaKo May 11 '11 at 12:59
  • 1
    \$\begingroup\$ I would just get an the exact chip that your arduino has. Then you won't need to worry about getting any other chips (like a programmer) you can just put it into the chip socket on the arduino, program it and then put it into your circuit. Even though you won't be using a lot of the features the chip does not cost that much so it's worth the ease of use. \$\endgroup\$ – charliehorse55 May 11 '11 at 13:52
  • \$\begingroup\$ This is just a minor step up from breadboarding, and you're still not able to reuse the Arduino which makes the final device much more expensive than necessary. \$\endgroup\$ – Matt Garrison May 11 '11 at 16:04
1
\$\begingroup\$

Draw a schematic, first, of the parts on the Arduino board that you are using, and any parts you have added, and how they are connected, and show us that. We can proceed from there.

You might need to get a PCB designed and made, and assemble it, or you could build the circuit on a prototyping board. Then you just plug the AVR from the Arduino into it, and it should start working just as the Arduino did.

\$\endgroup\$
1
\$\begingroup\$

Go take a look at the MetaBoard. It's a mostly arduino compatible board that you can etch at home on a single sided PCB. If you want to port what you've prototyped to a permanent board, this would be a good, well documented starting point.

Along the way, you'll go grab a copy of Eagle for editing the design to your needs and pickup an in circuit programmer that you'll need to program your homebrew board.

\$\endgroup\$
  • \$\begingroup\$ Keep in mind etching chemicals are 1) nasty and 2) have to be disposed of properly. \$\endgroup\$ – Brian Carlton May 13 '11 at 2:35
  • \$\begingroup\$ Thanks for that. Eagle is a bit pricey though :P \$\endgroup\$ – Steve May 14 '11 at 7:51
  • \$\begingroup\$ Guess you missed the Freeware edition of Eagle. That's why so many people use it. It has limitations on board size and number of layers, but is otherwise fully functional. For small DIY projects, it's generally good enough. cadsoft.de/freeware.htm \$\endgroup\$ – ducksauz May 15 '11 at 17:36
1
\$\begingroup\$

My method is not far behind Cogsy's. Instead of deep diving into eagle and the such, goto your local Radioshack, pick up some of there perf boards (circuit boards with a ton of holes in them). Setup the atmega328 with the necessary extras (1 external crystal with 2 capacitors, capacitor for power line filtering and resistor to pull reset pin high). Solder the chip/circuit to the perf board.

This method is a lot less daunting than starting off with a custom pcb. I recently just got started with electronics as well and this method was my next step. Now I do my own etching but that is the progression that most easily taken.

Good luck!

\$\endgroup\$
0
\$\begingroup\$

you might want to consider using an ATTINY84 or 85 chip instead of an assembled arduino on the proto board. ATTINYs are great little chips that offer (almost) the same functionality as Atmega 328P (the Arduino chip), occupy very little space, and the same program can be ported from Arduino to the ATTINY. It also let's you have your Arduino back after prototyping. A good starting point -

https://42bots.com/tutorials/programming-attiny84-attiny44-with-arduino-uno/amp/

Cheers.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.