Which microcontroller is best for simple 120-220V control?

I am starting an embedded control project. This is so simple that probably any microcontroller will do, but I will first ask the experts which would really be the best.

Here is the basic spec:

Interface: A few switches Drive a relay to control one 120-220VAC 500W device

Microcontroller: Real time timer Battery backup or nonvolatile memory for power failure Small, cheap

Development Environment: C compiler Simple development kit I am an electrical engineer with C++ experience

Please let me know your recommendation of microcontroller.

Reply to
google
Loading thread data ...

I would suggest an AVR Family Member since it's

- cheap

- there are devices in PDIP housings, ideal for prototype

- there is a freeware c compiler (afair also a c++ environment - but do you realy need c++ on a microcontroller ?) and some commercial c, pascal or basic compiler

- the devices have some cmos ram, eeprom, flash eprom; some have a secondary x-tal for clock applications.

have a look on the atmel avr application notes.

hth.

hans

Reply to
Hans Müller

Reply to
Gary Reichlinger

I second that. Beautiful architecture.

Perhaps they could power it directly by mains, using a capacitor... without transformer...

(yes, this is dangerous to work with during development!)

Reply to
Antonio Pasini

Hello Gary,

My favorite as well. However, despite a new round of releases they seem to be on the pricey side and that has so far barred them from any of my designs. I am still holding out for that bare-bones low pin count MSP430 in the 30c category.

Regards, Joerg

formatting link

Reply to
Joerg

The other good thing about the AVR is that AVR studio simulator / ISP programmer / JTAG debugger are available as a free download from Atmel. Imagecraft make a very cost effective compiler that is very good combination with AVR achitecture.

You may need to watch choose low power variants and consider using low frequency operation for the type of power source you suggested.

regards, Johnny.

Reply to
Johnny

I agree. The MSP430 is nice... but my only reservation for a battery backed unit is that there is no brownout feature on the MSP430. As a result of the changeover and subsequent draining of the backup battery you may, (and I know first hand knowledge of this), suffer from a micro lockup. Your main power comes back online, only for your processor lock. Add an external reset/brownout circuit and you'll be on to a winner.! :-)

Jim

formatting link

Reply to
Jim

"Hans Müller" skrev i meddelandet news:43578cd3$0$12662$ snipped-for-privacy@newsread4.arcor-online.net...

Won't disagree with the AVR recommendation ;-)

Probably you should be able to do a nice job with the ATmega48/88/168.

Tools for the AVR: STK500 development board (< $100). With this you can program your part. AVR Studio now supports GNU C compilers (WinAVR) Downloadable from

formatting link
Otherwise there are free versions (code limited) from IAR : IAR will support Embedded C++ Imagecraft etc. A JTAGICE Mk II will allow you to program and debug.

--
Best Regards,
Ulf Samuelsson
 Click to see the full signature
Reply to
A.P. Richelieu

"Jim" schrieb im Newsbeitrag news:nw96f.1280$ snipped-for-privacy@newsfe4-gui.ntli.net...

backed

the

All MSP430 devices but the older '11x1 and '149 have the brownout feature.

See e.g.

formatting link

formatting link

formatting link

MIKE

Reply to
M.Randelzhofer

Oooops !

I used the 149. I should have said that in my post

Sorry for the mis-information. :-)

Jim

formatting link

Reply to
Jim

"M.Randelzhofer" skrev i meddelandet news: snipped-for-privacy@individual.net...

Looking at the MSP430x11x2 datasheet, The trigger point is max 0,7 * V(B_IT-) = 0,7 * 1,71 = 1,197 V. But the datasheet only seems to guarantee operation downto 1.8V ??? (Not to mention that the flash requires 2,7 V to program) I think you *need* external brownout for these circuits. Anyone can spread more light on this?

--
Best Regards,
Ulf Samuelsson
 Click to see the full signature
Reply to
Ulf Samuelsson

"Ulf Samuelsson" schrieb im Newsbeitrag news:KFt6f.1340$ snipped-for-privacy@nntpserver.swip.net...

I

main

feature.

I exactly asked this question last year at the TI ATC 2004 in Freising/Germany. They told me, that for worst-worst case calculations an external brownout detector can be used (Yes, they smiled). On the larger devices the threshold of the BOR is programmable (SVS).

In smaller devices, the integrated BOR is primarily designed for proper startup on insertion of batteries, where the BORless devices often hang up.

In my own tests, the MSP's with BOR start up properly at voltages above

1,2-1,3V at room temperature.

Writing to Flash needs an extra supervisory circuit or an integrated ADC to measure VCC, which can be done internally, to insure that VCC is > 2,7 or >

2,2 V (on the newer 'F2xxx devices).

MIKE

Reply to
M.Randelzhofer

feature.

Question is what frequency is safe.... Dropping the voltage will typically reduce the frwequency where the device operates properly. Testing on one batch of silicon does not mean that the next batch of silicon will behave in the same way. The nature of semiconductor processes nmeans that there will be variations between lots.

Typically the Power On reset circuits (which is a more proper name than BOD) will detect the low voltage and then generate an internal reset for some time. The voltage is expected to rise to a valid value (1,8V) before the internal reset is deasserted.

Some batches may be operational at 1.3 V, but if a batch turns up that is not operational below 1,8V you are in trouble. No Semiconductor will admit a problem if you run the part outside the spec.

Measuring with the ADC does not protect you against the voltage dropping after the measurement is complete. If you need selfprogramming, you need a Brownout at > 2,7V

I think in practice you have to have an external Brownout > 2,7 V for the design to work with

--
Best Regards,
Ulf Samuelsson
 Click to see the full signature
Reply to
Ulf Samuelsson

That's maybe ok for a RampUP, but true brownout is a fading Vcc, and this is the issue allude to : You can go outside the legal Vcc/Fmax profile.

Many vendors spec's actually have sizable gaps between the Vcc[min] and V[bod], where there is no coverage, and no comeback !

The ideal device would have sub 1uA BOD and programmable threshold, to allow system margining. Of course, those threshold-set fuses need to be read at a very low threshold, to give proper coverage....

The AVRs show appx 20uA BOD current, [programmable Threshold] OK for a uC, but not as good as Maxim's < 500nA for BOD _and_ WDOG. [NB: above threshold] Xicor made 500nA voltage references, but this territory is non trivial .

TI claim < 500nA for the very newest MSPs [BOD+OSC?], but full info is not released yet...

-jg

Reply to
Jim Granville

I found AVR Studio to be compeltely inadequate buggy and poorly written. COmpared even to Keil apps.

Reply to
Jona Vark
[...]

And it even seems to get worse with every revision, unfortunately...

--
http://www.flexusergroup.com/
Reply to
Bjarne Bäckström

You guys are really great. You have helped me narrow my search to either the AVR or MSP430 microcontrollers. As you observed, I am not constrained by software compatability.

I do have a development environment compatability issue, so I would like to once again prevail upon you for advice. Currently I use the following development platform for engineering software,

gcc/g++/gdb SlickEdit 10 IDE Red Hat Enterprise 3 Linux Pentium 4 and Opteron

I would prefer to use this same environment, ideally just adding a tool or two for embedded software development.

To summarize your development recommendations, thus far you have commented that AVR Studio is not so good. I hear nice things about Microsoft Visual Studio, but that would require a change to Windows.

So, which microcontroller is supported by development tools that best fit my development environment?

Reply to
Voom

Both are supported by GCC compiler. AVR has the better commercial C compiler. The 430 commercial compiler is suspect, IMO.

Reply to
diggerdo

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.