Turning an Arduino Project Into a Prototype
An anonymous reader writes: Those of us who fiddle with electronics are probably familiar with this scenario: you've just finished assembling a project using your Arduino/Raspberry Pi/whatever, and it works! You'd like to set it up for long-term use, but... it's just a mass of wires and LEDs and switches. Alexis Matelin has written up a brief but handy guide for turning that mess into a self-contained prototype. He goes from planning out your circuit to designing your schematic to making your board, then working on an enclosure and a battery holder. Matelin also links to a variety of resources for the individual steps involved. It's a straightforward guide written for amateurs. Those of you who have experience with building permanent micro-controller projects: what would you add?
Watch a few episodes of the Ben Heck Show. He does this kind of stuff all the time.
I know it's funny to complain that slashdot hasn't been posting news for nerds, but this isn't news at all.
Please leave how-to guides on hackaday, make, and other such dedicated sites. Especially topics such specific would cater to only a very small subset of slashdot readership, and I say this as an electrical engineer.
Later I'll write to the author and try to explain to him why marketing an anti-procrastination device to procrastinators is a bad idea. Right after I finish
Seven puppies were harmed during the making of this post.
Try Oshpark http://oshpark.org $5.00/sq and gives you 3 boards. Takes about 2 wks but very high quality and they take Eagle CAD files directly.
Make sure the silkscreen contains enough information so that populating the PCBs is as free from errors as possible.
If you are using polarized components (diodes, electrolytic caps, etc.), it helps if all components are oriented in the same way.
If not, make sure it is properly marked on the PCB.
Even if the prototype works fine, spend some time hardening your project for possible problems. Add diodes to protect against accidental reverse polarity connections. Your final design will probably run for much longer than your prototype ever did, so make sure it doesn't get too hot, and that everything is well within the maximum ratings of the components. Not every power supply is the same, add a capacitor and/or line regulator to the input. Maybe some components can be put into a socket instead of directly soldered on board. LEDs are cheap, add some to provide diagnostics.
Make it easy for an end-user to reprogram the Arduino/Rasperry/whatever.
Wish I'd come across this earlier. I've been developing a Raspberry PI hat circuit over the last six weeks and it's been a steep learning curve since I'm not a circuit nerd. Doubtless all the circuit nerds here will find that article overly simplistic but I'm a code monkey and had to piece this together from a number of other tutorials over the last six weeks. The things I have to add is really only the observation that Eagle Cad is the most counterintuitive piece of software I have ever tried to use. I decided to do a schematic and convert it into a PCB using Eagle which worked well enough. However, I have used any number of circuit simulators (eventually selected a href="http://icircuitapp.com">iCircuit, nice simple and available for: OS X, iOS, Android and Windows) and the UI in all of them much worked pretty much the same way but it's like Eagle Cad's developers went out of their way to make the UI of their schematics editor different. That said, Eagle Cad works like a charm one you figure out how the UI works. The component libraries can also be pretty overwhelming. After a lot of searching I came across this PCB prototyping service. No generating Greber files, just hit the "Get Started Now." button, upload the Eagle CAD file and pay the man, $18 for three boards and free shipping, turnaround time is c.a. 3 weeks. I'm still waiting on the boards so I can't judge their quality but I loved the simplicity of their site and I really hope their work is as good as people say it is because the pain of figuring out how to generate Gerber files in Eagle is bound to be as counter intuitive and painful to learn as everything else with Eagle.
We need more tutorials like this, people who can break larger projects into steps for amateurs to follow. Well it might be no big deal for an embedded engineer to take a breadboard arduino proto to PCB and bootload it over ethernet, it would be for someone just starting out, well done :-)
Fritzing is an open-source hardware initiative. They offer a free software tool to layout professional PCBs (and PCBs can be ordered from within the software).
If your time is expensive and you will only be running a very small number of PCBs, consider using ExpressPCB's design tool, because it's easy to learn and it seamlessly connects to their board printing service. (Their service is expensive though, so this is only good if you're doing a few boards, and thus the labor you save will not be eaten up by the extra you pay per board.)
Your perception of size on screen is very different to real life. Print a paper dummy of your board. Try to avoid components with pins any denser than SOIC or 0805.
Consider putting a bridge rectifier just after your DC IN connector. Then the polarity of incoming power doesn't matter: the bridge rectifier sorts it out. (It costs you a small voltage drop, of course.) Or use a connector that's hard to get backwards, such as USB or USB micro.
Tie the RESET pin to Vcc via a resistor. A floating RESET pin may lead to random resets. (I made a PIC board that reset when you brought your hand near it.)
Make sure you put the crystal close to the CPU, and connect to it via short traces. Same with the two capacitors either side of the crystal.
Your first draft will contain errors. Expect to have to trouble-shoot these.
Tie any unused digital lines to places where you can populate LEDs for troubleshooting and diagnostic info.
You'll need to include the six-pin programmer header: your CPUs will arrive blank, without the Arduino bootloader.
When you receive your first blank board, first populate the bare minimum components needed to make the CPU run. Then connect to it from the Arduino software on your PC and burn the bootloader into it. (You'll need a programme.r) (If you've never burned a bootloader, re-burn the boot loader on your actual Arduino to make sure you have all the steps and setup correct.) Only once your CPU is running should you populate further components. This particularly applies if you're using the MOSI, MISO or SCK pins: once you connect these to other chips on your board (e.g. you're using them for SPI), you may be unable to burn the bootloader.
I wouldn't make a PCB for one project, I'd use a perf. board. You also don't need a stencil for SMT boards. I just got done soldering up ten prototype boards at work that had all SMT parts on them down to 0602. I used a microscope and a soldering iron.
It's not a bad idea to put holes or pads for despiking capacitors all over the board, at least one per chip in your design. They should be connected as close as possible between the power and ground supply leads for the chips. These may not all need to be populated in the final design, but having them there will make it easier to add capacitors if they end up being needed to clean up the power distribution and prevent hardware glitches when the device is operating.
It's not a bad idea to explore around the power supply rails on the prototype circuit with a scope looking for glitches and noise induced into the circuit by rapidly changing digital signals into and out of the active parts of your circuit.
The original article talked about laying out your design with a microprocessor. Several things should be noted:
First, don't roll your own PCB with a microcontroller on it unless you know what you're doing. This is an involved process and not for newbies. You will need expensive lab equipment to debug even the simplest problems, and it is best to sidestep the problem if at all possible. Consider instead simply incorporating an arduino / Pi / Beaglebone into the actual product and do it that way instead. If the margins are low enough to make this impractical, and you don't have any experience designing microcontroller systems, then I would humbly suggest you are out of your depth, and the profit margins are probably too low for you to make money selling your product.
Second, take a serious look at your design tools. there are plenty of free tools out there that do an excellent job. Eagle and gEda come to mind. Both are free, and both will handle just about any job that an amateur is trying to accomplish. Eagle is primarily windows, and gEda is Linux only. The key part is that you want to design your system as a schematic, then export to the PCB layout. That way the tools will automatically check your PCB layout for errors such as short circuits, disconnected circuit, and a whole host of other problems that the free prototype tools don't handle. Put another way, if you get lucky on your first shot and the layout is perfect, then any tool will do. If you make a tiny mistake somewhere in your layout, then the expressPCB, etc tools will not catch it and your boards will not work. The schematic capture tools will catch the fault, and will save you massive amounts of trouble.
Be prepared for new debugging tools. Debugging a problem with the arduino or Pi is something you probably already know how to do. Debugging an embedded microcontroller is a whole other world. Even if the hardware is 100%, debugging software is trickier. Do your homework and be prepared for a radical departure from what you’re used to.
I wish I had a good sig, but all the good ones are copyrighted
rable rable rable slashdot rable rable complain rable news.
It's not a bad idea to put holes or pads for despiking capacitors all over the board, at least one per chip in your design.
I always do one capacitor per power supply lead. And they always get populated. Unless you make high volume (thousands), there's no sense in optimizing.
It's not a bad idea to put holes or pads for despiking capacitors all over the board, at least one per chip in your design.
read the documentation carefully for your system on chip. sometimes the best practice is a little more involved than that. some of the more complex ones have internal dc-dc converters that require external capacitors, they need extra care in layout.
Why did he use that ridiculously oversized LM7805 in the TO-220 package for the final project? A 78L05 in a TO-92 would have been plenty for such a small project. IIRC it's what's used on the Arduino board itself.
Not every power supply is the same, add a capacitor and/or line regulator to the input.
And don't be stingy with decoupling caps.
Please stand clear of the doors, por favor mantenganse alejado de las puertas
In the old days a hobbyist could make his own through hole circuit boards.While prototyping is possible in surface mount ,permanent circuit boards remain very difficult to create. I appreciate the many circuit board services but they will never be a better alternative than do it yourself circuit boards created from raw material. In my opinion we need to recover the lost ability. If only I knew of a place were a lot of engineers hang out I would go there and ask them to try to invent the tools we need. If only radio shack could help us!
But seriously, I keep hearing of new technology but I don't see anything available yet.I recently wasted a whole 4x6 blank pcb trying to make a small board.
Maybe my circuits are just too simple, but my strategy is:
1) Build on wireless breadboard. Get it working there.
2) Port to prefabbed circuit board that matches the connection layout of the wireless breadboard, soldering/moving one component over at a time.
3) Wrap circuit board in electrical tape and put it into a 50 cent travel-soapbox from walmart. Drill holes for LEDs/Switches/etc & glue/wire/solder them in.
4) Add battery to soapbox & circuit. Add modeling clay to keep everything from rattling around in the soapbox.
5) Put on your most friendly face and try to convince the nice men with all those guns that this is not a bomb.
6) If still alive, call lawyer. Remember to memorize phone number of lawyer before step 1. Better yet, put him on a retainer before starting.
Is this a great country or what?
And don't be stingy with decoupling caps.
And put them right next to the power pins. I've seen boards where all the decoupling caps are bunched together in a corner of the board, far away from the action.
I've seen boards where all the decoupling caps are bunched together in a corner of the board, far away from the action.
Yeah, kinda defeats the purpose. I've seen something dumber though - many years back, a friend of a friend tried to get rid of the ignition noise coming over the radio in his car by installing a filter cap across the battery terminals and then wondered why it didn't make any difference. Guy was an electronics tech in the Navy, for crying out loud.
Please stand clear of the doors, por favor mantenganse alejado de las puertas
Just make sure you don't use FTDI chips... as you never know whether they are legit and the current FTDI Windows drivers will brick them. Sure, it is reversible but if anybody connects your FTDI chip to a Windows machine then it is bricked... Not nice. Not nice at all. Just avoid FTDI.
What you're talking about is "productionization" - in other words making a prototype able to be manufactured. That sounds over-the-top for a hobbyist project, especially a one-off, but I think it's often worth doing for several reasons: those you state, i.e. for reliability, longevity, but also a) because it gives you some insight into what's needed to create a real product not just a hobby project, b) it adds greatly to the satisfaction you get from the finished article. If (b) isn't a consideration for you, then you're probably pursuing the wrong hobby, for the wrong reasons.
Reminds me of an engineer that came back saying he found the problem in a noisy circuit and said that it was coming from an external power supply and asked if we could increase the capacitance in the power supply. We then reminded him that the external power source was a large capacitor bank with 0.128 F of capacitance already...
I am going to hijack this thread to drop a link for gearsofresistance.com A podcast dedicated to OSHW news, electronics tips, and building a business on OSHW. It's still learning to stand on its own two legs (and looking for a cohost) so your razor-sharp wit and constructive critiques would be awesome... M.