Shop OBEX P1 Docs P2 Docs Learn Events
Low cost general microcontroller — Parallax Forums

Low cost general microcontroller

Timothy D. SwieterTimothy D. Swieter Posts: 1,613
edited 2010-05-23 19:07 in General Discussion
I'm going through the process of designing a low cost product. The device will have a microcontroller. I have been researching and researching microcontrollers for use in the project and throughout the process I keep wishing, "Boy I wish there was something like the SX, but has a bootloader for code updates." I also wish there was just a plain vanilla mcu like an SX or a Prop where I didn't have to worry about which pin does what - I could just write a virtual peripheral or an object and attach the pins as they fit in the board layout.

For now I am probably going to go with the an ATmega or TINY since I have the tools to work with those devices.

But boy do I wish there was an SXII or a Prop-mini.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter, E.I.
www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
www.tdswieter.com
«1

Comments

  • John R.John R. Posts: 1,376
    edited 2010-05-20 12:20
    Timothy;

    What kind of quantities? I've come to the conclusion, that for low quantities, even thought it's grossly overkill, it may still make sense to go with a Prop, as you are (or at least I would be) dealing in my "comfort zone", and the other costs (longer development, learning curve, etc.) would balance out.

    If quantities are above "low", and/or you're already comfortable with the other chips, that's a different story.

    Also, what's the projected lifetime of the product? There are a LOT of SX chips still available...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    John R.
    Click here to see my Nomad Build Log
  • BeanBean Posts: 8,129
    edited 2010-05-20 12:20
    Timothy,
    I have a similar problem at work, but it's about size. We need a small microcontroller. Something that will fit between the pins of a 14-pin DIP package. The SX20 worked perfectly. But now I have to look outside of my beloved Parallax for something.

    I wish there was a propeller chip that only had maybe 2 cogs and 8 or 16 I/O pins for about $2. That would be great for me.

    For a current project I went with the PIC16F688 only because I had used PICs before, but now I wish I had chosen an Atmel part.

    Bean

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Use BASIC on the Propeller with the speed of assembly language.
    PropBASIC thread http://forums.parallax.com/showthread.php?p=867134

    March 2010 Nuts and Volts article·http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/prop/col/nvp5.pdf
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    There are two rules in life:
    · 1) Never divulge all information
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    If you choose not to decide, you still have made a choice. [noparse][[/noparse]RUSH - Freewill]

    Post Edited (Bean) : 5/20/2010 12:32:12 PM GMT
  • LeonLeon Posts: 7,620
    edited 2010-05-20 13:56
    The 16-bit PICs are much nicer than AVRs in many ways, have no availability problems, and some are available in small packages (14 pins). The larger ones have mappable peripheral pins, which is very useful.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-05-20 14:35
    You could try the picaxe. It is cheap and you can program it in basic.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2010-05-20 18:29
    I've also been looking at the AVR stuff for this type of application. I even have a few demo boards. I never liked the PIC architecture but the ATMEGA stuff looks pretty friendly, so the AT TINY stuff should be too.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Parallax Engineering
    ·
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-05-20 18:52
    I also wish there was a < $2 dual core propeller chip.

    I use mostly tiny45 (8pin) and tiny44A (14pin) when I
    can't justify $8 for a prop. I'm so used to having more
    than one processor now that I sometimes end up using
    more than one tiny in a project.

    I once added a tiny to a prop project and since there was
    no board room left I just epoxied it on top of the prop dead bug style and
    wired it up to the pwr pins and dropped down 3 I/O wires to other parts
    of the board. A guy said "what the hell is that!?"
    I said "That's the 9nth processor" smile.gif

    You can do a lot with a tiny and many projects don't even
    need an xtal so cost is really low. You can adjust the internal
    oscillator in many atmel parts. If you want to run at 20mhz (almost 20mips)
    a .23 xtal does the trick (4, 10 and 20mhx xtals always seem to be cheapest)
    or use a .19 resonator.
  • VaatiVaati Posts: 712
    edited 2010-05-20 19:08
    I think the cheapest mcu is the MSP430F2001 from TI. The programmer only costs $26ish if you buy it from the TI e-Store as well.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    MCU Projects·- my new site where I will be posting all projects, code, etc.

    Quit buying all those fixed voltage regulators, and·get an Adjustable Power Supply·for your projects!· Includes an LED testing terminal!

    SD Card Adapter·- Add extra memory to your next Propeller project with ease!
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-05-20 20:02
    @Vaati

    I downloaded the User Guide for that chip.
    This looks very nice, I like the high speed internal digital clock!
    .50 each is great! I may have to get some samples. These might
    be better than a tiny for a lot of things.

    If I buy a programmer maybe they will send me a few samples smile.gif

    Mouser has the 14pin dip for .69 in 100 lot.
    This might be a better chip for me than the 14pin tiny44A.
    One of these might be perfect for mounting on the back
    of parallel lcd displays and making them easier to use. It
    should handle 4bit mode easily with its 10 I/O pins. This would
    allow you to make a serial 2 line backlit lcd for about 3.25 total including
    shipping for the cpu and the lcd....nice.

    Thanks for mentioning this...the more I read the user guide the
    better this sounds. The asm looks straightforward and simple.
    And lots of bang for the buck....
    Sr6eguT1.jpeg
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-05-20 20:55
    Vaati

    Somehow I can't seem to find the $26 programmer on the TI site.
    Could you possibly point me to it.
    I just need something capable of programming the 14pin dip part.

    I found 2 cute USB kits but they don't look like programmers for
    an external part....could one of these be what you meant?
    They are 10 and 20 dollars.
    ez430_t2012.jpg
    ez430-f2013.jpg
  • LeonLeon Posts: 7,620
    edited 2010-05-20 21:14
    You can use one of those USB emulators, but you will need to put one of those tiny connectors on your target board. I use the $99 USB FET for debugging the MSP430, it's supported by the Crossworks development tools.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-05-20 22:58
    Thanks guys for the feedback and ideas into what you use.

    This particular project I am working on is a product that I want to sell in the US$30 range and therefore I am trying to keep the BOM as low as possible and can't justify the Prop + supporting parts which could cost around US$11.00.

    I've considered the MSP430 before. I've used them twice in proof-of-concept stuff using the little target boards. I haven't actually done a product or a PCB with them yet. One of the other desirable features of what I am working on is that the product must be able to be use firmware upgradable (with a easy to use, external tool such as Prop Plug or FTDI breakout board or cable). I think this might rule MSP430s out because I haven't seen a lot on bootloaders, but then again I don't play in that arena as much and may be missing it.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
    www.tdswieter.com
  • TubularTubular Posts: 4,718
    edited 2010-05-20 23:17
    For development at least, don't forget the EZ-Chronos MSP430 watch a few of us here were drooling over

    Someone in the sandbox came up with a half price discount code which resulted in it being something like $25 discount has ended.

    There were three different versions for the wireless frequency.

    Post Edited (Tubular) : 5/21/2010 12:00:52 AM GMT
  • TubularTubular Posts: 4,718
    edited 2010-05-20 23:21
    Here's the link to the TI watch; the discount code is buried somewhere in that thread discount ended I think
    http://forums.parallax.com/showthread.php?p=860751

    Post Edited (Tubular) : 5/20/2010 11:59:36 PM GMT
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-05-20 23:48
    Timothy, what is this project you are building. I'm
    just curious.

    If the firmware code is rather small you might use
    something unusual to update the flash memory.
    The ftdi or something like a prop plug would add
    dollars to the unit cost. If your code could fit into
    a .69 1k flash TI430 device you could save some money
    by writing your own tiny bootloader that used something
    like an audio signal from a sound card or perhaps use
    an LED to pick up data from something you can flash
    with simple PC software....maybe a kbrd LED or a
    section of the screen even??? You might be able to
    update a short section of code with a downloadable
    video or audio file? The TI430 seems to be able to
    write its flash at runtime.

    You can get an easy to use sound decoder chip on ebay
    for less than .40 including shipping if I remember correctly.
    With that chip and whatever cheap mic you could find it
    would be easy to bootload using an audio file. Anyone
    would be able to simply sit the device near the pc speaker
    and update the flash. might be annoying to listen to though smile.gif

    @Tubular

    That TI watch is pretty cool!
    I'm not much for big geek watches but that is amazing for $25
    They just have to be losing money on that.
  • localrogerlocalroger Posts: 3,452
    edited 2010-05-21 00:10
    We've spent so much energy begging for bigger faster props with more of everything that the idea of a stripped down cheaper subprop is almost bracing. With only 2 cogs Spin code and Hub accesses would be 4x faster because the Hub would only have to go through 2 states instead of 8 before returning. Hub RAM would be almost as fast as Cog RAM. For most apps you'd basically have a PASM cog and a Spin cog. That lets out a lot of apps, probably including anything using video, but hey one cog can do four serial ports and you can do a lot of stuff very adequately in Spin, especially if it gets a speed boost. You'd only have four counter/timers but that would be fine for a lot of stuff. And you could put it in what, a DIP20 with maybe 16 external I/O pins? Don't plug it into the ENC28J60 socket by mistake...

    It's also interesting to contemplate a 4-cog Prop, double-speed on Spin, which would be adequate for a lot of stuff I've used regular Props for. That gives you 1 spin + 3 pasm which lets you do video, PS2 keyboard, serial, and Spin all at once. Give it 16 real I/O too to reduce the package size.

    Of course I realize Parallax has stuff to do (including the biggerfaster stuff we've been clamoring for) but I think these would be seriously viable products for a lot of real world applications, and possibly a lot easier to work up than the biggerfaster stuff, being as it's usually easier to whack stuff off than to add new stuff to a design...
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2010-05-21 00:27
    Re: smaller Prop

    I'd vote for four cogs. Two cogs would work for some of my applications. If single quantity cost was US$3.00, I 'd buy it. (don't forget you would still have to add the EEPROM).

    @Holly

    I like your creativity. In general, the device I am creating is a controller board for a new line of products at Brilldea. I'm throwing around ideas at the moment. I need to put some thoughts together, and then go do some other work (like Parallax Web Server software) and then come back to this idea. I'd like the product low cost and easy to update. I considered one of the Atmel USB microcontrollers, which be very easy to update. See the Teensy as an example of a project using the USB micros. The product will basically receive serial and then output formated data to an LED driver. The product will be expandable for having routines to playback and such. The goal is really to have an inexpensive controller, yet build in the ability to be flexible and customized.

    With whichever micro I chose, I will need to do software development and tackle a learning curve. Thus, this project isn't fast track because I need to get the Parallax Web Server work going again and the W5100 drivers.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.
    www.brilldea.com - Prop Blade, LED Painter, RGB LEDs, 3.0" 16:9 LCD Composite video display, eProto for SunSPOT, PropNET, PolkaDOT-51
    www.tdswieter.com
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-05-21 01:05
    Yes!
    I had forgotten that you can do USB in software on
    many AVR devices, that's the way to go then smile.gif

    The code to do USB is a freebie.

    V-USB, the gnu public license.
    www.obdev.at/products/vusb/hidkeys.html
  • RavenkallenRavenkallen Posts: 1,057
    edited 2010-05-21 01:23
    If you try out a picaxe you will like what you find. Here is a link to 20 pin one. It is only $6.00 and it is very powerful. It has up to 64 MHZ speed, 4 kilobytes of program memory, support for serial, spi, i2c and OW devices, it can take in ps/2 keyboard input, you can control 8 servos...The list goes on

    http://www.sparkfun.com/commerce/product_info.php?products_id=9432

    You will also need the usb cable to program it. This is like $26.00 and besides a couple of resistors and a stereo headphone jack, it is the only hardware you need.

    http://www.sparkfun.com/commerce/product_info.php?products_id=8312

    AND the best part....You can program it in basic, so that means no learning curve. All you gotta do is download the free editor program and you can start programing in less than a minute...
  • edited 2010-05-21 04:16
    HollyMinkowski said...
    Vaati

    Somehow I can't seem to find the $26 programmer on the TI site.
    Could you possibly point me to it.
    I just need something capable of programming the 14pin dip part.

    I found 2 cute USB kits but they don't look like programmers for
    an external part....could one of these be what you meant?
    They are 10 and 20 dollars.
    ez430_t2012.jpg
    A friend of mine said they would operate for months on a watch battery.· I suppose it is this one but I'm not sure.· I didn't order one because I didn't know anyone who was using it so I kept putting it off.

    ·
  • edited 2010-05-21 04:42
    HollyMinkowski said...
    Vaati

    Somehow I can't seem to find the $26 programmer on the TI site.
    Could you possibly point me to it.
    I just need something capable of programming the 14pin dip part.

    I found 2 cute USB kits but they don't look like programmers for
    an external part....could one of these be what you meant?
    They are 10 and 20 dollars.
    ez430_t2012.jpg
    I think you want the ez430-f2013 complete development tool, Holly:
    http://www.mouser.com/ProductDetail/Texas-Instruments/EZ430-F2013/?qs=3wuez3jz59JrMkK3bemqmA%3d%3d
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-05-21 08:11
    Chuckz

    I want to order that $20 USB dongle and perhaps the 3 extra target boards
    for 10.00

    I'm still not certain though if I can pull the little target board off the dongle
    and connect the 4 wires to a 1k part on an external board I build myself
    and program the chip?

    It's actually a 2 wire jtag interface called spy-by-wire. +, gnd and 2
    data lines. A TI ad I found said the ez430 dongle was supposed
    to debug all members of the MSP430F20xx family, but that is the sole
    statement I could find about that compatibility anywhere.

    It's the really cheap 1k part (MSP430F2001) that I am most interested in you see.
    1k is not a lot of flash but if I use asm instead of C then that's plenty of space for
    the kind of things I have in mind. The asm has just 27 simple core instructions so
    it should be only a few days work to pick it up if you know asm for other parts.

    One other thing I'm unsure of is the digital internal clock. I'm wondering if it can
    be precisely tuned with one of those common low freq watch xtals and then remember
    the proper correction value once the xtal is no longer attached. I found hints of that
    but nothing concrete. I also hope that the internal timer can run the chip at 16mhz, the
    max frequency (16mips) I really hate external xtals for low-cost projects.

    At .69ea in 100 lots the MSP430F2001 would be great for tiny projects and also to add
    onto boards as an extra processor, or 2 or 3... I'd love to try one out on a 2.50 Hong Kong
    2line LCD smile.gif it could result in easy to drive, ultra cheap, back-lit LCD displays for the prop
    and other uControllers.
  • LeonLeon Posts: 7,620
    edited 2010-05-21 08:56
    TI uses a DCO which effectively locks the HF oscillator to the watch crystal. It will just free-run with the crystal missing.

    The MSP430 Yahoo group is worth joining:

    tech.groups.yahoo.com/group/msp430/

    and TI has their own forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-05-21 09:27
    Thanks Leon

    I am reading through the datasheet and it says there are
    two 16mhz dco clock adjustment bytes that you can change to
    better calibrate the clock...as long as you are using at least 3.0v
    you can get 16mhz...lower with less V.

    I suppose I can create a small test program to toggle a pin
    and read its frequency with a 16mhx xtal attached using a
    frequency counter at work. Then I could adjust the dco
    values to best match that...I need a cheap freq counter
    at home anyway so maybe this is a reason to get one.

    That yahoo group might be nice. This is the only Ucontroller
    board I have ever used, if I start using another I won't have
    much time left for anything else online smile.gif

    Z7fQbSVz.jpeg

    Post Edited (HollyMinkowski) : 5/21/2010 9:33:08 AM GMT
  • LeonLeon Posts: 7,620
    edited 2010-05-21 09:48
    I designed a little prototyping PCB for the 'F2001, there are a couple of versions. It uses a watch crystal. I made the PCB at home, you are welcome to the Gerbers if you want to get one made. I actually used a Molex connector for debugging, but I could easily adapt it for the tiny Mill-Max connector that TI uses.

    Here is what it looks like:

    F2001_pcb.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM

    Post Edited (Leon) : 5/21/2010 10:04:16 AM GMT
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-05-21 10:50
    Leon, that image is useful.
    What is the value of that resistor just under the programming connector?
    It seems that a proto board for this controller is really a simple affair smile.gif
  • LeonLeon Posts: 7,620
    edited 2010-05-21 11:58
    47k, it's a pullup for the RST pin. Here is the schematic:

    www.leonheller.com/images/F2001_3.pdf

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
  • edited 2010-05-21 12:54
    HollyMinkowski said...
    Chuckz

    I want to order that $20 USB dongle and perhaps the 3 extra target boards
    for 10.00

    I'm still not certain though if I can pull the little target board off the dongle
    and connect the 4 wires to a 1k part on an external board I build myself
    and program the chip?


    According to TI's website, the target board can be detached.· I also remember seeing it for sale seperately.

    According to this link:

    http://focus.ti.com/mcu/docs/mcuprodmsptoolsw.tsp?sectionId=95&tabId=1203&familyId=342&toolTypeId=1#EXPboards

    "eZ430-F2013 Complete development system with detachable target board and USB emulator. Ideal for new users.· $20"

    You can also get a board:

    http://focus.ti.com/docs/toolsw/folders/print/ez430-t2012.html

    "The eZ430-T2012 includes three MSP430F2012-based target boards for the eZ430-F2013 Development Tool. The eZ430 Development Tool provides a real-time debugging and programming interface for the MSP430F2012 on the target board, and comes with the easy-to-use IAR Embedded Workbench Integrated Development Environment (IDE). The T2012 can be used to develop your personal project or to evaluate the MSP430 MCU. The T2012 gives you all the same capabilities and peripherals of the MSP430F2013 on the eZ430, but includes a high-speed, 8-channel 10-bit ADC."

    So take some time, read all of the links and I found them after being patient.

    New MSP430 users that would like to get started with an easy to use, low cost tool should start here. www.ti.com/ez430

    Maybe someday you or someone else·can help me get started with it.
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-05-21 20:43
    @Leon
    Thanks for the schematic!

    @Chuckz
    Thanks for looking around that site and getting useful links. smile.gif

    I think I will order that USB dongle and the 3 extra boards.
    And ask for some sample 1k chips at the same time.
    If I have it sent to where I work maybe they will send samples.


    If I figure it all out perhaps I could make a newbie page about it
    on google's free web pages.
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-05-21 22:05
    In this picture you can see the insides of the USB dongle
    and also what the boards look like that attach to it. I was
    thinking I could take one board and clamp it in the vice thing
    I use to hold circuit boards to work on them and hit it with
    some hot air on the back and pull the little 4pin connector
    off. Then I could spread the rear pins of it out a little and solder
    on a short piece of ribbon cable with a connector on the end
    to mate to a socket on my own boards for programming them.
    It should work, at least in theory.

    fsl6SAb2.jpeg
  • LeonLeon Posts: 7,620
    edited 2010-05-21 22:22
    Mill-Max will send you a few samples. They aren't available for sale in the UK, that's how I got mine. I think that Digi-Key sells them.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Leon Heller
    Amateur radio callsign: G1HSM
Sign In or Register to comment.