Req: Microcontroller Recommendation

Hello my most esteemed colleagues,

I'm designing a sensor interface circuit that has gain and filtering options that need to be set by latching a parallel set of bits. I want to control this remotely with a serial interface of some type (to reduce conductor count). I'm thinking I need a simple microcontroller with a serial interface (usart?) to do this easily.

Additionally, a microcontroller with a sleep mode that shuts down the clocks would enhance low noise measurement performance, so that's a requirement. Ideally it would wake up on serial interface activity.

Would you geniuses care to recommend a simple microcontroller (or an alternate approach) that would do the job?

The simple tinyAVR and PIC controllers seem to have too many peripherals and are overkill, but maybe that's no big deal. We're only building ~1000 of these.

Reply to
Veekster
Loading thread data ...

How many bits?

Reply to
linnix

Veekster wibbled on Thursday 11 February 2010 22:38

Speaking as a hobbyist only:

I found the AVR tinys to be quite manageable re low current sleep modes. Long story short - made a Maplin kit for the kids - an electronic dice based on a PIC. PIC died, so as I was working for an electronics company at the time, I borrowed their facilities and a bit of experienced help at lunctime and reworked the board slightly to take an ATTiny (GND and VCC pins are different). I was playing with AVRs for fun at the time.

Wrote a new program which was a bit more visually interesting than the old one and was very mindful about disabling unneeded blocks in the device and sleeping correctly whilst monitoring for one interrupt that came from a tilt switch (shake the dice).

In the end, I got the power consumption so low in sleep mode that it was unmeasurable with our mid range bench meters (and they had a fairly sensitive current range - I forget exactly how low, but pretty low). AVR datasheet suggests 2uA in sleep mode (ATTiny 25)and that would have been just off the bottom end of the meter I was using.

So personally I wouldn't worry. Turn off the unneeded units - the chips are a couple of pounds or less and dead easy to program. Probably as much of this applies to PICs, but I'm not up on those bar reading a few datasheets.

ATTiny 2313 seems to be one of the few with a full on board UART, though the ATTiny 25/45 claims the USI unit can be used to hardware assist a UART with more efficiency than the last resort of bit banging a couple of pins.

Don't discount the ATMegas either, if your interface needs more than a few pins - they're still cheap.

--
Tim Watts

Managers, politicians and environmentalists: Nature's carbon buffer.
Reply to
Tim Watts

If you want to turn off all clocks to the MCU, how will you wake it up again when your conversion is done? I had a friend who worked at a high end audio company and they put the digital and analog on separate modules with the digital in its own metal box. No clocks came out of the box other than configuration signals which did not transition when audio was being used. BTW, the audio was all audio, no ADC/DAC.

I think that is the upper end of sensitivity to noise in consumer apps. What are you trying to do with this design? I suspect that pretty much any MCU will do the job for you as long as it has enough I/ O signals.

Rick

Reply to
rickman

You can't get any smaller than a Tiny AVR or a PIC. Also consider the NXP LPC111x line. True 32-bit registers and math can be useful, particularly if you like assembly language.

In any case, take some time and pick the product that will serve you for the long haul so that you won't have to set up and learn a new toolchain next time you need a little controller.

Reply to
Jim Stewart

Since almost any core will do what you ask, you might want to refine it by define of what ADC precision you need, and what package. That can then help define the device.

eg So14/So16 are an emerging package area in small uC, that are easy to handle, and have low PCB impact. If 10bADC are enough, Silabs have just added some So16 variants. if 12b is needed, your choices thin out, but TSSOP20 parts give 12b ADC's

If you also need 12b DACs then something like the ADuC7023 ?

Reply to
-jg

Atmel have focussed on low power consumption and costs for years.

Protoype your idea.

Reply to
Core2Duo

You haven't indicated:

- how much data you need to send

- *if* you need to receive anything *back*

- the distances involved

- the data rates

- the "sample" rates (as different from data rates)

- power available

- what's going to be on the "other" (host) end etc.

There are *lots* of "serial interfaces" -- each with particular characteristics for all of the above criteria.

Reply to
D Yuniskis

Veekster wibbled on Thursday 11 February 2010 22:38

One other thing - the AVRs have three other major advantages in my book:

1) The instruction set on the 8 bit devices (Tiny/Mega/XMega) are the same, with certain devices having a few extra instructions. 2) AVRs have better opensource (and thus free and cross platform) compiler support. GCC (well known opensource solid and efficient) compiler will target AVRs. PIC support is random and the decent modern PICs (eg PIC24) seem to have bugger all support if like me, you work on linux hosts.

That was a deciding factor for me. Some of the high end PICs have slightly more interesting built in peripherals, but the MIPS speed is comparable.

3) AVRs have (generally) better current drive capacity in all GPIO pins (20/40mA with 200mA total per device) generally from the few PIC datasheets I've seen. This may make no difference to a lot of folk, but it does mean that for other work you can seriously light up LEDs, drive small relays and other stuff without any external driver components.

If you are looking for a device family that could be of long term interest for other work, it's worth considering.

OTOH I have heard Microchip may be better at keeping old PIC parts available for longer(?)

--
Tim Watts

Managers, politicians and environmentalists: Nature's carbon buffer.
Reply to
Tim Watts

If you have other processing such as is suggested with the serial interface, and the sensor output goes to something else, would not a simple PCF8574 do the job?

I.e. I2C 8 bit I/O port in a SO16 on your design, with a clock ONLY used when talking to the latch. There is also a PCF8575 which is 16 bit I/O port at 400kHz, so you can have more bits and read back inputs as well.

If you need even more bits than that they can be added on the same I2C bus as you can have 8 x PCF8574 on the same bus and another 8 x PCF8575A on the same bus (that is 16 x 8 bits of I/O). Then consider how many I/O's you get from PCF8575 in less SSOP24 devices.

Done this sort of thing before for sensors that need no noise from other parts of the system.

Where and how is the sensor output measured?

A shut off I2C bus, and good supply filtering (which you will need anyway) is good for that.

Unless the micro is going to do the actual measurement or other task I would choose the I2C or similar route.

A PCF8574 is cheap, been around for ages (and likely to be for a long time), you could even replicate one in a small PLD if it become obsolete and the second sources dried up. PLD route gives you possibility of 32 bit or larger I/O port, also means you can make your I2C match ANY of the I2C spec speeds or your own speed only. Run your serial as I2C specific to that sensor only (or group of similar sensors).

If really worried you can find wys to opto/galvanically isolate I2C or SPI, to really isolate them.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
 Timing Diagram Font
  GNU H8 - compiler & Renesas H8/H8S/H8 Tiny
 For those web sites you hate
Reply to
Paul Carpenter

Thank you and absolutely. A evaluation module for the uC would be helpful in this regard I'm thinking.

Reply to
Veekster

There are lots of useful evaluation boards at Olimex:

formatting link

But for small microcontrollers you don't need one, e.g. with a PIC and a PICKit2 (don't buy PICKit3, there are some bad reports for it) you can easily use a breadboard.

--
Frank Buss, fb@frank-buss.de
http://www.frank-buss.de, http://www.it4-systems.de
Reply to
Frank Buss

From what you are asking, I am not sure if the circuitry you have must be external to the micro. The PSoC for one will allow you to contain PGAs (programmable gain) Instrumentation Amplifiers and filters all on board. They are changed by simple API calls and can even be dynamically re-allocated to a completely different configuration. It does have a sleep mode as well.

No other micro has quite the versatility of the PSoC in terms of its configuration and re-configuration, but there must be others with programmable gain and filtering- try Silicon Labs for an 8051 based device and also Analog Devices had some lower end products that may fit the bill.

-Aubrey

--------------------------------------- Posted through

formatting link

Reply to
antedeluvian

r

ed

Paul, Thank you for your suggestions, I'm reading the data sheets you sent! Thanks everyone for your help! Vic

Reply to
Veekster

Veekster skrev:

Most people I talk to about sensors tend to end up with an ATxmega16/32A4. Mainly due to the 12 bit ADC with programmable gain. Nice sleeps modes. If you set the pin change interrupt on the UART RXD you can wake up.

--
Best Regards
Ulf Samuelsson
These are my own personal opinions, which may
or may not be shared by my employer Atmel Nordic AB
Reply to
Ulf Samuelsson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.