Author Topic: Is arduino the best?  (Read 35240 times)

0 Members and 1 Guest are viewing this topic.

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2572
  • Country: us
  • Not An Expert
Re: Is arduino the best?
« Reply #25 on: March 16, 2013, 10:18:33 am »
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/9825

Or 12.95USD if you don't mind a good old serial port and it supports your chips.
https://www.sparkfun.com/products/14

If 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.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is arduino the best?
« Reply #26 on: March 16, 2013, 03:36:16 pm »
Quote
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.
that 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...

So 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 using diodes LEDs.  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'.
« Last Edit: March 16, 2013, 05:57:51 pm by TerminalJack505 »
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is arduino the best?
« Reply #27 on: March 16, 2013, 04:00:11 pm »
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/9825

Or 12.95USD if you don't mind a good old serial port and it supports your chips.
https://www.sparkfun.com/products/14

If 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.

Hopefully 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.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Is arduino the best?
« Reply #28 on: March 16, 2013, 04:07:19 pm »
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_Workshop
Stellaris here: http://processors.wiki.ti.com/index.php/Getting_Started_with_the_Stellaris_EK-LM4F120XL_LaunchPad_Workshop?DCMP=Stellaris&HQS=StellarisLaunchPadWorkshop
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Is arduino the best?
« Reply #29 on: March 16, 2013, 04:13:34 pm »
Quote
doesn't look like it's connected properly.
Oh!  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!
 

Offline AnsonTopic starter

  • Regular Contributor
  • *
  • Posts: 135
  • Country: us
Re: Is arduino the best?
« Reply #30 on: March 16, 2013, 04:43:39 pm »


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.


What program are you using?
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is arduino the best?
« Reply #31 on: March 16, 2013, 04:46:42 pm »
Quote
doesn't look like it's connected properly.
Oh!  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!

Yes, 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 on this 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.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is arduino the best?
« Reply #32 on: March 16, 2013, 04:49:53 pm »


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.


What program are you using?

That 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.
 

Offline AnsonTopic starter

  • Regular Contributor
  • *
  • Posts: 135
  • Country: us
Re: Is arduino the best?
« Reply #33 on: March 16, 2013, 05:04:30 pm »
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.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26896
  • Country: nl
    • NCT Developments
Re: Is arduino the best?
« Reply #34 on: March 16, 2013, 05:13:47 pm »
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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is arduino the best?
« Reply #35 on: March 16, 2013, 05:19:51 pm »
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.

Yes, 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.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is arduino the best?
« Reply #36 on: March 18, 2013, 12:34:45 am »
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.
« Last Edit: March 18, 2013, 06:15:31 am by TerminalJack505 »
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is arduino the best?
« Reply #37 on: March 18, 2013, 09:56:56 pm »
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.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is arduino the best?
« Reply #38 on: March 20, 2013, 03:10:09 am »
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.
 

Offline AnsonTopic starter

  • Regular Contributor
  • *
  • Posts: 135
  • Country: us
Re: Is arduino the best?
« Reply #39 on: March 20, 2013, 10:52:58 pm »
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.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is arduino the best?
« Reply #40 on: March 20, 2013, 11:20:19 pm »
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.
 

Offline Slothie

  • Regular Contributor
  • *
  • Posts: 66
Re: Is arduino the best?
« Reply #41 on: March 22, 2013, 03:45:42 am »
To me it seems arduino is just to focused on plug and play. It seems to be all modules and prewriten code.
Thats 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
 

Offline ptricks

  • Frequent Contributor
  • **
  • Posts: 671
  • Country: us
Re: Is arduino the best?
« Reply #42 on: March 22, 2013, 04:02:34 am »
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 parts

http://www.oshonsoft.com/picprogserial.html

I know most people look down on BASIC as a language but if it works, use it.
oshonsoft has a really good set of tools
http://www.oshonsoft.com/pic.html
« Last Edit: March 22, 2013, 04:05:20 am by ptricks »
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: Is arduino the best?
« Reply #43 on: March 22, 2013, 07:21:31 am »
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.
Soft-USB relies on very accurate 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.
 

Offline TerminalJack505

  • Super Contributor
  • ***
  • Posts: 1310
  • Country: 00
Re: Is arduino the best?
« Reply #44 on: March 22, 2013, 07:41:02 am »
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.
Soft-USB relies on very accurate 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.

You'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 the AVR-CDC project which uses V-USB as well.  I'll see if I can't build a hack USB serial cable for Anson as well.
 

Offline Slothie

  • Regular Contributor
  • *
  • Posts: 66
Re: Is arduino the best?
« Reply #45 on: March 22, 2013, 01:35:03 pm »
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.
Sheilds 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 for around $22  Thats built and tested with its on board programmer. And I've seen them for as little as $12 if ypu get one that needs an FTDI cable (always a good investment, and you only need one).
Quote
Programmer cost is cheap as well, about $5 in parts

http://www.oshonsoft.com/picprogserial.html
Parts must be cheap where you come from :) Thats 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.
Quote
I know most people look down on BASIC as a language but if it works, use it.
oshonsoft has a really good set of tools
http://www.oshonsoft.com/pic.html
That 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...!
 

Offline AnsonTopic starter

  • Regular Contributor
  • *
  • Posts: 135
  • Country: us
Re: Is arduino the best?
« Reply #46 on: March 22, 2013, 02:31:33 pm »
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 parts

http://www.oshonsoft.com/picprogserial.html

I know most people look down on BASIC as a language but if it works, use it.
oshonsoft has a really good set of tools
http://www.oshonsoft.com/pic.html

Free? 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..  :-DD
 

Offline brainwash

  • Frequent Contributor
  • **
  • Posts: 463
  • Country: de
    • Hack Correlation
Re: Is arduino the best?
« Reply #47 on: March 22, 2013, 06:22:10 pm »
Programmer cost is cheap as well, about $5 in parts

http://www.oshonsoft.com/picprogserial.html

Just 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=703
Code: [Select]
TXD (3) ------[4.7k]-------VPP

GND (5) --------------------VSS

DTR (4) -------[4.7k]------DATA

CTS (8) ------------------DATA

RTS (7) -------[4.7k]------CLK

Yes, it works, I used it for more than a year before buying a PicKit.
« Last Edit: March 22, 2013, 06:23:49 pm by brainwash »
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8264
Re: Is arduino the best?
« Reply #48 on: March 22, 2013, 07:26:28 pm »
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.
 

Offline brainwash

  • Frequent Contributor
  • **
  • Posts: 463
  • Country: de
    • Hack Correlation
Re: Is arduino the best?
« Reply #49 on: March 22, 2013, 07:38:41 pm »
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/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf