Sunday, August 7, 2011

Beyond Bare Bones Boards ....

The very second after i finished building my first Arduino bare bones clone I already knew what could be done to improve on my design. A member on the Arduino forum also gave me hints as to how i could improve the design after i posted issues i was having with this new board and the timing being off. I will admit the board is very unstable..when i upload the Blink sketch it blinks at about half the speed instead of once per second i notice its at about once every 2 seconds which means it might be working from the Atmegas internal oscillator and not my external crystal. Now this could be because of my soldering which is very bad and possible cold joints.  Now if you look at my pcb design towards the bottom you will notice  i basically connected the ground of the ceramic capacitors leaving my crystal together , along with the ground of the reset button and the extra grounds headers i added. this is called a daisy chain and it is not at all a good idea.  Sometimes my clock speed is good and sometimes it at half speed so the board is very unstable. but then again it could be my soldering
Now below is my second version of it, I was advised to make a fat trace connected to ground,  and anytime something needs a reference to ground just connect it to the fat trace and not together with another  lead that is going to ground I also decided to reference the ground from the capacitor after the regulator instead of grabbing it from the regulator itself  like i did before, i figure since in real life electron flow is  from negative to positive then i might as well grab it from the capacitor after its been regulated and smoothed out . This is exactly what the man on the forum said
"I'm not seeing a .1uF bypass capacitor going from the VCC on your chip to GND. (edit: I just spotted it, it wouldn't be filtering/bypassing that far away from your VCC Pin, it's effectively not there doing it's job) 

Also, ground trace should not daisy chain from one component to the next, especially if one of the components on there is a crystal. Noise from internal switching on the microcontroller will get introduced to your ground all over that trace and will raise the 'potential', basically you won't have a true ground to reference anymore. Also, it's one long electromagnetic antenna, picking up radio frequencies. This could potentially effect your timing.

If you were to redesign, I would recommend either learning about polygon ground pours or, at the very least, draw one huge fat ground trace up the middle of your board and have all components that need to reference off it connect straight to that, not each other.








I have not yet made the second version with the improvement so i cannot comment on that but i will post as soon as  i do. [UPDATE: i did a little resoldering and changed the crystal and capacitors just to make sure and it is working much better now , no hicups so far ]Now ignoring that little issue lets get into other ways it can be improved.
You can see i bent the voltage regulator back to lower the over all profile of the board. 
However the towering capacitors are not as friendly when it comes to bending. 

The best fix for this is SMT!! surface mount technology. I could get some surface mount electrolytic capacitors like the ones on the Arduino 
I could also get the surface mount voltage regulator most similar to the Arduinos MC33269D-5.0
The only issue with all these SM components is that if you have not noticed my soldering is far from pretty and that is using regular components , now imagine trying to solder smd's (surface mount devices) .


Another thing my clone could use is a way to bootload it with out having to remove the chip. This is simple
All i would need are 6 male header pins or a little ISP box which is basically 6 pins in 2 rows of 3 
To go about  the actual programming i could use my USBTINYISP i got from ebay for about 11 bucks here
which i do recommend anyone getting it because a pre loaded chip with arduino firmware is about 2 bucks more, so after a couple of projects you'll save your self a lot of money. specially if you buy chips in bulk. 


plug this baby to the 6 pins i theoretically added  on my board and use the Arduino Ide to bootload the chip
Tools >> Burn Boot Loader >> w / USBTINYISP 

The question is what do I wire the 6 pins on my board to? 
Simple.. Look at this picture of the 6 pins and it shows where on the 328 they go wired to
NOTE: the number on the 6 pins does not mean it goes to pin 1 or 2 or 3 ... of the 328 thats just the number of those pins .... for example Pin 1 on the ISP pins go to PROG_MISO which is pin 18 on the chip. 



Pretty straight forward. I have yet to actually do this but i will post as soon as i do. I have to order some blank chips, being broke and unemployed does not speed the process either :( 

Furthermore I could add a usb to serial interface , I do not know the actual process and components involved in doing so but I do own the module from sparkfun for 15 bucks 


Now this little thing i simply Connect its TX to My boards RX and its RX to my boards TX pins and add ground and 5v and it  shows up on my computer  as a COM port  and  i can upload sketches through it with my Arduino ide. But at 15 bucks it kind of defeats the purpose of making your own Arduinos because this piece alone racks up the price, so I can do with out it and just pop the chips out to upload a sketch or simply add the female headers to my board and wire this baby to it and simple as that, but i would not permanently mount this to anything since its 15 dollars. 


To further develop my board i printed my  circuit board. But I will use a new post for that since it is a process in it self, and very easy might I add. Publish Post




No comments:

Post a Comment