Pages: [1]   Go Down
Author Topic: replacing arduino with alternative in specific project  (Read 1073 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

so here is my problem:

i made automatic color changer which is fitted into one of the taps in my house composing of lm35 temperature sensor .
if temperature of water is < 25 color of water seems  blue >40 hot or else green.

i have used arduino for this.

now as arduino seems not feasible to be kept near the tap for this specific work and needed for another of my works .

what measure should i take to replace arduino with cheaper alternative.

This is not a specific question.

what a person should do after prototyping to bring the successfully prototyped product into the market.
Arduino is not a good option.Because his project must not cost beyond threshold limit.
Logged

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 69
Posts: 2557
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To keep it arduino like you could maybe use a smaller chip like the ATtiny85.
Logged


Offline Offline
Sr. Member
****
Karma: 4
Posts: 327
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

or do it with a couple of transistors and resistors,
   
or an op amp.

the LM35 is a variable voltage output,

up to one votage, you want one out put on, above that you need that output off.

look up window comparators,

http://www.dummies.com/how-to/content/electronics-components-how-to-use-an-op-amp-as-a-v.html

 

Logged

California
Offline Offline
Faraday Member
**
Karma: 88
Posts: 3382
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is not a specific question.

There is no general solution for non-specific scenarios. You can build a "standalone Arduino", use smaller AVR chips like the 84s or 85s, or you could use discrete/passive components. What should be done will depend on the scenario.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i can use opamp as a comparator..
but i dont want the answers in high..or low..

my lights intensities varies with temp.

also..
lm35 have such a low precision that.. using it in the comparator  is not feasible for long run as voltage of the batteries goes on decreasing
and lm 35 give values in millivolts.
Logged

Offline Offline
Sr. Member
****
Karma: 4
Posts: 327
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

sorry

your spec was a window comparator.

"if temperature of water is < 25 color of water seems  blue >40 hot or else green"

batteries, well yes , they do have voltage change over time, but the correct circuit takes care of that.
 
LM35 in mV, yes, but op amps provide gain, so no problem.
   I'd suggest that the arduino analog input might benefit from an amp between the LM35 and the Arduino , possibly with a bit of filtering any way.

out of interest, how u going to charge the battery ?

have fun,
Logged

Anaheim CA.
Offline Offline
Faraday Member
**
Karma: 47
Posts: 2892
...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There is no reason why you can't use a Tiny85 and an RGB LED. THe 85 has an analog channel or two, can do PWM on 3 ports... Here is an example of a Tiny that I have running on my desk...
Code:
//ATtiny85 RGB color fading Mood Light NOW WITH LIGHT SENSING CAPABILITIES!!!

const int redPin = 0;
const int grnPin = 1;
const int bluPin = 2;
const int sensor = 3; // Ground for continous operation.


void setup()
{
  pinMode(redPin, OUTPUT);   
  pinMode(grnPin, OUTPUT);   
  pinMode(bluPin, OUTPUT);
  pinMode(sensor, INPUT);
}

void loop() {
  if (analogRead(sensor) <= 200)
  {
    redtoyellow();
    yellowtogreen();
    greentocyan();
    cyantoblue();
    bluetomagenta();
    magentatored();
   
  }
  else if (analogRead(sensor) >= 201)
  {
    digitalWrite(redPin, LOW);
    digitalWrite(grnPin, LOW);
    digitalWrite(bluPin, LOW);
  }
}

void redtoyellow()
{
  digitalWrite(redPin, HIGH);
  digitalWrite(bluPin, LOW);

  // fade up green
  for(byte i=1; i<100; i++) {
    byte on  = i;
    byte off = 100-on;
    for( byte a=0; a<100; a++ ) {
      digitalWrite(grnPin, HIGH);
      delayMicroseconds(on);
      digitalWrite(grnPin, LOW);
      delayMicroseconds(off);
    }
  }
}



void yellowtogreen()
{
  digitalWrite(grnPin, HIGH);
  digitalWrite(bluPin, LOW);

  // fade down red
  for(byte i=1; i<100; i++) {
    byte on  = 100-i;
    byte off = i;
    for( byte a=0; a<100; a++ ) {
      digitalWrite(redPin, HIGH);
      delayMicroseconds(on);
      digitalWrite(redPin, LOW);
      delayMicroseconds(off);
    }
  }
}


void greentocyan()
{
  digitalWrite(grnPin, HIGH);
  digitalWrite(redPin, LOW);

  // fade up blue
  for(byte i=1; i<100; i++) {
    byte on  = i;
    byte off = 100-on;
    for( byte a=0; a<100; a++ ) {
      digitalWrite(bluPin, HIGH);
      delayMicroseconds(on);
      digitalWrite(bluPin, LOW);
      delayMicroseconds(off);
    }
  }
}



void cyantoblue()
{
  digitalWrite(bluPin, HIGH);
  digitalWrite(redPin, LOW);

  // fade down green
  for(byte i=1; i<100; i++) {
    byte on  = 100-i;
    byte off = i;
    for( byte a=0; a<100; a++ ) {
      digitalWrite(grnPin, HIGH);
      delayMicroseconds(on);
      digitalWrite(grnPin, LOW);
      delayMicroseconds(off);
    }
  }
}


void bluetomagenta()
{
  digitalWrite(bluPin, HIGH);
  digitalWrite(grnPin, LOW);

  // fade up red
  for(byte i=1; i<100; i++) {
    byte on  = i;
    byte off = 100-on;
    for( byte a=0; a<100; a++ ) {
      digitalWrite(redPin, HIGH);
      delayMicroseconds(on);
      digitalWrite(redPin, LOW);
      delayMicroseconds(off);
    }
  }
}



void magentatored()
{
  digitalWrite(redPin, HIGH);
  digitalWrite(grnPin, LOW);

  // fade down blue
  for(byte i=1; i<100; i++) {
    byte on  = 100-i;
    byte off = i;
    for( byte a=0; a<100; a++ ) {
      digitalWrite(bluPin, HIGH);
      delayMicroseconds(on);
      digitalWrite(bluPin, LOW);
      delayMicroseconds(off);
    }
  }
}

This runs from 3V3 and an ATtiny 85 @ 1 MHz internal RC clock very nicely. It would require trivial modification to do as you describe... All the code.. is there, It just needs a little re-arranging.

Doc
Logged

--> WA7EMS <--
“The solution of every problem is another problem.” -Johann Wolfgang von Goethe
I do answer technical questions PM'd to me with whatever is in my clipboard

Netherlands
Offline Offline
God Member
*****
Karma: 7
Posts: 649
A naughty mind is a joy forever.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've noticed that attiny's can be quite expensive, you could also use an atmega-8.
Logged

2nd star on the right
Offline Offline
Full Member
***
Karma: 0
Posts: 103
Everything I am is classified under the official secreats act!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you meaning Arduino as in a flu prebuilt unit or Arduino as in Atmega328p bare bones components.
Logged

Sorry for the noobish post but my knowledge is 10 years out of date!

Pages: [1]   Go Up
Jump to: