Is arduino the best? - Page 1
Forum section: electronics / general

author: Anson
author_rank: Regular Contributor
timestamp: March 14, 2013, 01:59:12 am
content: I'm new to the electronics hobby. I am trying to learn I'm not young anymore and because of medications for disability I am limited to how quickly and easily I can learn. Being disabled has also made my income and allowable expenses for the hobby very limited. My question is which is easier and more cost effective for programmers it seems everything electronics is arduino or pic based so I figure I should learn one or the other. From my readings it seems the arduino is a bit more user friendly and has a larger user base but I kinda like the abilities that the pic chip enables. I will ahve to save up for a while before I can purchase either of these anyway but more feedback on what system is easier to learn and more worth my time would be appreciated. i found this on the net and it looks very interesting any thoughts?http://www.mikroe.com/easypic/

author: Harvs
author_rank: Super Contributor
timestamp: March 14, 2013, 02:15:21 am
content: Learn to program one micro in C and you've pretty much learnt the core of programming them all.If cost is you biggest concern, just pick up something cheap. Seriously something like an Arduino for $15 from china off ebay or an MSP430 for $10 (and I'm sure there's some cheap as PIC boards as well,) is all you need to start with (and a few led + resistors etc, again off ebay as you need them.)The number of freely available resources on the web for any of these platforms is huge. The most important skills to be developed aren't platform centric, they're the generic ones.

author: MikeK
author_rank: Super Contributor
timestamp: March 14, 2013, 02:56:23 am
content: https://www.eevblog.com/forum/microcontrollers/which-microcontroller-to-start-for-beginner-for-my-needs/

author: Mike Warren
author_rank: Unknown
timestamp: March 14, 2013, 03:37:15 am
content: If you're interested in actually building things, rather than programming them, then I would not recommend Arduino. They are great if programming is more what you're interested in.If you have a breadboard, just grab the cheapest PIC or AVR you can find and the basic programmer for it (PICKit3 for PIC or AVRISP MKII for AVR) and plan to start simple. Just flash an LED. Then you can move on from there. A dev kit is another way to get started. Slightly more expensive, but more features too.For PIC, there's PicKit3 Debug Express, and a good start for AVRs is to get an Arduino board like a Leonardo (and the AVRISP MKII programmer) and erase the Arduino stuff off the chip.I wouldn't recommend jumping in with the kit you mentioned unless you can easily afford it. Get started as quickly as possible and grow from there. At least you will have something to play with while saving up.There's lots of tutorials, sample code and help on the net for both PIC and AVR.

author: blewisjr
author_rank: Frequent Contributor
timestamp: March 14, 2013, 01:58:32 pm
content: I would say arduino is a solid base line for starters with no experience in wiring up circuits or programming. The programming side is built around a framework that handles most of the lower level details so you do not need to worry about them. For instance it is much easier to modify the I/O ports on the AVR as well as interface with externals like LCD's due to the interfacing code being done for you in the arduino LCD library. Wiring is a bit easier because of all the adapter shields that are out there ready made for you. It is often as simple as slapping on the right shield. It could get more complicated as you start doing more advanced stuff. One such limitation of learning is that the arduino framework does not map pins like they are actually mapped on the AVR chip they actually change the pin layout through abstraction so instead of having x number of pins on each port you are seeing x number of pins. So you do not need to worry about ensuring you are accessing the right pin on the proper port the framework handles that for you. This could be annoying if you decide later on to go with straight up AVR down the road because you are not learning how AVR works you are learning how Arduino work. This in the long road can be a major setback. You could however get an arduino and a AVR book and just make the pin translations and learn AVR instead this way you do not need to pick up programmer hardware initially.I have an Arduino UNO and I have not touched it yet. I plan to down the road but probably more so as a AVR platform rather than a Arduino platform. Right now I am using PIC uC's.As to answer is Arduino the best I would say no there is no best platform like there is no best programming language. It is a means to an end to learn electronics and uC's. Each chip and or platform has it's pros and it's cons. In your situation I would say Arduino is a solid place to start as it is easier to learn initially. Overall the decision is yours as it really depends on what your ultimate goal with it is.

author: free_electron
author_rank: Super Contributor
timestamp: March 14, 2013, 06:14:30 pm
content: the problem with arduino is that you neither learn electronics, nor programming....it is the closed-source of the open source world.let me explain :- it uses a dedicated language not available on any other chip. While it is C based it is NOT C , nor is it portable...- it uses a single source cpu made by 1 vendor : atmel. so this does not give you a big pond to fish in. learn an 8051 or an ARM Cortex core and you have thousands of chips from hundreds of manufacturers to pick from... atmel ? one chip , one vendor.. if they go tits-up it's game over. ( and they are in trouble.... microchip already tried to 'borg' them last year )For these two reasons it is as closed-source as it can be. a language that only runs on one chip. ( yeah yeah i hear you there is also the 2560 and now they are going to release an arm based arduino... but it still stands : you are stuck to what arduino feeds you. Get a c compiler for ARM cortex and you are home free)as for not learning electronics : it is so simplified that people don't get much further than building 'shields'. actually developing shields? not done apart from people interested in making money off selling them.i visited the local Arduino meetup a couple of times. There are endless discussions about : i need to drive a stepper moter with a bit more 'oomph' and my stepper motor shield can't cope with the current. does anyone know a shield with more current ? no ... oh .. darn.. while someone who knows a bit more about electronics simply goes to digikey , picks up an LMD18101 or some other power bridge and makes one. PCb layout ? no problemo.Arduino is the 'Duplo' of electronics. It's not quite Lego ...

author: gibbled
author_rank: Regular Contributor
timestamp: March 14, 2013, 06:22:33 pm
content: The arduino language is also available for the TI msp430's in the form of the energia project.http://energia.nu/

author: Smokey
author_rank: Super Contributor
timestamp: March 14, 2013, 07:12:16 pm
content: Quote from: free_electron on March 14, 2013, 06:14:30 pmHa! Love it. Someone should imbed Adruinos in those giant blocks as the shield interface connection and case. Rock solid!As far as I'm concerned, and I've never actually used the Arduino hardware so I'm not sure how much use my opinion is, the best thing about Arduino is the big library code base. It's kind of like the Iphone in that while there are different Adruinos there is really only one version of the basic hardware so you can be pretty sure that some program written for it will run on it. Using some existing Arduino libraries and porting the code, mostly interface stuff to ICs, to my projects has saved me a bunch of development time. It's nice being able to reference a known (or at least assumed) working implementation of something even if you are going to rewrite it. If you really have no experience in embedded systems Arduino seems like a good first step, kinda like duplos. It just might take a lot of them to make a giant death star model.Quote from: free_electron on March 14, 2013, 06:14:30 pmSounds like that's a great place to get feedback about what shields people are looking for. Side business?It looks like the domainwww.arduinoshields.comis for sale for only $1695 USD

author: blewisjr
author_rank: Frequent Contributor
timestamp: March 14, 2013, 07:58:30 pm
content: Quote from: Smokey on March 14, 2013, 07:12:16 pmOnly $1700 bucks I bet you can make that back in a day. What I don't understand is why someone who is interested in electronics hence the Arduino stuff would be afraid to make their own shield to up the oomph. How can someone be afraid of learning something new!!! The other common issue I have noticed is people not being able to get enough drive off the PWD pins themselves because the bootloader and arduino libraries hold them back. The question usually is how do I get more oomph of the PWD. The answer is typically stop using the framework and bootloader and code right for the chip and people stare like just mentioning that is treason.

author: Harvs
author_rank: Super Contributor
timestamp: March 14, 2013, 11:30:12 pm
content: Quote from: free_electron on March 14, 2013, 06:14:30 pmHonestly I think you're stretching it a bit there. I'm not one to defend Arduino, but I think you're giving it too much credit. It's just the AVR-G++ port, with a few extra libraries and a background process to give the timing/PWM stuff, all wrapped up in an environment to make it sound less offensive to arty types (like calling a program a sketch grrrr.)To say it's not C is kind of like saying because I use the CMSIS libraries when programming an STM32 I'm not really programming in C. Yes it is C/C++, and always will be because that's all the compiler understands.Arduino is just AVR-GCC with a stupid software framework. But there's nothing stopping you from just using Atmel studio, or eclipse and uploading the binary.

author: c4757p
author_rank: Super Contributor
timestamp: March 14, 2013, 11:38:48 pm
content: Quote from: free_electron on March 14, 2013, 06:14:30 pmNo, it's not C, it's C++. Pure C++. Quite portable, and if it's not available on any other chip it's only because nobody else is silly enough to use an OO language on a microcontroller.Personally, I find that an advantage. Arduino is stupid easy to learn. That's how I started with microcontrollers - because it is C++, of which C is (mostly) a subset, I was able to move from Arduino to real MCU programming piece by piece. Of course, I actually wanted to. After I was programming AVRs entirely in C, I got some PIC stuff (the assembly language is marginally simpler) and started working on assembly.That said, it's a good starting point, but there are so many people in the "community" who think it's the ending point. It's agoddamn AVR dev board(and a particularly crappy one at that) and a software library, not a magical I'll-use-this-because-god-forbid-I-touch-a-transistor solution to all problems. I have a pile of dev boards and have not once used one in an actual project. They're for tinkering and learning a new platform. Don't fall for the hype.

author: darrylp
author_rank: Regular Contributor
timestamp: March 15, 2013, 12:32:14 am
content: Quote from: free_electronDuh, go look in the install directory, its c++, I can see the source code to it.Want to change the print class , go on ahead cos its open freely available to read / modify as you need.Me personally I've implemented mods to the string class, the print class, the hardware serial routines.Of course its made easy to work on atmel chips, but its no longer just the mega low end or high end, its now arm based as well. For a learner its a good step, that can grow with you.--Darryl

author: c4757p
author_rank: Super Contributor
timestamp: March 15, 2013, 12:43:03 am
content: Quote from: darrylp on March 15, 2013, 12:32:14 amUgh. Whyyyyy?! Growout of it. It's so incredibly inefficient and removed from the hardware. Sure, "removed from hardware" is fine if you are a software guy, but for software guys, I hear Intel makes some really bangin' "microcontrollers" these days...You should be growing out of the string class, print class, and hardware serial routines, not modifying them. I can do serial comm on bare AVR/PIC in three or four lines of code, double for assembly. You can dump a string to serial with a two-line loop, no function calls needed (of course, if you want a function, you can wrap those two lines in a function in about 20 seconds). On a microcontroller you shouldn't need much more than a basic strcpy andx-to-string functions, which you can get from avr-libc (and they're fairly efficient), so no need for special string and print crap either.

author: Anson
author_rank: Regular Contributor
timestamp: March 15, 2013, 02:05:05 am
content: Sounds like arduino isn't for me then. I was kinda wondering about it because it seemed focused on all these attachments for it. It didn't really look like you do that much. I want to take a chip stick it in, program it to do something and then use it and then I want and go from there. Now I just have to save up for some chips and a programmer. I only get $25 a month to spend so it may take me a while. Any one want to donate a programmer? ...and some chips? ...No? Maybe? I'm sure I'll end up frying the first few I did the first 555 timer I bought don't ask how, it was dumb, no really it was.

author: c4757p
author_rank: Super Contributor
timestamp: March 15, 2013, 02:22:27 am
content: I wholeheartedly recommend buying microcontrollers and a programmer to anyone who wants to advance past blinking some LEDs and hacking together some random sensors. The vast majority of MCUs require no more than a couple capacitors to run. That's why I dislike the Arduino as a hardware platform so much - it adds nothing but a USB-UART bridge. (That bridge makes them very easy to get started with, though.) It's just the collection of everything in one place that makes them beginner-friendly. Actually, I'd recommend one more thing: a USB-UART bridge. FTDI makes some. Nice to be able to quickly get serial output from the chip.Just be careful with them and you shouldn't fry them. AVR and PIC especially are surprisingly robust. As for programmers - they are "cheap" (electronics-hobby cheap) and easy to find, and at least for AVR, you can build one yourself on a serial or parallel port with just a few discrete components, so I recommend this if you needcheap. I believe PIC requires a high voltage pulse to program them (this can be shut off in the configuration, but I suspect you need to at least configure it once with HV to disable it for future programmings, and it is enabled by default), so a quick dongle-type programmer may not be so easy. I may be wrong, though.One warning/piece of advice, if you're worried about damaging the chips: if you set the "fuses" (as they are called on AVR) wrong, the chip may refuse to run, but it is not dead. I've found this particularly easy to do on AVRs. I have a few of them waiting to be brought back to life - I've never done this with a PIC. They just have the wrong clock settings and can be restored with a parallel programmer (mine is in the mail). If you can't afford a parallel programmer, pay special attention to the fuse settings.Quote from: Anson on March 15, 2013, 02:05:05 amWe all release magic smoke from time to time. Nothing to be ashamed of, your first magic smoke is a rite of passage.Just be glad it was a cheap 555.

author: oPossum
author_rank: Super Contributor
timestamp: March 15, 2013, 02:31:12 am
content: Quote from: Anson on March 15, 2013, 02:05:05 amYou can get a MSP430 launchpad and a Stellaris launchpad for $23 (for both, shipping included).Both have an integrated programmer and debugger. The MSP430 launchpad comes with 2 DIP chips that can easily be used in a breadboard.The MSP430 has a elegant small instruction set that is great for learning the fundamentals of microcontrollers. The Stellaris is an ARM Cortex M4F.

author: c4757p
author_rank: Super Contributor
timestamp: March 15, 2013, 02:38:05 am
content: Quote from: oPossum on March 15, 2013, 02:31:12 amI didn't know that! I figured it was all SMD like a lot of these newer boards. That's greatI may have to check it out myself.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 15, 2013, 02:58:11 am
content: I've got a ton of Atmel AVR microcontrollers. More than I'll ever actually put to use.If you're a US resident then send me a PM with your address and I'll drop some in the mail to you. If you're not in the US, sorry, but it will be too big of a pain to ship outside of the US.The thing is the MCUs won't do you any good without a programmer. I can probably hack one together from parts I have on-hand. That's just it though, it will be a hack so you'd want to get something better when you have a chance. The programmer won't be compatible with Atmel Studio so you'll have to use avrdude. That's not such a big deal, though. avrdude is actually very powerful--just not friendly for noobs.If I knew you'd actually use it, I'd give you an Atmel AVR Dragon. I've got one that I never use. I got it at a Atmel workshop. I've already got a JTAGICE MkII and an AVRISP MkII so the Dragon just sits in its box unused. The problem with the Dragons is they're not particularly beginner friendly and they're buggy. Mine is a revision A which has a bunch of known hardware bugs.Let me know if you're interested in the MCUs and a hacked-up, homemade programmer. It will take a bit to put together a programmer but it's no problem--I'm in need of a project.

author: AndrejaKo
author_rank: Frequent Contributor
timestamp: March 15, 2013, 10:09:16 am
content: Well it seems someone mentioned mikroElektronika, so I may as well bash them a little bit!Basically they tried to be Arduino before Arduino and failed to get as popular. Sure, they have those large nice looking boards with a programmer and lots of switches and connectors and they have their own "click" expansion boards and various other accessories, but...First they're pushing their own (non-free) compiler with that platform that goes the "Arduino" route, meaning that is tries to hide the complicated part of functionality from the user and it does so by decreasing flexibility. It's been a while since I used it, but I remember that for example if you want to use included ADC function, the PIC is going to wait for the ADC to finish before continuing on. There's no (easy) way to set up an interrupt to be triggered when AD conversion is complete. Also the serial port input function will wait for something to come out of the port. If I remember correctly, it isn't easy to use serial port with interrupts when the UART finishes receiving a byte. So the "basic" programming is very easy, but anything more advanced is at least as difficult as it is in Microchip's compilers if not even more.Then there's the hardware side. The boards are of reasonably good quality (mE even did some analog boards for Texas Instruments) but the programmers/debuggers included on the board only work with mE's software (and examples for other peripherals are written in it, of course), so you can't get one of the industry standard IDEs for PIC and just use the board with it unless you get a separate programmer. Until recently their boards didn't even have external connection for a programmer and debugger. Furthermore that route decreases the value of the board, since an external programmer is needed.Finally there's price. Such boards aren't cheap and are often outside of hobbyists budget. When they first appeared, they weren't that much more expensive than the demo boards made by chip manufacturers, but today when you can get an ARM board for less than $20 shipped, the situation is very different.So get a programmer and a breadboard and start experimenting.

author: Anson
author_rank: Regular Contributor
timestamp: March 15, 2013, 06:37:09 pm
content: Thanks TerminalJack505 I sent you a PM. Looks like Arduino is out and so is mikroElektronika. Thanks to TerminalJack505 it looks like I will be using AVR's on a breadboard wich actually sounds really awesome to me I think I will learn much more this way than just using shields and specialized boards on proprietary coded products. I was really looking strongly into pic or atmel anyway. Maybe later I can pic up some Pic stuff ha play on words I made a pun. ...ok I know it wasn't funny but I had to do it anyway.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 15, 2013, 07:24:16 pm
content: I got your PM. I'm going to try to base a programmer off ofthis design. I'll use the firmware mostly as-is. Although I want to try to run the MCU at 20Mhz instead of 12Mhz so that USB CRC checking can be enabled in the V-USB library. I've heard about people using these and bricking their MCUs and I suspect that packet corruption is to blame. The firmware can't do CRC checking at 12Mhz which can be a problem when writing fuses and whatnot.I'll add a few features and remove a few to make it more robust. I'll add level shifters to the programming I/O pins so that it can be used for target voltages other than 5V. I'm going to remove the 'Supply Target' feature since that can get you in trouble if you forget about it. (This basically supplies power to your circuit through the programming header.) I'll add a couple ofotherheader pins to the board that you can use to power your target should you need it.I'll also change the header to the standard 6-pin ISP header. The design uses a 10-pin header and has hardware provisions for a pretty cool serial interface feature but there's no support in the firmware for the feature. Because of this there's no need to use the non-standard header and pinout for the programming header.The 'Self Programming' feature will have to go due to the addition of the level shifters. (The level shifters I'm going to be using are uni-directional.) There will be another ISP header and some multiplexing logic to actually do the self-programming. (This is a feature you may never need. In any case you would need another programmer to do it.) I'll probably have some components on the board for debugging purposes as well--just in case I need them during development.If it works it should be pretty robust with all the input protection and whatnot. It will actually be better than a lot of the Chinese clones that you see out there based on the same design. I'll be using parts that I have on-hand. This means that some of the parts won't be ideal or the parts "I should have used" but there shouldn't be any problems. For example, I don't have 3.6V zeners to clamp the MCU's output to ~3.3V (like they use in the original design) so I'll use a shunt regulator and a couple of diodes for that. (This will actually create cleaner waveforms than the zeners, anyway, and save some power since the outputs won't need to use as much current.)I'll try to post a schematic later tonight or tomorrow and we'll see if anyone has any concerns or additional ideas.

author: Slothie
author_rank: Regular Contributor
timestamp: March 15, 2013, 09:24:08 pm
content: There are a lot of people on here that really don't know what theyre saying, or at least don't think before they type.Programming, like electronics, is a skill of many parts. Learning a language is just one small part of it. Experience programming in Arduino's libraries, PIC Basic, C, Assembler or gibberish will give you skills in programming that you will take with you as you move from platform to platform, language to language. Programming involves learning tospecifywhat you want,splitit into small managable bits,programthose bits, fit the bitstogether, then work out why its not working (debugging).!Disclaimer: Yes I use arduino's. But I also program in C and Assembler on PICs, C, C++, FORTRAN, Python, Javascript etc on everything from mainframes to telephone exchanges. I've been a programmer in industry for 35 years so I have begun to get the hang of programming.The Arduinohardwareis really just an AVR with a crystal and an usb/serial interface, and a lot of places to connect wires. You don't HAVE to use the Arduino software, you could connect up a JTAG programmer, use the Atmel tool chain to compile programs and use AVRdude to program the device. You can even get variants line theBoarduinoorArdweenythat will slip into a breadboard if you want.The Arduino dev environment is pretty minimal, its true, but its designed for people who aren't experts, i.e. beginners. And its a poorly kept secret that if you want to cast aside the strictures of the arduino libraries, you can actually manipulate the AVR's registers and tender internals directly, straight from the "arduino language" - AKA C++, one of the top 3 most used programming languages in the world - so its far from "closed off" as some experts on here would have you believe. You can even insert Assembler code into C++ programs for those really time critical bits, so you have no reason to feel emasculated.Getting back to practicalities, as well as the stuff TerminalJackson mentions, one accessory that I find is essential these days is a USB-serial cable that communicates at logic levels, often called anFTDI cable. If you're being a manly man and building your microcontrollers and programming them with an AVR ot PIC programmer, you'll still need some way to send and receive messages while debugging, at least, especially when you're a beginner..Of course, a USB Arduino has one of those built in for free....

author: westfw
author_rank: Super Contributor
timestamp: March 16, 2013, 02:15:12 am
content: QuoteYou can dislike Arduino for any number of reasons, but the above statement is simply WRONG.Arduino, under the hood, uses the standard gnu avr-gcc C an C++ compilers. This makes it more "standard C" than most microcontroller C compilers, since it lacks the usual "bit definition" extensions that many add in order to be able to produce reasonable code for accessing SFR bits ("sbit OV = PSW^2" in Keil's 8051 compiler, "reg.bit" in Bytecraft MPC, etc.) It's as portable as C/C++ code for a microcontroller ever is (keeping in mind that C++ compilers are relatively rare and rarely used on small microcontrollers, but also that gcc supports more architectures than any compiler, ever.) The Arduino core libraries have already been ported to MSP430 and ARM chips, making "digitalWrite(pin, 1)" a more portable way of setting a chip's output pin than any other library I'm aware of.All that said, if you're an absolute beginner with no programming experience as well as no microcontroller experience, you would probably be better off taking some sort of introductory programming class that writes software for your desktop computer. There are a lot of programming concepts that you need to know about, if you're going to actually LEARN, that are pretty much portable across cpus, languages, and environments. Net cost for this would be ... nothing, assuming you already have a PC.(Unfortunately, a lot of today's "intro to programming" classes jump right into desktop-specific things like graphics and windows and mouse events, in an attempt to grab the student's interest. IMO, that makes them less general, and less effective as an introduction to microcontrollers. Sigh.)

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 16, 2013, 06:31:47 am
content: For anyone interested, here's what I have so far on the programmer design. The only thing left to add is the (regular) programming header, level shifters, current limiters and input protection.It's past my bedtime so I'll try to finish the rest of the draft up tomorrow.If anyone notices any obvious FUBARs let me know.

author: westfw
author_rank: Super Contributor
timestamp: March 16, 2013, 09:00:03 am
content: Quotethat part doesn't look like it's connected properly. You have your +side clamp diodes going to +5 from the USB instead of to your ~2.7V regulator output. Will the shunt regulator sink current? It will need to, when used this way, right?I've seen people suggest that you can use (green/blue/white) LEDs in place of zeners...

author: Smokey
author_rank: Super Contributor
timestamp: March 16, 2013, 10:18:33 am
content: That seems like a lot of work when for 14.95USD you can get a professionally assembled and tested programmer. They have 57 in stock, and a portion of sales goes to Limor Fried.https://www.sparkfun.com/products/9825Or 12.95USD if you don't mind a good old serial port and it supports your chips.https://www.sparkfun.com/products/14If you can't realistically afford to spend 15 bucks on a core development tool you will use over and over and should last for years, then electronics probably isn't the best hobby. Just saying.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 16, 2013, 03:36:16 pm
content: Quote from: westfw on March 16, 2013, 09:00:03 amSo far as I know that should be correct. Maybe I'm not seeing what you're referring to.I simulated it before drawing it up. I've attached the simulation results. One thing I'm not so sure about is if the 100n cap should be so big. I also want to add the line capacitance to the simulation but need to look that up.I saw the trick about usingdiodesLEDs. I'll keep that in mind just in case.Yes, the TL431 will sink current. Shunting current is basically how they regulate. It can sink up to 100mA. Basically it's a programmable zener diode. It's finicky about capacitive loads, though, which is why I put so much capacitance on it's output. It will oscillate if the load capacitance is within a certain band.The TL431 is a kind of Swiss army knife of electronics. You should check out the datasheet.Edit: Said 'diodes' but meant 'LEDs'.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 16, 2013, 04:00:11 pm
content: Quote from: Smokey on March 16, 2013, 10:18:33 amHopefully this won't be too much work. I'm pretty much basing my design on work that many other people have already done. I might even be able to make some improvements on the design if I can get it to work at 20MHz and enable CRC checking. I don't know if anyone's done that yet or not.Anyway, like I said in an earlier post, I need a project to keep me busy.I do agree that a person should probably be buying a professionally designed and manufactured programmer. As matter of fact, in principle, I believe everyone should buy the vendor's tools instead of a clone. Of course that principle only goes so far--just the other day I ordered a $40 clone as opposed to the vendor's $225 programmer.

author: westfw
author_rank: Super Contributor
timestamp: March 16, 2013, 04:07:19 pm
content: I don't know. I run into this problem myself.On the one hand is my collection of parts. Removed from equipment, retrieved from dumpsters, picked up via eBay, surplus shops, sample programs, excess inventory, etc. Years of loving hoarding, extensive stock of classic parts; I could build ... so much stuff.On the other hand, is Moore's law, and the current state-of-the-art in processors, evaluation boards, and hobby electronics. Even at $25/month, you can quickly build up a stock of modern systems with no hacking required to get going. Except that hacking was sort-of part of the goal in the first place.I would encourage you to get at least one piece of "it just runs" equipment, whether that's a TI LaunchPad,a full-priced Arduino, or a commercial respected AVR programmer. Once upon a time, I wrote a simulator for the 8085 processor. And an assembler. And I typed in a Forth implementation from a magazine, ran it through my assembler, and loaded it up on the simulator. Where it did NOT work, leaving me very frustrated with the fact that I didn't know which piece(s) of self-developed error-prone code was broken.You owe it to yourself to avoid whatever frustrations would be most frustrating an least fun to deal with, even if that means saving your "hack money" for a couple of months.Perhaps this is why Arduino is so successful; in the end you can plug it in and load the examples, convincing yourself that SOMETHING is working. The flip side is all those people claiming to use Arduino, when pretty much all they've really done is loaded the examples...TI has recently done some pretty nice, and VERY COMPLETE "web workshop" tutorials for their launchpad boards. They're a bit ironic compared to Arduino/etc, but they seem to specifically address some of the "start-up issues" ("I need how many tools, from where?") and delve pretty quickly into "real" microcomputer programming. MSP430 here:http://processors.wiki.ti.com/index.php/Getting_Started_with_the_MSP430_LaunchPad_WorkshopStellaris here:http://processors.wiki.ti.com/index.php/Getting_Started_with_the_Stellaris_EK-LM4F120XL_LaunchPad_Workshop?DCMP=Stellaris&HQS=StellarisLaunchPadWorkshop

author: westfw
author_rank: Super Contributor
timestamp: March 16, 2013, 04:13:34 pm
content: QuoteOh! I see. I missed the 1n4148s and thought your were clamping the data lines via the BAV99 diodes, but their cathodes are connected to +5V instead of your lower-voltage rail. You're actually clamping them twice!

author: Anson
author_rank: Regular Contributor
timestamp: March 16, 2013, 04:43:39 pm
content: Quote from: TerminalJack505 on March 16, 2013, 03:36:16 pmWhat program are you using?

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 16, 2013, 04:46:42 pm
content: Quote from: westfw on March 16, 2013, 04:13:34 pmYes, the BAV99s are input protection. They clamp to Vcc + 0.7V and GND - 0.7V. They're basically ESD protection, along with the 7v5 zener, which will be active whether the circuit is powered or not. I based that part of the design onthis particular IC. I don't happen to have any of those ICs on-hand but I can get the same functionality from parts I do have on-hand.The other clamping mechanism actively clamps specifically to 3V3. The MCU needs to run at 5V since it is running at its highest rated clock speed but the USB data lines are 3V3 volts so the 1N4148s are to clamp the MCUs 5V outputs.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 16, 2013, 04:49:53 pm
content: Quote from: Anson on March 16, 2013, 04:43:39 pmThat is TINA-TI. TINA is a commercial simulator but Texas Instruments licenses a version from them and makes it available for free.I also use LTspice and QUCs. I don't really recommend QUCs.

author: Anson
author_rank: Regular Contributor
timestamp: March 16, 2013, 05:04:30 pm
content: Seems stelaris is all smd. I don't have the capabilities to work with smd chips. I do like the sound and price of the pocket avr. The dangerous prototypes bus pirate looks even better. I may be able to squeeze out an extra 5 bucks next month for that. If you guys think it would be worth it. It seems to be able to program both avr and pic? Am I wrong on that? Is it run on proprietary software or just basic c? I once coded in c and c++ in my computer days before I became disabled I think I could pic it up again after a while. My goal is to have something I can plug a chip into or have it in a breadboard program it and place it into my project and have it work. I will be using sockets on all my projects so I can debug or replace in case I mess something up which I am sure I will more often than not. My medications effect my cognitive skills quite a bit so I do really dumb things from time to time. Arthritis and shaky hands make smd near impossible for me that and I don't have the equipment for it. To me it seems arduino is just to focused on plug and play. It seems to be all modules and prewriten code. The Msp launchpad looks very similar to the uno but I am assuming it is much different. Projects I have planned on working on include a motorized wooden train circling my sons room complete with sounds and a couple switch activated crossings. And for my daughter a home made wood boxed drum midi synth machine. I know these can be accomplished with analog components but I think an mcu would simplify and make things more well managed. i fully expect both these projects to take a year or more so I am in no hurry. i will be using these projects as a learning experience more than anything.

author: nctnico
author_rank: Super Contributor
timestamp: March 16, 2013, 05:13:47 pm
content: A bit offtopic: I don't like clamping to a power supply. Many regulators can source but not sink. If a large current flows into a clamped input you might end up destroying your entire circuit. Not to mention it will cause extra ripple on the power supply. Better use diodes and a zener (don't forget bias current) or shunt regulator. A MOV or transzorb may also be a good option. There are special zener/transzorb arrays available for USB, ethernet, and so on. Its better to use one of those than to try and come up with something yourself.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 16, 2013, 05:19:51 pm
content: Quote from: nctnico on March 16, 2013, 05:13:47 pmYes, I've seen designs that make that mistake. I saw a Digilent design that did that and they usually produce pretty good designs.That's the nice thing about the TL431 in this case--it can only sink current. It couldn't source current if its life depended on it.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 18, 2013, 12:34:45 am
content: Here's the latest version of this circuit. Unless major problems are found with it then this is likely going to be pretty close to the final version.EDIT: This still isn't quite right. I'll need to be able to tri-state the level converters so that they're active only during programming. The inputs to the level converters also have to be pulled-down to keep them from floating. The 100n caps on the top two level converters will probably need to be moved to the other side; between Vccb and GND since I'm sure Vccb is sourcing the current for the output. The datasheet doesn't seem to explicitly state which Vcc sources the current in which case so I'll have to see what TI's simulation model does.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 18, 2013, 09:56:56 pm
content: Here are the latest changes. There may still be some surprises once I start studying the code in-depth. The simulation model of the level shifters also didn't tri-state the outputs like they were supposed to (according to the datasheet) when Vcca was pulled to ground so I'm going to have to test that on a real device.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 20, 2013, 03:10:09 am
content: Anson, do you think you are going to need either TPI or PDI support? TPI is the programming interface that the 6-pin ATtiny MCUs use. PDI is what the XMegas use. The 6-pin ATtinys are available only in SOT-23-6 packages and the XMegas are only available in SMT packages.If you don't think you will need support for these devices then it will simplify things. I don't actually have any of the 6-pin ATtiny MCUs to test with anyway.Let me know. I'll probably start capturing the schematic soon.

author: Anson
author_rank: Regular Contributor
timestamp: March 20, 2013, 10:52:58 pm
content: That's Fine Jack. I won't be working with anything surface mount. You sure are going through a lot of trouble I sure do appreciate it.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 20, 2013, 11:20:19 pm
content: It's no problem. I didn't figure you would need support for either of these. At least not right away.The firmware I'm going to use has support for TPI but not PDI. Both are similar from a hardware standpoint so I might add support for them in a later version of the board. The level shifters and the standard programming header complicate supporting it so if you don't need it then we'll just drop it.I just discovered that the V-USB library only supports the USB CRC checking at 18MHz. You would think if they can do it at 18MHz then they could do it at 20MHz but they don't. I don't have any 18MHz crystals on-hand so I'll just use a 12MHz like they did in the original design. If I ever re-spin the board then I'll get some 18MHz crystals and include support for CRC checking then.

author: Slothie
author_rank: Regular Contributor
timestamp: March 22, 2013, 03:45:42 am
content: Quote from: Anson on March 16, 2013, 05:04:30 pmThats really only an artifact of the people using them - a lot of people like artists and makers just want something that works and want to be able to use devices without having to understand all the intricacies of the devices or soldering stuff together.I've used an Arduino board with a breadboard, using jumper wires between the two, and an array or obscure components and completely hand-built code in my experiments. Without having to solder a connection I've connected up the SID chip from a commodore 64 and got it to play tunes, interfaced a 30 pin SIMM just to see how it worked, made a (very) basic curve tracer for transistors when I needed to find some closely matched pairs, played around with 74 series logic chips to see how they worked & used the Arduino as a low-rent (&speed!) logic analyser/data logger.... And all written in the arduino environment. For one or two things I dropped into assembler to make things a bit slicker but that was an interesting experience in itself and probably not necessary its just I wanted to!Some of those projects I ended up making a little more permanent by unplugging the AVR chip from the Arduino (I tend to use ones with DIP chips in) and plugging them into a custom circuit board on stripboard. Ypu can then replace the AVR on the Arduino with another (I buy them pre-programmed, but you can use an arduino to program AVR's with a breadboard, jumper wires and a handful of components.....)I'm not disparaging other approaches/chips/dev systems at all, and I'd recommend in time that you try as many different ones as you can. I'd just recommend you don't dismiss Arduino as a toy, because its not. Its just a very well put together combination of hardware, software and libraries that can make things easier if you want them to, At least if you start with something like an arduino and can load the demo sketches and get them to work, you know that the reason your program isnt working is because of a mistake in your software - not a fault in your homemade programmer or hand-built dev board, or the configuration of your AVR compile toolchain....Ian

author: ptricks
author_rank: Frequent Contributor
timestamp: March 22, 2013, 04:02:34 am
content: If you are on a budget I can't recommend Arduino. While it is easy it isn't cheap and the shields tend to cost more than they should.PIC is the cheapest way to get started, how cheap ? Almost free. Sign up at the microchip site and they will send you free samples every month. Depends on what type of user you are but generally at least 3 free chips a month.Programmer cost is cheap as well, about $5 in partshttp://www.oshonsoft.com/picprogserial.htmlI know most people look down on BASIC as a language but if it works, use it.oshonsoft has a really good set of toolshttp://www.oshonsoft.com/pic.html

author: amyk
author_rank: Super Contributor
timestamp: March 22, 2013, 07:21:31 am
content: Quote from: TerminalJack505 on March 20, 2013, 11:20:19 pmSoft-USB relies onveryaccurate synchronisation to the bitstream. USB low speed is 1.5MHz; 18 divides evenly into that, 20 doesn't. That probably has a lot to do with it, as you need to sample each bit in the middle of its period. It seems they could get CRC checking to work at 18MHz but the additional delays needed to get the bit sampling times just right at 20MHz wasn't possible.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 22, 2013, 07:41:02 am
content: Quote from: amyk on March 22, 2013, 07:21:31 amYou're probably right. It looks like they had to pull out all the tricks to implement the V-USB library. Cycle counting. Assembler. Different code for different clock frequencies. You name it.Right now I'm playing around with theAVR-CDC projectwhich uses V-USB as well. I'll see if I can't build a hack USB serial cable for Anson as well.

author: Slothie
author_rank: Regular Contributor
timestamp: March 22, 2013, 01:35:03 pm
content: Quote from: ptricks on March 22, 2013, 04:02:34 amSheilds are not mandatory. I've never bought one. The only ones I have are one I made with some stripboard & connectors and one I won in a competition.A quick look around reveals Arduino clones foraround $22Thats built and tested with its on board programmer. And I've seen them for aslittle as $12if ypu get one that needs an FTDI cable (always a good investment, and you only need one).QuoteParts must be cheap where you come fromThats a cool design - I wonder it it would work with a USB/Serial adapter because none of my PCs or laptops have a serial port.QuoteThat looks like an interesting IDE system. BASIC is fine for small to medium projects where timing is not critical. My only nagging doubt is how well does it support some of the more obscure peripherals on the chips - one of the PICs strengths is the HUGE range of different on chip peripherals and PIC BASICS are not often strong on extensibility. But it looks cool for someone starting out.Microchips MPLAB X is good and the free XC8 compiler works OK. The emulator is a bit buggy for some devices but emulators are always a bit of a gamble!Unfortunately for me Microchip don't seem to be as generous with their free parts in the UK, But the costs are pretty low anyway. I love the tiny PICs like the 10Fxxx and 12Fxxx ones- their limitations are a challenge and you pretty much HAVE to program in assembler but its amazing what you can do with a little imagination.I think you can still get those cheap $5 TI launchpad kits - theyd be worth a look. Even if they turn out to be not your cup of tea its only $5...!

author: Anson
author_rank: Regular Contributor
timestamp: March 22, 2013, 02:31:33 pm
content: Quote from: ptricks on March 22, 2013, 04:02:34 amFree? Free is good very good.. Do you just register and they send you stuff or do you have to ask for samples?That programmer looks simple to build but I have no serial port on my computer. It would have to be modified for use with USB. Which I think can be done with a single chip?I like the looks of the software it looks very basic..

author: brainwash
author_rank: Frequent Contributor
timestamp: March 22, 2013, 06:22:10 pm
content: Quote from: ptricks on March 22, 2013, 04:02:34 amJust as a note, if you still have a physical RS232 port on your computer/laptop you are able to do with much less.http://www.picbasic.co.uk/forum/showthread.php?t=703Code:TXD (3) ------[4.7k]-------VPPGND (5) --------------------VSSDTR (4) -------[4.7k]------DATACTS (8) ------------------DATARTS (7) -------[4.7k]------CLKYes, it works, I used it for more than a year before buying a PicKit.

author: amyk
author_rank: Super Contributor
timestamp: March 22, 2013, 07:26:28 pm
content: Since this is an Arduino thread I'll note that AVRs can be programmed via hardware that's just as simple, only the pinouts and software protocol are different.

author: brainwash
author_rank: Frequent Contributor
timestamp: March 22, 2013, 07:38:41 pm
content: AVRs can be programmed without ANY hardware, just three switches or so. You are only limited by your "digital" speed.http://habrahabr.ru/post/152052/

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 23, 2013, 04:13:48 am
content: For anyone interested, I've attached a draft schematic of the USB serial cable. It's based on the designfound here. I've just added some bells and whistles.

author: westfw
author_rank: Super Contributor
timestamp: March 23, 2013, 05:58:51 am
content: IMNSHO, the tiny2313 does not offer enough cost advantage to justify using it instead of an ATmega8 or similar that has a BIG advantage in terms of code space. By the time you put VUSB in there, along with some basic ISP programming code, you're really pushing the limits of the tiny2313 (the USBTiny programmer uses a 2313, while the USPASP uses a mega8. When USBTiny needs a new protocol to handle AVRs with 256k of flash, you sort of look at it and go "oops. Oh well.")For that matter, the mega328p seems to be unusually cheap at the moment, from some distributors (It's cheaper than an ATmega88, and even cheaper than some of the attiny2313 variants, from Mouser, for example.) If you've already got a 2313, that's fine. If you need to buy a chip, there are better choices.(Sigh. I'm running into this more and more. As a Hobbyist, I've built up a stock of parts that are ... essentially obsolete, and thus not particularly worth using in any design that I might think of "publishing." (1206 resistors, (real!) 8051 microprocessors, etc. Sigh again.))

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 23, 2013, 06:21:45 am
content: Wow! Mouser's proud of the ATtiny2313 all right. Digikey has it at half of their price.I know how you feel about component stock. I've got a ton of stuff that will never get used, I'm sure. That's one of the reasons I'm going to unload some of it on Anson.I also get frustrated anytime I have to order a part for a design. The problem is, I need just a couple bucks worth of parts but before I know it I've ordered about 50 or 60 bucks worth--"just in case I need it one day." That's why I usually have a rule about designing around what I have in stock.

author: Slothie
author_rank: Regular Contributor
timestamp: March 27, 2013, 11:44:46 pm
content: Quote from: TerminalJack505 on March 23, 2013, 06:21:45 amTell me about it! I have ~50 2716 EPROMS I bought back in the day because the bulk price was too good to miss and I thought I'd use them eventually. I find these days very few applications.Somewhat ,more hopeful is the tube of 40 or so opto-isolaters; I use a 2-3 a year so I'm good till about 2028.I still have a boxful of Z80, 6503 and 6809 processors and support chips but I have a plan for them when time permits.....

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 28, 2013, 12:53:40 am
content: Here's a half-baked but mostly complete schematic of the serial cable. Don't pay any attention to the pin numbers. Most of the symbols are just using placeholder packages right now.The resistor that's just hanging out there (R14) is going to be attached to the MCU once I get around to changing the MCU symbol.I still haven't decided what connector I'm going to use so the I/O on the far right is in limbo at the moment. I'm probably going to use the same pinout as FTDI cables.The USB connector will likely just be wirepads and a USB cable will be soldered directly to the board. This is actually required by the USB spec for low speed devices so thishackdevice will be that much closer to compliance.I've been playing around with the circuit on the breadboard and it works pretty well. The drivers are the real issue with these types of USB devices. They aren't digitally signed so you have to override an option in Windows 7 64-bit to get them to load. The device works great under Linux (of course!) But won't work under a Linux guest OS using VMWare's Player VM. It enumerates the device, loads the drivers and everything but still doesn't work for some reason.

author: Anson
author_rank: Regular Contributor
timestamp: March 28, 2013, 02:17:05 am
content: Not that I know what I'm looking at but it looks very professional!I hope you include instructions. And tech support.

author: NiHaoMike
author_rank: Super Contributor
timestamp: March 28, 2013, 02:26:29 am
content: You can use a FTDI cable to bitbang Optiboot onto your homemade Arduino. Then use that to bootload the rest of your chips.That said, I recommend PIC since the diversity it offers makes it work over a wider range of applications than Arduino. The tradeoff is that the learning curve is a little steeper, but not by much. (I recommend starting with PIC24 or dsPIC33 since both of those are modern and will remain useful for years to come.) You can also look at MSP430 (very limited compared to the others, best suited for low power applications) and STM32 (very cheap ARM boards). There's also cheap wireless routers and the Raspberry Pi, but those are rather advanced embedded systems and not particularly useful for learning about low level programming.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 28, 2013, 04:27:36 am
content: Quote from: Anson on March 28, 2013, 02:17:05 amThe hardware should be pretty robust. The only real problem I can foresee is if you reversed the positive remote voltage and ground. In that case the zener diode on the output is going to conduct and likely fry. I don't have any polyfuses, otherwise I'd put one on the output to prevent that. I might be able to put a normal 5x20mm fuse in the design but probably wont have room since I already have an enclosure in mind and the fuse probably wont fit.I'll definitely do what I can so far as helping you out goes. Naturally I want you to use the programmer and serial cable since I've put a fair amount of effort into them. I'll also be interested in your feedback so far as any issues you run across. You'll be a kind of beta tester in that regard.If things work well then I might make a few more and give them away to others.

author: Anson
author_rank: Regular Contributor
timestamp: March 28, 2013, 07:10:13 pm
content: Sounds good to me. What size polyfuse? I think I have a couple from some boards.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 28, 2013, 10:16:23 pm
content: Quote from: Anson on March 28, 2013, 07:10:13 pmThere shouldn't be much current drawn from that voltage source. 100 mA would likely be the worse case. The maximum allowed voltage for that source will be 5.5 volts.I'll look around and see what I have. I might be able to scrounge something up myself.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 29, 2013, 10:11:10 pm
content: I found some polyswitches on some old boards that should work. That was a good idea. I didn't think to check. I've got four with a holding current of 140mA and a trip current of 280mA so I'll put one on both the input side as well as the output.Here's the latest schematic. It should be pretty close to final. (The pin numbers are still bogus.) Things still might change due to issues that come up during layout.Now I need to gather up all the components and define all the packages.

author: Anson
author_rank: Regular Contributor
timestamp: March 29, 2013, 11:41:09 pm
content: It's very interesting following your progress on this. So far I have learned two things, 1 I have a lot to learn, and 2 it takes time and a lot of patience to create a good design. I have been looking up the parts you are using and trying to figure out why they are there but I have yet to figure it out. Maybe later when its finished you can write a bit about your creative process and why you used what part where and why. I will never be an electrical engineer or anything near that level but I would like to further understand the process. Hopefully without getting into a lot of complex math.

author: TerminalJack505
author_rank: Super Contributor
timestamp: March 30, 2013, 12:37:36 am
content: I plan on writing-up a document that explains the 'raison d'etre' for each of the components once I'm done. There's a bit of 'lily gilding' going on but that's something that can be done when you're making just a few boards. Unfortunately, some of the components aren't ideal due to the fact that I'm using just what I have on-hand.One of my problems will be making everything fit in the enclosure that I plan to use. I've got an old Belkin device that was used to talk to PalmPilots over USB that I plan to gut and use. It's a pretty small enclosure, though, so that may not work out.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 02, 2013, 02:00:05 am
content: I've attached the latest developments of the virtual COM port project. The routing is pretty much done but I'm going to have to change the ISP header. It's too tall for the enclosure so I'm going to just leave some solder pads for it. This will leave more room for the top pour so that will work out well.The pour on the top of the board is +5V and the main pour on the bottom is GND. The PDFs for the board are at 3X size. The actual board is just 1"x3".Have you been playing with Atmel Studio and learning C, Anson? How's that going?

author: Anson
author_rank: Regular Contributor
timestamp: April 02, 2013, 04:59:46 pm
content: Quote from: TerminalJack505 on April 02, 2013, 02:00:05 amNavigating the software is easy pretty much got all that figured out. I have been looking at example codes and trying to understand everything I think I am progressing. Will be much faster though once i can physically create a result. Where would be the best place to ask dumb coding questions once I get started? I hate asking dumb questions to overly qualified people that seem to act like if you don't know maybe you should go somewhere else. Which I have gotten before on other sites.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 03, 2013, 03:10:04 am
content: Heck, I'd just start a new thread here in this forum. There's usually someone that will help you out.I know what you mean, though. When it comes to software I'm guilty of that. Software development is what I do for a living but I'm not particularly interesting inteachingother people about software development. I hang out in the forum to learn electronics. Besides, software is way too subjective of a subject. Practically any discussion regarding software quickly devolves into a pissing match. Every person and their dog has an opinion when it comes to coding, it seems.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 05, 2013, 06:13:47 pm
content: It's been slow going on this project, Anson, but I'm nearly ready to build the board.Unfortunately, my CNC controller PC decided to go tits-up. I'm going to get it replaced next week. I use my CNC mill to drill my boards. I may try to drill the holes and vias manually this weekend. That may not work out so well, though, since those vias are kind of tricky to drill manually.I've attached the latest schematic. I don't think there have been many changes since the last time I posted it.

author: Anson
author_rank: Regular Contributor
timestamp: April 06, 2013, 01:14:05 am
content: Looks very professional. Can't wait to get it. Be sure to post some images of the finished product before you send it to me. I'm sure a few guys here would be interested to see it.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 13, 2013, 09:20:47 pm
content: This project is finally going to make the move from breadboard to PCB. The board has been etched, tinned, painted, drilled and cut to final size.I still need to solder the 'vias' (bus wire soldered to either side of the board), do a final test of the traces (for opens and shorts) and finally, solder the components to the board. Hopefully I'll get to at least the vias and testing tonight.It's not pretty but should work fine. The top and bottom weren't quite aligned so the holes for the vias are a little offset on the bottom. I manually drilled the 5 bigger holes instead of letting the CNC mill do them and managed to screw one of them up. I forgot to retract the bit so the carbide drill bit turned into a router bit.Thankfully it didn't break.I used hatch pours instead of solid pours. The 'solder resist' is just glass paint and seems to stick to fiberglass better than metal.

author: NiHaoMike
author_rank: Super Contributor
timestamp: April 13, 2013, 10:17:52 pm
content: If hatch pours have higher ground impedance and use more etchant in manufacture, what's the point of using them? (Is it just to look "cool"?)

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 13, 2013, 11:02:36 pm
content: Quote from: NiHaoMike on April 13, 2013, 10:17:52 pmI've wondered about that myself. I don't know what advantages they might have to a solid pour.Their "cool factor" does seem a little higher, though.

author: Anson
author_rank: Regular Contributor
timestamp: April 14, 2013, 01:41:59 am
content: Wow looks nice.What's a hatch pour? Are you talking about the grid like pattern?

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 14, 2013, 03:01:29 am
content: Quote from: Anson on April 14, 2013, 01:41:59 amYes, exactly. Eagle has the option to create solid pours, hatch pours or cutout pours (don't know what that is.)

author: ptricks
author_rank: Frequent Contributor
timestamp: April 14, 2013, 11:08:32 am
content: Quote from: TerminalJack505 on April 13, 2013, 11:02:36 pmHatch pours are for when you want to avoid the skin effect , are easier to solder to since they don't sink all the heat from the iron, and can allow for more flex in the board if it has to bend a little.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 17, 2013, 11:57:18 pm
content: Here are photos of the latest progress on this project.All components have been soldered on. An output connector was rigged-up and soldered on. The output connector has been epoxied to the board to give it more structural strength whenever the connector is removed. A squid cable has been made for programming (but hopefully not debugging) the MCU.Now I just need to let the epoxy cure and then solder on the USB cable and (temporary) programming cable, make an output cable, program the MCU and do a smoke test. It should be pretty much downhill from here.The attached schematic is exactly what's on the board. I may have to change the LED current limit resistor values and a few cap values but it should be pretty close to final.

author: c4757p
author_rank: Super Contributor
timestamp: April 18, 2013, 12:23:12 am
content: That is one nice looking homemade board. I like the right-angle plug, too

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 18, 2013, 01:06:36 am
content: Quote from: c4757p on April 18, 2013, 12:23:12 amThanks!The "solder resist" is pretty much just cosmetic but adds a nice touch, I think. It will peel off if you drag a hot soldering iron across a trace. It's pretty durable, otherwise since it is actually designed as dishwasher-proof glass paint.

author: c4757p
author_rank: Super Contributor
timestamp: April 18, 2013, 01:11:03 am
content: I've used glass paint for the same purpose. I've found it's better than cosmetic - by using toner transfer with the solder mask plot, underneath the paint, then clearing it out by dissolving the toner with acetone, I can get pretty good resolution for a useful solder mask. I just bake the paint a second time to undo the roughening that the acetone causes. It isn't extremely heat tolerant, but it still helps quite a bit with SMD parts.What specific kind do you use? I love the traditional green, but all the green ones I've tried are so dark that they obscure the underlying traces (and if I thin it, it doesn't stick).

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 18, 2013, 01:36:19 am
content: Well, that's a good question. I'm pretty sure I used the paint seen at the far left in the attached photo. It was either that or the paint in the middle. I did a test of one and found that it was too opaque so switched to the other.I've had good luck with the Pebeo Vitrea 160 as well. It doesn't have a very long shelf life, though. It will get really thick just sitting in the bottle.I use a silkscreen to apply the paint and mask out the pads and vias. As-is, the paint is too thin for silkscreening so I thicken it a little with cornstarch. This method (the silkscreen) leaves air bubbles in the paint, unfortunately. These could probably be removed by popping the board in a pressure/vacuum chamber.I'll have to try your method. I wouldn't have thought acetone would be able to get to the toner to dissolve it once the paint was applied.

author: c4757p
author_rank: Super Contributor
timestamp: April 18, 2013, 01:48:34 am
content: Quote from: TerminalJack505 on April 18, 2013, 01:36:19 amThis is what I usually use, though you're obviously using a different shade than I have. The store near me only has one "green" available and I didn't realize there were more... I also have a bright red that comes out looking very professional, remarkably close to the "real" red solder mask - but Ihatethe red solder mask... I haven't noticed a shelf life problem at all though!QuoteYou have to let it soak for a bit, but it does a fine job of seeping through the paint. If the paint's too thick, it's still tough to remove, but if it's thinly applied it'll push right off. Of course, YMMV - it might differ with a different brand of paint, and I distinctly remember somebody on this forum saying they had toner that didn't dissolve in acetone too! (I have never seen that one - acetone seems to chew through just about anything with vigor, including toner...)I've found that with this method, it's fine enough (if I'm not a clumsy hamfist when removing it) to unmask pads on a 32-pin QFP and still leave mask in between. I'm sure the recessed gap between the pads helps as well. You're obviously not going to be doing 0.4mm BGAs with it though

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 18, 2013, 02:26:41 am
content: This posthas a picture of a board that I used the green Pebeo Vitrea 160 on. As you can see it's pretty transparent. I thought the yellow paint (pay no attention to the crappy board layout) looked pretty good too.I'm like you, I don't like the completely opaque paints. I bet the red paint you're talking about (Pepper Red?) is the same as what's seen in the attached picture. I thought it looked pretty good.

author: c4757p
author_rank: Super Contributor
timestamp: April 18, 2013, 02:47:05 am
content: Ooh, the yellow is nice, and the green looks great too! You make some very good-looking homemade boards.I think the red I had was brighter, but I've since thrown it out and don't remember what it was.

author: kt315
author_rank: Regular Contributor
timestamp: April 18, 2013, 04:43:35 am
content: That is rather interesting... Can you go over the steps to create the solder mask once again please?Do you use toner transfer to cover the pads on the etched board, paint it over, and when the paint is cured remove the toner by bathing the board in the aceton?TerminalJack505, how do you protect the pads when painting the board?

author: westfw
author_rank: Super Contributor
timestamp: April 18, 2013, 06:42:32 am
content: Can you use toner transfer to create a screen-printing screen? You'd have to use some sort of high-temperature fabric for the screen, I guess...

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 18, 2013, 06:56:05 am
content: Quote from: kt315 on April 18, 2013, 04:43:35 amI use a product calledStencilProto create a silkscreen mask. This is a UV sensitive silkscreen. It's a pain to get properly aligned on the board sometimes which is why I want to try c4757p's toner transfer method.For the method I use to create the mask I just export the appropriate layer as an image from Eagle, do some minor manipulation in Gimp then print it on a transparency. I then expose the stencil.When I'm ready to paint the board I clean it with alcohol, thicken the paint with some corn starch, align the stencil over the board and use a squeegee to apply the paint to the board. The paint has to cure for a day or two. Once it's cured you bake the board according to the instructions on the paint.The attached picture is the mask I created for this project. Notice how the transparency is doubled-up. This helps keep too much UV light from getting through the toner.BTW, in an earlier post I said that I thought that I used the Folk Art paint for this board but I'm now 99% certain that it was actually the Americana brand.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 18, 2013, 06:59:08 am
content: Quote from: westfw on April 18, 2013, 06:42:32 amI've never thought of that. If you could it probably wouldn't be very durable but that might not be an issue for one-off projects.

author: ptricks
author_rank: Frequent Contributor
timestamp: April 18, 2013, 12:22:16 pm
content: The best results will come from using UV cured paint. The paint is more readily available than most think, go to a beauty supply store and you can buy it as UV cured nail polish paints. Print up your solder mask so that only the parts you want to keep are exposed to UV light, expose, then rinse off the excess paint.

author: c4757p
author_rank: Super Contributor
timestamp: April 18, 2013, 12:36:33 pm
content: Quote from: kt315 on April 18, 2013, 04:43:35 amPrecisely. You'll need something relatively gentle to scrub the paint off, though, or you could end up taking italloff. The acetone does soften the paint as well as the toner, it's just much more aggressive on the toner. I usually bake the paint a second time to smooth it out, since the scrubbing with acetone roughens it a bit.

author: c4757p
author_rank: Super Contributor
timestamp: April 18, 2013, 12:37:37 pm
content: Quote from: ptricks on April 18, 2013, 12:22:16 pmI will try this!

author: kt315
author_rank: Regular Contributor
timestamp: April 18, 2013, 01:28:28 pm
content: Well, thanks for the info. I've made a fare share of the boards, but I've never tried to create a solder mask. I certainly should try it.What is the simplest option for UV light source?

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 18, 2013, 06:20:18 pm
content: Quote from: kt315 on April 18, 2013, 01:28:28 pmIn the case of StencilPro: Sunlight. It takes less than a minute of exposure to direct sunlight for it to work.If that's not an option then a florescent lamp works too.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 19, 2013, 02:15:36 am
content: I just finished soldering the USB cable to the board and made an output connector cable so I thought I'd put the board its (recycled) enclosure to see how it looks and fits. It fits great and the LEDs look like they line-up perfectly with the light pipes.I haven't powered it up yet or programmed the MCU so I thought I'd upload these photos for posterity. Now comes the most anxious part--powering it up.

author: Anson
author_rank: Regular Contributor
timestamp: April 19, 2013, 03:24:16 pm
content: That came out great! Now you need to change the logo.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 19, 2013, 04:39:26 pm
content: Quote from: Anson on April 19, 2013, 03:24:16 pmLOL. I don't know what I can do about the logo. It also has an FCC compliance/made in Taiwan sticker on the back that I'll probably leave on as well.The case turned out to be pretty much just the right size for the job. The light pipes for the LEDs were convenient as well. There's no power LED, though. The Link LED only lights up when the remote's voltage is sensed.I powered it up and programmed the MCU last night and it's working like a charm. Right now I just have a simple loopback circuit setup to test it and have more testing to do. I need to test the flow control signals (CTS#/RTS#), for example.I still need to design and build the programmer. This is just the USB-to-serial device. I don't think it will take as long for the programmer since much of the design will use what I learned during this project. It will use the SN74LVC2T24 ICs as well for level conversion and power sequencing immunity (they basically keep either circuit from latching-up the other when one is powered-up and the other is powered-down.)

author: kt315
author_rank: Regular Contributor
timestamp: April 20, 2013, 08:19:49 pm
content: It does look great indeed. Nice job.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 20, 2013, 08:44:54 pm
content: Thanks, Kt315.Here's the beginnings of a Theory of Operation document. It isn't complete yet but it has a section that describes the purpose of each of the components in case anyone is curious about what certain components are doing in the circuit.The schematic it references is the same one postedhere.

author: c4757p
author_rank: Super Contributor
timestamp: April 20, 2013, 08:54:05 pm
content: Quote from: TerminalJack505 on April 20, 2013, 08:44:54 pm...I think I'm in love. It's been a long time since I've seen someone bother with this kind of documentation.(the last two are my toes)

author: Unknown
author_rank: Unknown
timestamp: April 20, 2013, 08:56:09 pm
content: Hi,I used to be a big user of Motorola CPUs way back in the day. But when I got back into MCUs a couple of years agoI looked at a lot of platforms and it pretty much boiled down to PIC32MX or ATMEL/AVR 8/32(so far).1. Hardware: lots of variety and low cost.2. Support: Least crippled tool chains from Major-corp., or cheap/ open-source alternatives.Huge hobby base, especially AVR/Arduino.Atmel and Microchip have great online resources.Arduino site is expressly set up to be user friendly to beginners and non-tech heads.The trick is not to be seduced(as I was) into some wiz-bang development platform that is cheap upfrontbut is a hassle on the back end; expensive, crippled, lamer tool-chains, narrow hobby base.The fact is that virtually all cheap Major-corp. dev/demo boards are targeted atEEs who work for a company in the hope that they buy bizillion of their chips to put into washing machines or cars.My only b*tch with AVR and Microchip(not exclusively) is that printed books on using these devices which go beyondcasual "Maker" needs are for the most part EE textbooks that are too expensive for me.So I've had to spend many an hour on the web finding well written tutorials and coding examples forMCUs that I like. Also finding good blogs/forums on tips, tricks, and work-arounds is a big plus.The most important advice is that practically all MCUs are coded in ANSI C or C++, or C-whatever.The better you get at C in general, the easier your life will be at coding for almost any MCU.Later on, assembly code is good to know on your favorite MCU, because at some pointyour gonna want to or have to tweak your C source using assembly forfor those routines that go outside the scope of your C compiler libraries.I like ANSI C and the Pellas C IDE works well for me for generic C hacking and it's free.If you want a cheap thrill farting around with controlling in BASIC try theDuinomite/ Maximite boards or the Coridiumcorp.com BASIC chip.Coridiumcorp claims that their $10usd chip(NXP LPC1114-28 pin dip) will run the equivalentof 10 million lines of BASIC code a second. They give you the IDE-compiler for free.Not a bad deal if true!If your are a noob go with Arduino first.Be careful when buying Arduino hardware online.Buy from authorized sellers of authentic Arduino parts to support Arduino.Arduino is open source so everybody and their dog has been banging outArduino clones and the quality of these are all over the map.My general rule about buying clones, knock offs or equipmentis to let others buy it first and scrutinize the reviews on the itemand the supplier's street cred.Otherwise deal with an authorized vendor: Digikey, Mouser, Avnet, Newark, etc.I'm really anal about this since I got burned buying some fakeMCU parts, and crap test equipment from eb** and online resellersfrom distant lands. ;~)If you eventually want to break away from 8-bit,I would suggest MIPS core chips like the PIC32MX or if you go ARM: Atmel or NXP LPCxxxx(LPCexpresso)Olimex also has a broad range of good quality SBCs at a good price. But read the specs and look at theschematics carefully on the board you are interested in to make sure the board has the rightmix of devices and features you want on it. If the board in question is flashed withcode make sure that the code has the features, compatibility, and updatability you are comfortable with.All of the above is just my very personal, humble opinion regarding my experiences dealing with MCU chip choicesand buying electronics on a small budget.CiaoHappy coding

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 20, 2013, 09:13:47 pm
content: Quote from: c4757p on April 20, 2013, 08:54:05 pmLOL. Well, it is just as much for myself as it is for anyone else. If I don't document it now I'll be scratching my head 6 months from now about some aspect of the project.I'll try to post the firmware and Eagle project at some point. I don't know if they'll ZIP up small enough to post or not, though. I'm sure I'll have to whittle down the Eagle project since it's about 16MB unzipped. I'll probably just leave all the datasheets out and get rid of all of the automatic backups then it should ZIP up fairly compact.

author: Anson
author_rank: Regular Contributor
timestamp: April 20, 2013, 10:47:35 pm
content: That document was very informative. I think I may start making notes on my designs as well just so when I come back to them after a few days I haven't lost everything. It is also very good for getting things to click when you are trying to understand what you are trying to do.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 21, 2013, 03:09:39 am
content: Here are the project files for anyone that is interested.The firmware is just a slightly modified version of the code found onthis site. I will probably make some additional changes to how the LEDs work. Right now they are enabled/disabled for each iteration of the main loop. I looked at the assembly code generated and it isn't too chunky but my feeling is that it should probably be better optimized since it may be a problem at the higher baud rates.The firmware was developed in Atmel Studio 6. Eagle 6.4.0 was used for the schematic and board. All of the components are contained in the project's library so there aren't any 3rd party (or even standard) libraries necessary.

author: Anson
author_rank: Regular Contributor
timestamp: April 21, 2013, 07:38:31 pm
content: Sweet with all the info you've been including in this build it makes it very educational. It also makes it easier for me to understand what could be going wrong if something isn't going right.

author: TerminalJack505
author_rank: Super Contributor
timestamp: April 21, 2013, 08:13:29 pm
content: Quote from: Anson on April 21, 2013, 07:38:31 pmYes, hopefully you'll understand the circuit well enough that you will know what it should and shouldn't do.There's still just a little more information that I need to provide (which I'll put in the Theory of Operation document) such as the fact that the flow control signals work only between the device and the remote. That is, the flow control isn't under the control of the PC as is the case with most other USB-to-serial cables. I don't imagine that would be a problem since it is very unlikely a microcontroller can overrun a PC. Just something to be aware of. (The PC can't overrun the device, BTW, due to the nature of how USB works and this may be the same when going the other way but I'm not certain.) Anyway, you probably won't even need to bother with the flow control signals for most of what you'll use the device for: debug messages.This project is just about wrapped-up so I'll probably start working on the programmer soon. A lot of the circuitry used in this project will be re-used in the programmer project. It will likely look pretty much like the same circuit, I imagine.

author: Anson
author_rank: Regular Contributor
timestamp: May 03, 2013, 04:01:44 am
content: How's the project coming? Any news? Any changes? Did you make a logo for it?

author: TerminalJack505
author_rank: Super Contributor
timestamp: May 03, 2013, 04:50:39 am
content: Sorry, but I've been run down with a cold for the last week and a half so I haven't put a lot of time into it. I think I might finally be getting over it so hopefully I'll find the energy to work on it soon.

author: Anson
author_rank: Regular Contributor
timestamp: May 03, 2013, 03:36:08 pm
content: Cold's suck. Hope you feel better. Take your time I'm in no hurry. It's gonna take me some time to learn to use the thing anyway. Still think you should put a logo on itCome up with your own brand.

author: glatocha
author_rank: Regular Contributor
timestamp: May 04, 2013, 10:36:30 am
content: So will add also my thought to this discussion.For starter take the KIT preferably from the producer (microchip, atmel, TI so on). You will get a demo software loaded, support if needed. You will save a lot of time (no need to think "is that a software is that a hardware"). I don't know much about Atmel boards. The TI MSP430 Launch Pad used to be sold for 4,30$ now it is 10 I think. Plenty of add-ons available starting at 5$ already. For PIC the PICKit3 starter is worth to have, but u need to spent 60$.For me also important is an IDE. I like it simply but also with lot of functions. For me the Microchip MPLAB X is good and free. The Code Composer Studio for TI also free (any restrictions? - I am not sure) was always a bit complicated for me. But if you do some PC programming then you will have no problems.If you are starting you need to think about the whole package. Chip, programmer, board, IDE, documentation, community, even is the website friendly.Just save yourself time, money and nerves and don't go for any DIY stuff. Not at the first time.

author: TerminalJack505
author_rank: Super Contributor
timestamp: May 13, 2013, 10:43:56 pm
content: I'm finally back to work on this project, Anson. Here's the latest schematic.I just need to make some breakout boards so I can breadboard the project.As you can see from the schematic, this project is very similar to the USB-to-serial project. Because of this, I'm not expecting any major issues. <Knocks wood.>As you can see in the schematic, I got some 18MHz crystals in so I'm going to try to get the firmware to work with at 18MHz instead of 12MHz. This will allow CRC error checking to be enabled in the VUSB library.

author: Anson
author_rank: Regular Contributor
timestamp: May 13, 2013, 11:15:35 pm
content: Awesome.What's the deciding factor for using an 18Mhz oscillator? Couldn't you have used a 20Mhz crystal?I see you have some indicator LED's off board. Is this just for testing or do you plan on putting them on board later? I like the use of the multicolored LED's.For debugging are you going to have just a single jumper I can remove to disconnect the capacitor?What are you using to make the schematic sheets? These are very nice.

author: TerminalJack505
author_rank: Super Contributor
timestamp: May 13, 2013, 11:41:28 pm
content: Quote from: Anson on May 13, 2013, 11:15:35 pmThe firmware uses a library calledV-USB.This library makes it possible to use USB on AVR microcontrollers that don't natively support USB. The library is highly optimized code. A lot of hand-crafted assembly, for example. The library only supports a few specific clock rates and, for whatever reason, only supports CRC checking in the 18MHz version. I imagine they could support CRC checking in the 20MHz version but don't due to some technical issue they don't want to bother with. As someone else earlier in the thread pointed out, low speed USB is 1.5MHz and 18MHz is an integer multiple of 1.5MHz.The 3 bi-color LEDs will be in holders attached to the case and will have a cable running back to the PCB. At least that's what I plan on doing at this point. Mounting them on the PCB will be a problem with the holders that I plan to use--they lock the LED into the holder. This will make taking the PCB out of the enclosure next to impossible without destroying something (most likely the LED holders) or un-soldering the LEDs.The debugging capability is for development of the programmer. That is, it is for me and not the end-user (you.) Hopefully, I won't have to use it. A lot of those components are there 'just in case' I have to use a debugger. If this were a mass-produced product you wouldn't see a lot of those components. You'll basically be getting the prototype version of the board so some of those parts will be vestigial by the time you get the board.The schematic is made in Eagle.

author: Anson
author_rank: Regular Contributor
timestamp: May 14, 2013, 12:50:46 am
content: Oh ok makes sense now.I hear a lot of people use eagle, but I also hear it's difficult to use.

author: TerminalJack505
author_rank: Super Contributor
timestamp: May 14, 2013, 02:51:13 am
content: Eagle is what I would call "an acquired taste."Newer versions are a lot better than older versions. At one time (4.x and earlier, I think) the interface didn't have any concept of object properties. That is, you couldn't right-click on an object (schematic symbol, net, pad, etc.) and see all of that object's properties all neatly organized. They finally added that, thankfully, so the interface is better than it used to be.