Alternative µController

Status
Not open for further replies.

D.M.

New Member
Hello everyone. I've designed an ambient light detector to dim and brighten an LED based on incoming light. Currently i am using the Parallax Propeller µController to operate the sensor and control the LED.

To make this work i have designed a quick RC filter using a Photoresistor and cap. When the light changes so does the resistance of the photoresistor and changes rise/fall times for the RC circuit. I then have a counter, detecting how many clock pulses have cycled while the RC circuit is a logic High. The amount of clock pulses depends on the incoming light and thus with a little bit of programming i dim/brighten the LED.

My question:

Are there any smaller and much cheaper µcontrollers that can do the same counting of clock pulses to determine incoming light? Also the power consumption of the Propeller (if powered by battery) is far too much to install in any practical application and i was wondering if anyone could recommend a few different CHEAP, POWER friendly controllers that will operate the same way.

Thank you in advanced.

D.M.
 
Hiya, I have done something similar to this, but in a different way.

I used a 16f877 and this is only 1 small part of the entire project. Basically i have 3 Green leds in series as my light detector, when exposed to bright light these can create a voltage of about 5.1 volts.

I use this voltage on one of the ADC pins on the pic, If you write your software so that the voltage in is relative to a pwm signal out then you can make it work so that as it gets dark the light gets brighter.

This uses minimal components and is relatively straight forward. Works for me anyhow.
 
For something as simple as that I would use the 8 pin Pic12F683. It has both an ADC and PWM module and cost $1.18 (1 off PDIP). It's power consumption will be much less than the LED and can be as low as 11uA. Standby is 50nA.

You don't state what programming experience you have. The above can be programmed in assembly, C and Basic.

Mike.
 
I kind of suspect they left the ADC out of the propeller for a reason. They are kind of an analog anti-education crutch. That is a good way to do that. To answer your question there is no other micro that is like the propeller. Parallax invented spin and everything is single core until you get to things you wouldn't want to solder. But, on the plus, other micros come with internal flash! Obviously you get the idea so it won't take you long to pick up. You have 1,000,001 choices for cheap and low power. If you are moving from parallax you are probably going to want a handy kit. I would tell you to get that 4$ TI development board but it is currently vapor ware. Another great option is this 9$ ST which has a pretty decent micro: STMicroelectronics : Application & Tools The typical hobbyist controllers are Microchip and Atmel. They both have great kits but they are 30 and up. Basic is convenient but it is a serious handicap in embedded programming for two big reasons. 1: The micros are now designed and optimized for C and all of the manufacturer support is in C if not assembly (seeing less and less). 2: Being comfortable with C means you can move between micros easily because C is standardized. If you can get a basic compiler for the micro your using, it probably has it's own quirky implementation. Not to say different systems don't have C quirks and proprietary stuff but I can grab a brand new micro and at least make an led flash or something typically within just a few minutes.
 
You could go even cheaper than that and use a 12f675, that has a comparator, as well as an 8-bit ADC (or is it 10 bit?). The 12f629 is the same, without the ADC. An ADC will make life easier. These are $2 ? And are pretty much designed for low power.

However, considering you're using a quite clever way of measuring an analogue signal with an RC oscillator, and your input is all digital, you could use a 12F509, or even the 10f series PIC's ..... SOT23-6, tiny, and very low power consumption. Software PWM is fast enough for dimming an LED, especially if you use the on board timer.

Certainly the propeller uC is over kill, but I guess your decision would be the support you have available. If you don't have a programmer or the compiler for certain micro's, things start to add up.

Avr's can be another option, but the smallest ATtiny series (8 pin jobs) generally have higher power consumption than PIC equivalents, but with many on board peripherals (ADC, and several PWM's at a minimum), pricing would be on par with PIC's at around $0.60 - $2.
 
Last edited:
When thinking cheaper, remember that for bare-bones PIC's you will need to purcahse a programmer to burn the chips.

I'm going to suggest a PICAXE:
The low end is an 8-pin PIC with a built-in BASIC interpreter for $3.50. But, the BASIC programming software and manuals are free online. And, all you need to program the chip is a 3-wire serial cable (you can make), 2 resistors, and a 5V power source (5V wall wart or 4.5V batteries). They are slower than PIC's with compiled programs, but an excellent chip for your design.

Ken
 
One more thing, I realise you probably want to use a microcontroller, but for this specific application, a well designed comparator circuit will do the job nicely, with ridiculously low power consumption, but with more external components than any uC circuit.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…