3
\$\begingroup\$

First some context: I'm an IT person by trade, and I dabble in electronics as a hobby. I have rather limited experience - apart from some toy circuits I've only made a single "production" quality installation, a lighting system for a display case. On the toy front, I've done some simple Arduino and ARM-driven circuits. In general, I'm not that eager to resort to coding, as this is something I'm already familiar with, and I'd like to learn something new :)

Now for the question itself: I'd like to do more practical circuits, similar to the light setup I've mentioned above. Solving practical problems is a great source of motivation for me. Problem is, while I can sort of work out how to implement what I'd like to achieve, I have tremendous problems with picking sensible physical components to put in the final assembly.

For example, I have an RF-controlled (433MHz) socket. I got a simple circuit working, with a pushbutton triggering an Arduino to send the right command via RF transmitter to toggle the socket on and off. I'd like to make a permanent "production" version of this circuit now, one that doesn't include a whole big Arduino shield. Heck, probably the AVR itself is an overkill for "press button, pipe 24 bits over RF" solution.

Another example: a magnet-triggered LEDs like these. Getting a prototype that uses a reed switch to go from "wave a magnet" to "toggle LED" is simple. Trying to achieve the same effect in a tiny surface of plastic model part sounds next to impossible for me.

In short: drawing circuits is all fun and games, but how do I get from "that's a working prototype that has way too many cables and PCBs" to "that's a sensible implementation that's not an overkill and fits within the space allotted"? And without practical experience in this matter, it's hard to get that practical experience - I literally have no idea what kind of simple building blocks I have at my disposal, and what constitutes an overkill. On the other hand, perhaps going with a micro-based solution is cheaper/simple than trying to work out something without a microcontroller just for the sake of it?

I guess this question can be condensed to: What do I read on to avoid slapping a microcontroller everywhere? :D

\$\endgroup\$
2
  • 1
    \$\begingroup\$ You might as well still use the AVR, since you have the code already. The arduino design is available freely online, you would start by putting everything on a single PCB and having it made for you. Then you optimize. There are AVR microcontrollers that are in tiny 6 PIN packages \$\endgroup\$
    – crasic
    Commented Dec 9, 2015 at 1:00
  • \$\begingroup\$ Code is the least important bit - that is, I know this bit, and I can easily redo it again if needed. The gist of the question is whether it's worth bothering replacing that code+mcu with something simpler, perhaps better suited for the job. \$\endgroup\$
    – yacoob
    Commented Dec 9, 2015 at 1:56

5 Answers 5

3
\$\begingroup\$

You can absolutely attempt to move your design off the prototype platform onto dedicated logic or an analog implementation. This will require redoing much of the work you have already done in a way that you are more unsure about. An MCU does add some small cost (not much) and some headache dealing with programming and testing, but it does gives you a lot of flexibility.

Generally though, even small projects can justify the ever shrinking cost of the MCU (and supporting components).

You should start by deciding on what from your shields and arduinos that you actually need, combine their schematics and have a decent stab at laying out the PCB yourself. Have it fabricated, test, rinse, repeat.

Many arduino shields and the arduino itself have freely available schematics and PCB layouts so there is a lot of example material to go on. This is a decent challenge in itself as well as the trying to figure out how to implement any design changes you may want.

\$\endgroup\$
8
\$\begingroup\$

Don't be afraid to use a MCU; just use the smallest MCU in the same family that you can get away with. If you have it working with an Arduino then look at using a ATtiny25/45/85 or a ATtiny2313A/4313. If you have it working with AVR C then look at a ATtiny13 or a ATtiny4/5/9/10. Don't hate on MCUs because they're "big and expensive", because in reality they're not.

\$\endgroup\$
5
  • \$\begingroup\$ Don't forget the amazing new ranges they have added april-ish: Tiny441 and the like, cheap and incredibly versatile. But, yeah, I always have a bucket of Tiny10's and a programming clamp for everything that needs 4 pins or less. \$\endgroup\$
    – Asmyldof
    Commented Dec 9, 2015 at 1:03
  • \$\begingroup\$ Yes Quite, in fact if @yacoob intends to go to production he will probably find that a tiny MCU is quite reasonable compared to stupid things like jacks and cord receptacles. \$\endgroup\$
    – crasic
    Commented Dec 9, 2015 at 1:08
  • \$\begingroup\$ Yeah, the '441 and '841 are neat, but they strike me as being primarily for I2C-controlled motor/LED controllers. Not that there's anything wrong with using them for something else, of course. \$\endgroup\$ Commented Dec 9, 2015 at 1:09
  • \$\begingroup\$ Like I said in the question - I honestly have no idea, due to lack of experience. To give you an example - some time ago I've found a page describing how to control that RF transmitter with a serial encoder (HT12E). Author seemed confident that it'd work, while a number of people told me that it'll be problematic due to extra noise that author is not accounting for. They're probably both right, depending on circumstances. I, on the other hand, am confused in this kind of situations. :D \$\endgroup\$
    – yacoob
    Commented Dec 9, 2015 at 1:38
  • \$\begingroup\$ @yacoob - noise resistance depends on the coding scheme and decoder algorithm sophistication, not on the parts chosen to implement that scheme. Some "canned" solutions are quite a bit more advanced than what casual MCU users might implement, but obviously others are not. \$\endgroup\$ Commented Dec 9, 2015 at 3:19
2
\$\begingroup\$

The direct way to repackage an existing prototype that's built from various subassemblies such as component evaluation boards and breadboards is to take the schematics of each subassembly, delete any circuitry not actually being used in your application, and combine them to produce a schematic for a single PCB that contains only what you need. This eliminates redundant components and all of the module-to-module wiring. It also gives you the opportunity to shape the PCB to fit the packaging you have in mind for the final product.

Such a board, although it implements the exact same functionality in exactly the same way as the prototype, will be both more aesthetically pleasing and less costly to produce in any sort of volume.

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

When you are starting out on this journey, and learning what works well and what doesn't, it really pays to have some flexibility. Designing and PCB, having it manufactured and soldering it up is a significant investment of time and money. The worst thing is to discover that you should have used a microcontroller with more SPI ports, or needed amplifier for some analog signal.

Don't try to avoid slapping a microcontroller everywhere. They are incredibly useful devices, and hard to replace with discrete components. In fact, I'd recommend the opposite.

In my line of work, where everything is manufactured in small quantities, we never get to mass production, and we're often discovering something else our board needed, our microcontroller of choice is the PSoC5 from Cypress (now Infineon). It's not the cheapest or most powerful line of MCUs, but its enormous flexibility has saved our bacon so many times that it's paid for itself over and over.

The device consists of a 32-bit Arm Cortex M3 CPU, running at up to 67MHz. Around that, it has a suite of analog and digital blocks that can be used together to make a huge range of peripherals. Part of the IDE is a schematic editor where you can literally design analog and digital circuits which will be compiled and created inside the chip.

For example, I was able to design an APRS radio module, which converts a bitstream into audio for transmission over radio. And it runs on the hardware of the chip without needing code.

APRS radio encoder in a PSoC5

Indeed, for you, this might be an ideal device because its library of hardware peripheral components (communications, amplifiers, ADCs, DACs, analog and digital filters, etc.) will help introduce you to a lot of functionality adjacent to the CPU itself, in a way that's well documented and easy to experiment with.

Development boards are available relatively cheaply.

\$\endgroup\$
-3
\$\begingroup\$

I designed a PCB for just this - it mounts a micro on the top and has a prototype area on the back. It will help in your case because micro, housekeeping and peripherals are directly soldered onto a single PCB - No shields or wiring. See silkscreen for more information.
For more complex designs, I recommend you create a custom PCB on EasyEDA. A batch of 5 boards can be ridiculously cheap! enter image description here

enter image description here

\$\endgroup\$
1
  • 1
    \$\begingroup\$ Please answer the question, why does this simply the design process \$\endgroup\$
    – Voltage Spike
    Commented May 19 at 15:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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