My first try at a micro-controller, based on the Arduino Uno firmware - Page 1
Forum section: electronics / projects

author: thibmo
author_rank: Contributor
timestamp: March 22, 2015, 04:38:34 pm
content: Hello guys, I am rather new to the EEVBlog forum, but not to the Youtube series.I have been trying my go on some PCB designs before, yet now I tried to create a little micro-controller based on the Aruino Uno firmware for the Atmel ATMEGA328-PU.I would love to hear your thoughts about it.It will be mainly used for a small project, yet I will also make it open-source-hardware.I am sorry for the curlyness of the traces, I simply love the looks of it, I try to make mine look a bit like the old-school hand-made boards.I know there is a lot to be implemented, like a proper power-plug, input protection and a little on-board power regulation, but it's V0.0.1, and my first one that I actually wish to publish, I had one before, a 7.5-35V step-down to 5v circuit, but I couldn't get the right parts to get 5V exact... Oh well.Give me your thoughts.

author: JohnnyBerg
author_rank: Frequent Contributor
timestamp: March 22, 2015, 06:27:28 pm
content: Where is the header for programming the bootloader or upload software?Why do I want this relative large board, and not have a Arduino mini pro for $2,- ?

author: thibmo
author_rank: Contributor
timestamp: March 22, 2015, 07:45:22 pm
content: Quote from: JohnnyBerg on March 22, 2015, 06:27:28 pmGood question, and to answer it, every pin is connected, so were one to grab the datasheet that will be included, one could find out which pins are for flashing the firmware.On the other hand, the RX and TX pins are on the board, these are used by the USB module to handle the code exchange, meaning you could use the Arduino IDE to write and "upload" your codes.Also, the board is nowhere to being completed, there are a load of optimizations needed still, I am working on it.And why one would prefer this chip, well, let's say that some people prefer the sturdy big IC over the tiny ones, also the ATMEGA328-PU has a bit more in it's package then the basic stuff of the mini.And the $2,- mini is actually not the best one, probably cheap parts, as the average lays around 9,95.I also tried to keep all the equal pins at the same spot, so that the creation of a shield can be standardized(Without the annoying pin-gap.)Also, it's not the most advanced one as of right now, I am thinking about integrating the USB circuit instead of using the $1,25 external module.And maybe a nice button for the reset?Will see about it.Anyways, thanks for the input, it's always welcome.I just prefer the big IC's, they just give me a more reliable feeling.

author: Christopher
author_rank: Frequent Contributor
timestamp: March 22, 2015, 07:57:45 pm
content: Where are your local bypass caps and big filter caps? An el-cheapo 7805 would be good on here unless you fancy powering external circuitry. A switching regulator for less than a few hundred mW is a bit of a pointless effort in my mind unless you really need the efficiency.How are you going to program the bootloader? Having to program the bootloader in an Arduino first is too inconvenient. Stick an ISP header somewhere.How are you gonna upload firmware? Having a header for an FTDI breakout board is very useful. (I see the header in the bottom left looks strangely like an ftdi pinout now... I will leave this note here anyway)Does the reset pin need to be pulled up to the power rail to work correctly?As for layout:Fatter traces for power pins & a ground plane on the bottom so all gnd pins have a low impedance (easy for current to flow) return pathI'd keep Q1 where it is and move C1 and C2 closer to the chip

author: JohnnyBerg
author_rank: Frequent Contributor
timestamp: March 22, 2015, 08:05:46 pm
content: Programmers for Atmel are "standardized" with a 3x2 pin header or 7x2 pin header.

author: thibmo
author_rank: Contributor
timestamp: March 22, 2015, 08:46:37 pm
content: Thanks for the input guys, I will give it a look-over and add a proper ftdi header block, maybe a dual-row 3 pin?For the SPI header... I could put one in as well, for the ones who wish for it.Though I will maybe pull the default Eagle board and schematics of a regular Arduino uno and edit it to my own likings.Maybe that'd be a better idea, instead of developing one of my own right now?Also, my idea was to put a socket in the place of the IC, to then flash if with an external flashing module.Hence I prefer these form-factors, they are interchangeable in the case of a broken chip and easy to re-program by using a proper asic.

author: JackP
author_rank: Regular Contributor
timestamp: March 22, 2015, 09:07:20 pm
content: I'd stick with this. Make the board about a 1/3 of the size (easy) and then just add in what these guys have said. All you have to add is some local caps, a little power reg circuitry and a few headers to the board, and you'll have a generic board. Even better, tailor it to your needs: if you often use servos, add a couple of headers with the standard servo pinout, for example. Do make it as small as possible though, as it will be cheaper to produce (get 10 5cmx5cm double sided for £10 at SeeedStudio (yes I know they aren't the best)) and more convenient for your projects. Hey, give a one sided board a go (it can be a challenge for boards such as these).Good luck, and stick with it.

author: westfw
author_rank: Super Contributor
timestamp: March 22, 2015, 09:53:33 pm
content: You will normally want AVCC and VCC connected to each other, and AGND and GND connected to each other. (You always want them connected; if you're being really paranoid about the analog design, a low-pass filter and separate gnd planes might be involved.

author: thibmo
author_rank: Contributor
timestamp: March 22, 2015, 10:11:43 pm
content: Many thanks again, I will report back with a new layout, in attachment form this time, to not ruin the space too much.

author: thibmo
author_rank: Contributor
timestamp: March 22, 2015, 11:28:41 pm
content: Oke, I have a little bit of the schematic done, basically it holds the reset button, the coupled GND&AGND, the coupled VCC&AVCC and the clock assembly.Not much, I know.But I need to do some research as well on the USB-serial part.Q: FTDI FTS31XS-U or other chip?

author: westfw
author_rank: Super Contributor
timestamp: March 23, 2015, 12:15:12 am
content: Aref should have a cap to ground

author: sleemanj
author_rank: Super Contributor
timestamp: March 23, 2015, 01:02:38 am
content: You should give AVcc and Vcc each a separate decoupling cap, particularly because they are on opposite sides of the chip physically.Also, what's R2 for? Have never see that done before.

author: sleemanj
author_rank: Super Contributor
timestamp: March 23, 2015, 01:13:06 am
content: Quote from: sleemanj on March 23, 2015, 01:02:38 amAnswering my own questionhttps://www.google.co.nz/search?q=resistor+across+crystal&oq=resistor+across+cr&aqs=chrome.1.69i57j0.8591j0j4&client=ubuntu-browser&sourceid=chrome&espv=2&es_sm=91&ie=UTF-8Seems more common with Microchip stuff.

author: thibmo
author_rank: Contributor
timestamp: March 23, 2015, 03:32:15 am
content: Will add another cap tomorrow.For now, hope this is enough.Please notify me of any mistakes in the design.And sleep tight for now.

author: thibmo
author_rank: Contributor
timestamp: March 24, 2015, 02:41:52 am
content: Hello guys,here a big update on the board.I changed the ferrite bead for a proper inductor.Also made the board layout, I was a bit greedy on the ground plane, I know, but I hope this will do.Please do share the thoughts.Yet do keep in mind that size is not something that bothers me, a slightly bigger board can be a benefit in some cases, plus it'd be easier to stuff addons on it.Here are two screenshots.//EDIT: Board_v0.1.2 has a little documentation fix, nothing huge, just the label for cap 13 missed and the USB label was misplaced.

author: westfw
author_rank: Super Contributor
timestamp: March 24, 2015, 06:02:47 am
content: C10 and C11 look inappropriately tiny, physical size wise.The arduino schematic uses parallel resistors (R8, R10) for one of the LEDs because it is using resistor networks, and this lets it use a single network (same value resistors) when they would rather have a couple values. There's no need to use two resistors if you are using separate resistors.You have quite a mix of component sizes. Looks like 0805 for most components, 0603 for LEDs and some other components, and "really tiny" for c2, c3 (by the crystal.) Does that reflect the real components that you have? When there aren't reasons otherwise, I usually try to keep all the components in the same size family. Ditto for the op-amp, mosfet, and etc - you have tiny packages and need to make sure that they match what you have or are planning to buy.IC4 could use more copper on the tab connection, for heatsinking. Personally, I'm a big fan of TO220 regulators and enough room to add a finned heatsink if needed.C4 and C5 should be closer to the FTDI chip. Isn't there suppused to be another cap, as well? I remember a 4.7uF and 0.1uF on 5V, and 0.1uF on 3.3V out...There should be a cap and a clamping diode on the RESET signal coming from the FTDI to the AVR. See the Uno R3 schematic, andhttp://arduino.cc/forum/index.php/topic,64256.0.html(or, consider leaving out "auto-reset." It interferes with using real debugging.)Try to avoid acute angles where tracks meet (as shown in the attached picture.) I've heard these called "acid traps" and the implication is that they're not good for the etching process. Although with relatively big tracks, I'm not sure how important this is.Are you sure you want to be duplicating relatively old Arduino designs? The FT232RL is dated, the power supply switching circuit has always been a bit over-complex for limited value, and autoreset is questionable for the problems it causes.

author: JohnnyBerg
author_rank: Frequent Contributor
timestamp: March 24, 2015, 07:30:32 am
content: It is looking more and more like a Arduino Uno.So, why not make the layout compatible with the Uno, so shields will fit?At first glance, the resistor with the crystal is not needed.But the question remains: why do I want this board, and not a Uno/Uno Clone?As Dave says: every board needs a "killer feature". What is the killer feature of this board?

author: thibmo
author_rank: Contributor
timestamp: March 24, 2015, 10:30:38 am
content: Quote from: JohnnyBerg on March 24, 2015, 07:30:32 amAbout this part, I prefer having a lot of ground points, also the digital pins are now in a 14-pin header, instead of two messy seporate headers.And what does the AREF have to do with digital pins? Blegh, that should be with a misc header or with the analog pins.This is the basic set-up, eventually I will think about inserting more features, like a on-board Ethernet connection for either serial communication or real Ethernet connections.I made the design different on purpose, this because I never intended on making it Arduino shield compatible.My intention is to create a different board for people who enjoy fiddling with jumper wires(Hence the 6-pin ground header) to create prototypes, or learn to create electronic circuits to use with micro controllers, that is my goal.And while I am at it, just keep it open source(Git page will be made in the near future).The important thing is to have a solid basic, in my opinion.Plus, I am just a hobbyist, All studies about electronics I did was 2 years of installation technology (Smart relays, PLC and wire pulling trough PVC tubes) [Een VMBO instal-techniek opleiding]I see this as a good healthy challenge for myself, and I like to have feedback on my work.The resistor on the crystal is there for a reason, you can find it back in the past comments.Quote from: sleemanj on March 23, 2015, 01:13:06 am@westfw:Thanks, I will look into this, and perhaps swap some tiny parts for 0805 packages.And indeed, I did mix some 0805 and 0603, I tried to keep them a bit compact where possible.I put the auto-reset in due to it being rather default in circuits, yet I am aware of it's issues and it can be excluded if the community wishes for it.Or I could do more research on how to stabilize it to where it functions properly.After uploading the images I did a small circuit check in eagle and there were some errors, like:* The trace running to pin 17 on the ATMEGA is shorting pin 18 &19.* Some traces had a too tight or inappropriate bend.* The IC4 pin4 copper slab created a collision issue(My bad, used a square instead of a polygon, fixed now and it has more copper to touch now.)Personally I had a bit of a struggle with TO220's, not sure why.Also, there seems to be an issue, I can't find an image in your reply.With the sharp angles you mean where I join the wires in an angle, like a "Y"-split or angled trace-to-straight trace?And I wonder, what other chip is there that's similar to the FT232RL but more up-to-date?I chose this one for it's simple layout and ease of use, plus I never liked having to have a ICSP for the USB-to-serial chip itself, pure personal.Though, how are the thoughts on the 2x3 + 2x5 pin connectors for ICSP? Good idea or more something to leave one of the two out?Personally it's a feature I enjoy, having a choice whether to use a flat-cable to breakout or a 6 pin header.And I am always open for examples and ideas, I really am, I just prefer positive-building-critic over the bashing critics, that's why I can take a tone in my writing at times, my apologies about that, it's nothing personal, just my mind making it a mess.I really appreciate the hints and help, without it I can't learn to become better in my designs, thank you guys.And about the Dave-quote, I know this, and it's true, hence this project won't stop with this main layout, it will grow bigger and better over time, maybe I will swap the 328-PU for a more heavy-duty one in the future, we will see.

author: thibmo
author_rank: Contributor
timestamp: March 24, 2015, 04:43:09 pm
content: My bad, I mainly used 1206 packages.A few quick changes:* I changed the power LED resistor to a single 500 Ohm in a fitting 0603 package.* All LED's are a 0603 package.* R3 & R4 are closer to U1 and are now 0603 packages.* R7 & R8 are now also 0603 packages, they are also re-routed.* C8 & C10 & C11 are now fat-caps(Panasonic D types).* C2 & C3 are now 22 pF instead of 20, due to recommendations from an external source.* Added the 100nF cap as sugested.* Did some re-routing all over the board.* Added more ground via's.* Changed the tDocum to tName to actually have the info on the solder mask.Images will follow.

author: thibmo
author_rank: Contributor
timestamp: March 24, 2015, 08:00:58 pm
content: As promised, here are three images for you guys.One with logo's in-place, one with the logo's moved to the side and the updated schematic.(If it's a double post, sorry. Images were too large in data-size on the first attempt.)Also, I am thinking about inserting a 28-pin ZIF socket on the board instead of a dip socket.Would be more user friendly in the case of the wish to change chips.

author: thibmo
author_rank: Contributor
timestamp: March 26, 2015, 08:39:54 pm
content: And I am back with an update.I decided to re-do the whole thing and came back with this design.It's 106.68 x 78.74 mm in size.With a bit of luck it might fit twice per euro-board, though I doubt it.One will surely fit.Decided to use one resistor array and then have all resistors and caps(Except for the polarized caps).Smacked the default FT232RL in there, instead of the basic.Re-worked the whole schematic to make it easier to read.(Plus black background.)If there are no real issues I might get some ordered for testing purposes.Also, this shape saves me tons in tooling costs.Now I also included the Eagle files(.brd and .sch)

author: thibmo
author_rank: Contributor
timestamp: April 18, 2015, 11:04:20 pm
content: Well,this wins the record of the shortest lasting project in my life. >.>After people keeping the bash up about the Arduino form-factor I decided to simply give up on it.I didn't want to use it for obvious reasons.Anyways, I am going back to what I am trained to do, which is programming.I think it's bad to treat newcomers to pcb-design and microcontrollers the way I have been by some, but hey, it's just the way it is.Good luck to you guys and perhaps one day you will use some software I have made, which I doubt, unless you enjoy playing games written in Delphi, like KaMRemake.why Delphi? Just read the article that Krom and Lewin made on their website.Cheerio.

author: zapta
author_rank: Super Contributor
timestamp: April 19, 2015, 03:14:55 am
content: Quote from: thibmo on April 18, 2015, 11:04:20 pmDon't.

author: picandmix
author_rank: Frequent Contributor
timestamp: April 19, 2015, 09:14:53 am
content: Your original post was to make a more simplified but versatile version of the Arduino, but honestly, as anyone can see, you have effectively ended up with a Uno clone layout.Think you are being rather unfair to say forum members have treated you badly, when all they have done is given helpful pointers and constructive criticism; surely thats what posting on the forum is all about, airing your ideas and asking for critique.From the level of your designs from the opening post to your later versions you clearly have an ability in pcb design so why be so defeated if you do not agree with some of the views given.I find pcb design very relaxing and enjoyable , an integral part of the hobby, so why exclude it from your life ...

author: hamster_nz
author_rank: Super Contributor
timestamp: April 19, 2015, 10:15:00 am
content: Hi! I like Delphi too - much maligned for no good reason...Try not to take what has been written too much to heart. EEVblog posters are people who feel passionately about their hobby/work, to the point of making this craft their art - sometimes to the point of arguing about how many angels can dance on the head of a pin. So while all the advice has a bit of truth (or maybe even quite a lot of truth) to it, you will always get a mixed response to any projects you post here. Think of it as walking into the local photography club and said "here is an awesome photo I took on my cell phone" - even if it is a truly awesome photo the turf has to be defended (and the exclusiveness of $$$$ cameras and lenses) .For example, although the majority of people here would barf at the idea, you can successfully build an Arduino board using a $15 ESD-unsafe unregulated mains soldering iron, using crappy-as-heck multicore solder, without any flux, using though-hole parts that have been sitting in a junk box for years, on a single sided PCB. You can even test it with an "you'll be dead in your boots" $8 made-in-china non-RMS meter - and it can work just fine (and you will still be alive after using the meter too) - but maybe use an IC socket. Seehttp://www.arduino.cc/en/Main/ArduinoBoardSerialSingleSided3if you want to see a design - and it doesn't have a ISP header either :-)Make some PCBs, build 'em up (after cussing that you didn't add any labels on the silkscreen, and you have a few bad footprints), test em, add a few bodge wires if needed and then go on to make rev 0.2 if you really need to or want. Even if you make a few mistakes you will get far more skills, learning, fun, understanding and satisfaction than worrying about how many angels can dance on the head of a pin.

author: zapta
author_rank: Super Contributor
timestamp: April 19, 2015, 12:32:25 pm
content: Quote from: picandmix on April 19, 2015, 09:14:53 amSo what?It's a hobby.

author: thibmo
author_rank: Contributor
timestamp: April 19, 2015, 02:11:45 pm
content: It'd not just about the EEVBlog posters, it was also published and updated on two other forums.Over here I had one that bashed me quite annoyingly, but I guess that's just what Dutch people do, hence I have plans to move to Germany.And yeah, it turned a bit towards a clone, due to all the options that people wanted and all the protection, plus power stability improvement..For now I am just going to let it cool until I have some ideas again.Then maybe I would implement things like an internal UPS or something like that.For now, a few million lines of code to worry about.

author: Seekonk
author_rank: Super Contributor
timestamp: April 19, 2015, 03:08:40 pm
content: I made a career out of people bringing me boards telling me to make it better and cheaper. It is a cheap shot. It is easy to take anything and make it better the second time. I can make any of my boards better the second time. I worked with a guy who would hide his schematics when I walked by. You don't want to be like that. Honestly, the project was absurd from the beginning. A 328 isn't suitable for anything beyond the $2 mini board. I love them, cheap and you get a proto board to solder to. That you can't improve on.

author: thibmo
author_rank: Contributor
timestamp: April 19, 2015, 05:11:31 pm
content: Quote from: Seekonk on April 19, 2015, 03:08:40 pm^That's what I meant.And uhm.. Please don't look at the tiny specs, look like a programmer.The mini board is a piece of shit, again from the programmers perspective, compared to the mini board.I will explain, because you probably won't understand what I mean, seeing the way you commented.I, as a programmer, always prefer overhead, what is overhead? Over head in the programmers optic is extra space for storing the data, extra pins to program, for example, in the case of an ups one would need a heartbeat function, to a pin that goes in and a pin that goes back to ground.Also, I look at the clock speed, in the case of this it's a fixed speed, the speed of the oscillator crystal.Then there is a model, that consists of the following: flexibility, security and ease-of-use.If you give one option more strength, the others weaken.So if I make it more secure, I lower the ease-to-use and the flexibility.So how do I compensate for it?In this case, a zifsocket, a full line of 6 extra ground pins and 2 options for ICSP.It makes it a little less secure, but increases the ease of use and flexibility by tons, now please tell me why you enjoy bashing on people who just try to LEARN something and make something (without using reference sheets, except for the firmware.)I'd love ask the people who just nag and don't come with improvements or help to not reply at all.I don't care about cheaper, I only care about giving people what they want for a reasonable price and a good quality, unlike $2 products that are assembled with the worst batch of Chinese and Thai junkyard scrap electronics.I also go to Global Electronic's production hall without all the so-called company board revisioning blahblah.I made it the way I want it to be, no need to change that.Anyways, thanks for the reply, just leave your shitty day at yourself and don't annoy other people with it and have fun with your $2 mini board that has too few features and too bad of a quality for me to even dare to think about buying one.

author: BloodyCactus
author_rank: Frequent Contributor
timestamp: April 19, 2015, 08:48:06 pm
content: dont sweat it the criticism, I made one for PIC32, a zif socket, crystal and icsp header. all pins broken out to female header. they have came in remarkably handy. i have one sitting next to a breadboard for something I am working on now. get one of your boards fabbed, put it together and see how it goes and dont sweat the other people.

author: thibmo
author_rank: Contributor
timestamp: April 19, 2015, 09:18:06 pm
content: Quote from: BloodyCactus on April 19, 2015, 08:48:06 pmThanks for the reply.And yeah, that's true.It's just the costs at the startup that are bugging me as of right now.Just a poor student, you know.When I am have the time again I am going to work on it, then eventually I will get a few test samples and put them together.

author: hamster_nz
author_rank: Super Contributor
timestamp: April 19, 2015, 10:33:49 pm
content: Quote from: thibmo on April 19, 2015, 05:11:31 pmIn the software world, overhead is free - if you have a truckload of code that never runs it costs close to nothing to have it sitting on disk, waiting to be paged in. If you have a micro with 32k of flash, it doesn't matter if you use 8192 bytes or 32768 bytes, the cost will be the same - until you need byte 32769In the hardware/electronics world overhead costs actual money. Maybe it is not really appreciated when making hobby projects, but where you will be manufacturing in any volume it costs. A small SMD part might cost approximately half a cent. If you are doing a short run of hand built prototypes assembly house might charge $0.10 (e.g.http://www.seeedstudio.com/service/is $0.05c per pin). If you are making a million units, the part cost alone is a $5,000 decision, and the assembly cost might be many times that.So for hardware projects reducing overhead is the name of the game...

author: thibmo
author_rank: Contributor
timestamp: April 19, 2015, 10:55:32 pm
content: True, true.But it's not what I am after. ^_^I prefer the controller to be capable of doing stuff like driving 4, yes it is possible, small lcd's if the person would want to, and then even keep space for functionality.It's not that I want to leap to an mega kind of thing, but eh, were there any needs for on-board things it'd be nice to have extras.I am not really a guy that enjoys making a huge profit off of things, if the product costs so-much to make I'd just add a small percentage, say 10%, to the price and off to the buyer.Cost saving ruined electronics more then enough already.If a person wants to have a unit with less mem on-board that's fine, just get the cheaper one, want more mem, get the more expansive one. ^_^It's not that I will use military grade stuff, that's just not affordable by most of the people that enjoy DIY, a good price-for-quality is what I like.Not the story of promising high quality and delivering a product that has an almost identical part but less mem and less durability to save $0.05 per product. O.oI don't plan on becoming rich by this, I am just a hobbyist sharing the stuff I make.Even the software I work on is free-opensource.Yes there is an option to donate but it's not forced on the user and it's not spammed in their face.Just a bunch of happy opensource stuff.And if I assemble it, sure I add a bit to it to buy a beer from and to make my girl happy with a day at the mall. Who wouldn't.