Senior School technology project help

I am building a device that is using a flow meter to measure the amount of water coming out of a tap in milliliters. I need some help with the programming of the Arduino Uno as I have no idea how to code them and need to finish this by next week. I am using 7 LEDs to indicate when 100ml has been used (1 LED will light up once 100ml has been used). I need these LEDs to light up and stay lit until the device is reset. I will need to also have a button to reset the device as well. Some help with this project would be much appreciated ! Thank you everyone !

P.S. This is the Flow meter I am using : http://www.jaycar.com.au/productView.asp?ID=ZD1202

What have you done so far? Connected wires? Downloaded the IDE?

Post your schematic and code (Use Code Tags), and specifically what you are having trouble with. We are unlikely to help you without it.

I have copied the code and breadboard setup from this post (http://forum.arduino.cc/index.php/topic,8548.0.html), but I need some help adding LED commands and changing that program from L/hour to just mL.

Bearing in mind that this is a senior school technology project, and your contribution to it so far has been to copy somebody else's working project, don't you think that you ought to make at least a token effort to implement this yourself? Scaling the measured flow rate and doing some threshold comparisons is hardly rocket science, but your post gives the impression that you're waiting for somebody to do the thinking for you. If you get stuck there are plenty of people here willing to help you get round problems, but this isn't the place to get people to do it for you, especially given that it's an academic assignment. The whole point is that you are expected to learn to do this for yourself.

The sketch you linked to is not overly complex and with a few hours work I am sure you can learn enough to work out what is happening and what you need to change for your purposes.

There is lots of info on the net about Arduino's - a Google search will throw up lots of options but for a basic introduction this is as good as any Arduino Tutorial - Learn electronics and microcontrollers using Arduino!.

Download the IDE, play around with a few skectches and you should be well on your way to working out what needs to be changed in your sketch.

If you run into a specific problem, feel free to ask for help, but please don't expect someone to do your project for you.

Good luck.

This sounds far fetched to me. So you only had one week to build this project that you didn't know about earlier? And you have the ability to do "3D modeling, engineering reports, and scouring through workplace health and safety laws and regulations" but can't take a project that is basically done and make a few minor modifications to suit your purposes? Sounds like you're asking someone to finish the job for you because you started too late.
Please be respectful of other members. If you honestly want help, don't say things to senior members like "I'd like to enlighten you." That kind of talk usually makes the people who can help you not want to.

How are you going with the tutorials I linked to a few days ago ? Any questions yet ?

Magicj:
How are you going with the tutorials I linked to a few days ago ? Any questions yet ?

From what I can figure out from the videos you linked me, this is very similar to the way you do things in python. This is what I have so far.

//declare the constants used
const int sensorPin = 2;       //The pin location of the sensor
const int led1Pin = ??;         //pin for LED corresponding to volume1
const int led2Pin = ??;         //pin for LED corresponding to volume2
const int led3Pin = ??;         //pin for LED corresponding to volume3
const int led4Pin = ??;         //pin for LED corresponding to volume4
const int led5Pin = ??;         //pin for LED corresponding to volume5
const int led6Pin = ??;         //pin for LED corresponding to volume6
const int led7Pin = ??;         //pin for LED corresponding to volume7

const float Kfactor = 0.0038;    //liters flowed per pulse from sensor

const float vol1 = ??;           //liters flowed when LED1 comes on
const float vol2 = ??;           //liters flowed when LED2 comes on
const float vol3 = ??;           //liters flowed when LED3 comes on
const float vol4 = ??;           //liters flowed when LED4 comes on
const float vol5 = ??;           //liters flowed when LED5 comes on
const float vol6 = ??;           //liters flowed when LED6 comes on
const float vol7 = ??;           //liters flowed when LED7 comes on
const unsigned long updateTime = 1000; //time btw printed updates, msec

//declare the variables used
volatile unsigned int NbTopsFan = 0; //variable to accumulate the number of pulses
float volFlowed = 0;         //the volume flowed since measurement started, liters                       

void countPulses()       //This is the function that the interupt calls
{
  NbTopsFan++;    //This function counts the number of rising edges from the sensor
}

// The setup() method runs once, when the sketch starts
void setup() //
{
  //initializes digital pin 2 as an input w/pullup resistor enabled
  //since the output of the sensor is an open collector
  pinMode(sensorPin, INPUT_PULLUP);
  //declare the LED pins as outputs
  pinMode(led1Pin, OUTPUT);
  pinMode(led2Pin, OUTPUT);
  pinMode(led3Pin, OUTPUT);
  pinMode(led4Pin, OUTPUT);
  pinMode(led5Pin, OUTPUT);
  pinMode(led6Pin, OUTPUT);
  pinMode(led7Pin, OUTPUT);
  //turn LEDs off
  digitalWrite(led1Pin, LOW);
  digitalWrite(led2Pin, LOW);
  digitalWrite(led3Pin, LOW);
  digitalWrite(led4Pin, LOW);
  digitalWrite(led5Pin, LOW);
  digitalWrite(led6Pin, LOW);
  digitalWrite(led7Pin, LOW);
  //set the serial port to 9600 baud
  Serial.begin(9600);
  //and the interrupt is attached to pin2
  attachInterrupt(0, countPulses, RISING);
}
// the loop() method runs over and over again,
// as long as the Arduino has power
void loop ()   
{
  volFlowed = float(NbTopsFan) * Kfactor; //# pulses * vol per pulse = total vol flowed
  Serial.print(volFlowed);                //Prints the number calculated above
  Serial.println(" liters");
  if(volFlowed >= vol1){
    //turn on LED1 for volume1
    digitalWrite(led1Pin, HIGH);
  }
  if(volFlowed >= vol2){
    //turn on LED2 for volume1
    digitalWrite(led2Pin, HIGH);
  }
  if(volFlowed >= vol3){
    //turn on LED3 for volume1
    digitalWrite(led3Pin, HIGH);
  }
  if(volFlowed >= vol4){
    //turn on LED4 for volume1
    digitalWrite(led4Pin, HIGH);
  }
  if(volFlowed >= vol5){
    //turn on LED5 for volume1
    digitalWrite(led5Pin, HIGH);
  }
  if(volFlowed >= vol6){
    //turn on LED6 for volume1
    digitalWrite(led6Pin, HIGH);
  }
  if(volFlowed >= vol7){
    //turn on LED7 for volume1
    digitalWrite(led7Pin, HIGH);
  }
  delay(updateTime);                      //time, msecs, btw updates

Is this a peak flow indicator?
I can't see anything to turn LEDs off

AWOL:
Is this a peak flow indicator?
I can't see anything to turn LEDs off

I don't want the LEDs to turn off until a person manual resets them. I am not looking to measure the flow rate, but more so the total quantity of liquid passing through the device.

JonT:
when you do not have the time, nor the expertise to learn how to do something, you get others to help you do it. I do not have a weeks to finish this thing, I have a few days...

Thanks for sharing your enlightenment.

When you do not have the time or expertise to complete your academic assignment on time, you do not plagiarise other people's solutions and ask strangers to adapt it for your needs - you contact your tutor and inform them that the project you have taken on is too difficult for you and you need to discuss changing the scope, or you haven't put in the amount of effort required and need to discuss getting an extension.

Your comment "I have no idea how to code them" makes it clear that either you are not competent to implement the Arduino part of your solution or you haven't put any effort into it, since there is nothing especially difficult about what you're trying to do and most parts of it would be trivial to implement - you don't even appear to have made any effort to understand the working project that you found.

There are plenty of people (me included) willing to advise if you have taken responsibility for implementing the project but got stuck at a problem. Very few people, however, are going to do your homework for you.

This is what I have so far.

Actually, the code he showed in the most recent post was written for him by someone on the Spark Fun forum. The above quote may be an indication of how he plans to cite the help he has received.
https://forum.sparkfun.com/viewtopic.php?f=32&t=37942

jremington:

This is what I have so far.

Actually, the code he showed in the most recent post was written for him by someone on the Spark Fun forum. The above quote may be an indication of how he plans to cite the help he has received.
https://forum.sparkfun.com/viewtopic.php?f=32&t=37942

Back when I was at school it was harder to cheat because the internet was not available. But, if I did cheat, I had less chance of being caught :roll_eyes: