2

I've prototyped a little light/sunrise alarm clock w/ an Arduino Uno and a breadboard. How do I go about figuring out what components I'd need to reduce this down in to a more semi-permanent prototype?

Obviously I don't need everything the Uno has to offer and I'd like to slim this down into a custom box I build.

But what sort of microcontroller(s) would I need to size this down? How else can I simplify it?

To be clear, I'm not trying to turn this in to any sort of finished/super-polished product. Just wanting to get out of the breadboard and in to some soldering of something a bit more set in stone.

enter image description here

enter image description here

  • The resistor at the top does nothing - it's legs are connected together. – AMADANON Inc. Mar 22 '16 at 2:28
  • In addition to AMADANON's answer, I would like to point out that if you are going as far as making a PCB (which I highly recommend), you would do well to move away from Fritzing and use a more capable schematic/layout software. I recommend Kicad, but Eagle, DesignSpark, and gEDA are other free options. – uint128_t Mar 22 '16 at 4:41
  • @uint128_t You can actually make decent PCB's with Fritzing... Compared with Eagle, I think Fritzing is way more easier to use. You could compare it like "Arduino IDE and Eclipse IDE". For a starter, I would highly recommend Arduino IDE. Same applies to Fritzing. He's never going to use very advanced features, so shouldn't be bothered with it. I can't see why such an (easy) board can't/shouldn't be done in Fritzing. – Paul Mar 22 '16 at 12:27
  • 1
    You could use a pro-mini instead of an UNO. Or just the bare ATMega chip kike others suggested. You could use proto-board instead of breadboard. You probably need to add resistors to those leds. – Gerben Mar 22 '16 at 14:05
  • 1
    @Shpigford The easiest thing to do, since the circuit is really simple apart from the arduino, in my opinion is to wire the breadboard stuff on a perfboard; with a bit of planning it can become really small. Then add an arduino pro mini, which is exactly the same as the arduino uno, but much smaller and cheaper (it just lacks the usb to serial converter, but you are not using it. This is the cheapest and easiest to make solution, in my opinion – frarugi87 Mar 23 '16 at 10:05
4

At a bare minimum, you need a power supply, and an AtMega or AtTiny chip.

The AtMega and AtTiny's have an internal clock, 1mhz. It's not terribly accurate for timekeeping purposes (1% error, I think, as opposed to 20ppm = 0.02% for the external clock), but I see you have an RTC, so a 1% drift is probably fine (I can't see your code, so I don't know if the internal time is used for anything). Remember that you will need to adjust your code for the different clock rate, anything that uses anything time-related will run at 1/16th speed (delay, serial comms, etc). You will need to set the fuses to use the internal clock.

If your power source isn't 5v, then you need a transformer.

What type of AtTiny or AtMega you use depends on your code, and how many pins you use. I see 5 pins, they are all used as digital I think? You might get away with one of the 14-pin AtTinys. I suspect your code is probably pretty small. You can probably get away with nearly any AtTiny. To select an AtTiny, go to http://www.atmel.com/products/microcontrollers/avr/tinyavr.aspx

Nick Gammon (who will probably be providing his own answer as I type) has an excellent site on how to put the parts together, at http://www.gammon.com.au/breadboard

This site mentions programming the bootloader. On a low-memory chip, you do not need a bootloader, you can upload your program using SPI (same way as you upload the bootloader in Nick's example). Alternatively, you can use a programmer like the USBASP, which makes the whole process a lot easier. When you build your final board, I strongly suggest putting a 6-pin ICSP header (same as the 2x3 pins on the end of your Arduino board) on, to make reprogramming easier. You plug the USBASP into the 6-pin header, and click File->Upload using programmer.

ADDITIONAL:

If you want your project "really nice", you can design and etch your own PCB. If "good enough is good enough" (which for me it always is), I suggest you use stripboard (also known by it's brandname, veroboard).

In either case, spend some time thinking about your exact layout. Use a computer layout tool, and spend some time working out the best layout. I generally spend at least 5 times as much time on the layout, as I do on building the board - if a project is twice as big, I will spend twice as much time soldering, but at least 4 times as long laying it out.

| improve this answer | |
  • 2
    Nick Gammon (who will probably be providing his own answer as I type) - I won't need to after such a comprehensive answer. :) However the page of mine Amadanon linked to certainly has some tips for you. – Nick Gammon Mar 22 '16 at 4:23
2

Several steps are required:

  1. Define what you want to achieve in a clear and explicit manner, eg start documenting your project by writing down your decisions and design goals, for example on a project wiki somewhere. This could be the time where you explore the internet to gather several inspirational sources & modules you want to reuse.

  2. Check that your schematic is correct, eg that first prototype works reliably. Obviously, going from prototype to a "more permanent prototype" should include checking everything works as expected (getting validation from here would be an option).

  3. Prepare a hardware design, eg routing on your prefered CAD software. Many options exist: Fritzing, Eagle, Kicad, ... You may need help/tutorials to do this properly

  4. Manufacture the pcb, or get your board manufactured. Several options are available (see below)

  5. Assemble & test; depending on results, go back to step 1, 2, 3 ;)

To check that your schematic is correct, well, you can post it somewhere. As a starter: your initial post has some errors.

  • resistors required for LED
  • red (+) seems to be on GND, not +5v (!!)
  • using a pulldown for the button where an internal pullup is sufficient is a waste of ressource

Answer above has errors, too (as stated). So make sure your schematic & prototype work before trying to get it more permanent.

To manufacture the PCB, several options:

  • Veroboard & through hole components. Not small, but cheap, easy & reliable.
  • DIY: toner transfer method (numerous examples & howto online) : requires a bit more time/skills, but if you plan to do several boards/experiments, can be worth it. Can be rather cheap. Cannot yield high precision pcb. Note: other DIY PCB manufacturing techniques exist.
  • boardhouse contract manufacturing: yields perfect results (if your design files are OK...), can't be quick & cheap (but can be either, relatively)
| improve this answer | |
  • Didn't even know about pullups for those buttons. Just tweaked it to do that instead. Fantastic! – Shpigford Mar 22 '16 at 21:54
1

I did an awful try at making a nice breadboard for it.

BUT.

I think you're better off using some perfboard, small solderable wires and an Arduino Nano.

enter image description here

This because the Arduino Nano has an FTDI chip, crystal and power regulator and is barely bigger than an 328 DIP package.

You could easily mount the pieces of perfboard inside/on your enclosure.

Aim to add the snooze button on top with the settings buttons on the sides. The buzzer could be in the back or other side. The display (if any) should be in the front. Your "Neopixels" are no different than WS2812B "led's".

| improve this answer | |
  • Ah. that capacitor is just plain wrong, but I hope you get the idea :) Also, you'll have to make each "module" individually, I haven't dived too far in the MAX7219 but it can be adressed using SPI (only ~3 lines). An can actually update 8 (7segment) displays (4 in this picture). – Paul Mar 23 '16 at 10:30

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.