Show Posts
Pages: [1] 2 3 ... 5
1  Using Arduino / Project Guidance / Re: Accelerometer for measuring rpm on bicycle on: September 16, 2013, 08:01:15 pm
I am planning a live display so I can adjust my pedalling rate to get my heart rate where I want it to be.

A question to clarify Xbee's, as I am thinking of using an Xbee transmitter on the accelerometer, another one of the heart rate sensor and a receiver at the display. Does each Xbee transmitting sensor data require an Arduino? I think it most likely does, just need clarification
2  Using Arduino / Project Guidance / Re: Accelerometer for measuring rpm on bicycle on: September 13, 2013, 01:15:53 pm
At the moment I am thinking of maybe using either a chest strap of a ear clip to measure heart rate and also a device clipped to my shoe or strapped to my lower leg sensing the rate that I am pedalling.

I would like to have a device maybe clipped to the handlebars with a graphical representation of both heart rate & pedalling rate over time, with instantaneous values for both.

Perhaps Xbee/Zigbee would be useful for this, as I would prefer not to have wires running everywhere to get tangled while I am pedalling furiously!

3  Using Arduino / Project Guidance / Re: Accelerometer for measuring rpm on bicycle on: September 12, 2013, 03:35:54 pm
Quote
Unless RPM is not really what was intended here.

Correct, I am interested in the rate that I am pedalling

Quote
What about attaching a small magnet to each of the wheels

The whole project is for Spin Classes at my local gym, to track my heart rate & pedalling rate. So attaching magnets to multiple Spin bikes (as I am unlikely to get the same bike all the time) adds additional cost. Ideally I would like a device that I wear.

Quote
So evaluating max and mins in the data (after filtering) may give you the rate.

That sounds like it may be the way to go.

Does anyone know whether a VC accelerometer is the correct choice?
4  Using Arduino / Project Guidance / Accelerometer for measuring rpm on bicycle on: September 12, 2013, 01:29:04 pm
Hi everyone,
I am in the planning stage of a new project.

It involves measuring the rate that I am pedalling on my bicycle, however I want it to easily be used across several bicycles, which would likely mean attaching the device to my lower leg/ ankle/ shoe.
My research leads me to believe that a VC (variable capacitance) accelerometer is the way to go.

Does anyone have any suggestions / experience that they could share?
Thanks in advance! smiley
5  Using Arduino / Motors, Mechanics, and Power / Re: Using VO2223A phtotriac to control vibration pump on: July 06, 2013, 08:07:46 pm
I'm not sure I understand what you mean, do you mean a 1K between pins 5 and 6, as well as the 510 ohms on the LED side?
6  Using Arduino / Motors, Mechanics, and Power / Re: Using VO2223A phtotriac to control vibration pump on: July 05, 2013, 12:48:07 pm
Sorry, typo, resistor is 510 ohms. I metered it & got 500 ohms.

Shorting out pins 6 and 8, the pump runs as it should.
5V across pins 1 and 4, the pump does not run.

I have tried a new VO2223A in case I damaged the first one, the pump does not run.

I tried a 1K between pins 5 and 6, the pump does not run.

I measured the current draw when the pump is running with water. It pulls 1.5A.  smiley-eek Considering its rated at 41W, its only supposed to pull 340mA.
I guess I have found the problem, I need a bigger optotriac
7  Using Arduino / Motors, Mechanics, and Power / Re: Using VO2223A phtotriac to control vibration pump on: July 05, 2013, 01:00:49 am
Here is the connections I am using,I didn't have the correct part on Eagle, so I used this Eagle part, however I am using the VO2223A phototriac. DC connected across pins 1 and 4, AC connected across pins 6 and 8 lt

I have checked and confirmed that the series resistor I am using is in fact 500 ohms. I have also tried 390 ohms with the same result.
8  Using Arduino / Motors, Mechanics, and Power / Re: Using VO2223A phtotriac to control vibration pump on: July 04, 2013, 11:48:16 am
R1 = 500 ohms. So the current through the LED should be (5-0.9) / 500 = 8.2mA. This is slightly under what the datasheet says for max current.

I have tried both PWM and a high pin with no success. I also tried driving it from the Arduino Vcc 5V pin just to be sure.

This phototriac is a random fire, do I perhaps require a zero crossing phototriac?
9  Using Arduino / Motors, Mechanics, and Power / Re: Using VO2223A phtotriac to control vibration pump on: July 04, 2013, 01:30:19 am
I am getting about 0.9V across the LED when it is switched high. According to the datasheet it should be between 0.9 - 1.3V, so it matches with the datasheet.
10  Using Arduino / Motors, Mechanics, and Power / Re: Using VO2223A phtotriac to control vibration pump on: July 03, 2013, 04:07:46 pm
I saw a fairly quick spike of about 40mA (with my DMM) when AC power was applied, but it quickly settled to 0mA.

Compared to the datasheet, I should be getting tens of nA of offstate leakage current.

Does this mean I should be getting a different type of opto?
11  Using Arduino / Motors, Mechanics, and Power / Re: Using VO2223A phtotriac to control vibration pump on: July 03, 2013, 12:20:56 pm
Sorry, I didn't explain myself very well.
The hot wire goes to pin 6, pin 8 goes to pump. Neutral of pump stays connected to pump. So I am switching the hot wire smiley

Edit: I have also tried hot wire goes to pin 8, pin 6 goes to pump.
In both cases the pump hums when AC power is applied, even when the mcu is powered off.
12  Using Arduino / Motors, Mechanics, and Power / Re: Using VO2223A phtotriac to control vibration pump on: July 03, 2013, 11:19:16 am
Thanks for your reply Grumpy Mike  smiley

When I connect the pump across pins 6 and 8 (ignoring the gate) and apply power to the AC side, the pump begins to hum. When the microcontroller attempts to drive the pump, nothing happens (except for the hum).
I have tried connecting the pump across pins 5 and 8 as well (as my knowledge of triacs is currently very limited) with the same results.

What would be causing the humming when the optotriac is not being driven by the microcontroller?  smiley-confuse

I have tested the microcontroller PWM output on a LED and can confirm that it is working as expected.
13  Using Arduino / Motors, Mechanics, and Power / Using VO2223A phtotriac to control vibration pump on: July 03, 2013, 01:26:01 am
Hi everyone,
I want to use PWM to control a vibration pump. I read on an old thread that someone had done something like this using phototriacs to change the phase angle, but I did not want to revive a dead thread. I understand that a phototriac (non-zero crossing) will enable the

I obtained some VO2223A phototriacs, but I'm not sure how to connect the AC side as the vibration pump has only 2 terminals and the phototriac AC side has 3 pins. Unfortunately Im not very familiar with triacs. I had assumed they would work in a similar way to a DC optocoupler, however I don't know what to do with the extra output pin.
Here is the datasheet - http://www.vishay.com/docs/81166/vo2223.pdf

The phototriac can switch 0.9A, which is more than enough for the 40W pump pulling 330mA at 120V.

My research has led me to believe I may need to use some sort of snubbing circuit, but am unsure how to proceed.

Any advice is most welcome, many thanks in advance!  smiley
14  Using Arduino / Programming Questions / Re: While loops within larger program question on: June 30, 2013, 06:43:25 pm
Thanks Grumpy Mike, that was exactly what I needed!
15  Using Arduino / Programming Questions / While loops within larger program question on: June 30, 2013, 04:46:49 pm
I have a Arduino PID temp controller controlling the boiler temp of my home espresso machine, now I want to add pump pressure control.

I have written a working mockup sketch using PWM to control the brightness of a LED (in place of a phototriac that would be controlling the pump), which works well, however I have implemented it using While loops, which if I were to add it to the PID sketch, would stop the Arduino from continuing PID temperature control while the LED/pump is being controlled , which in turn would cause temperature control problems.

Is there a way to control the LED/pump without using a While loop, so that the PID control part can also do its thing?

My LED/pump code is below
Code:

int ledPin = 9;    //   LED/pump connected to digital pin 9
int buttonPin = 10;    // active HIGH button on Pin 10
int buttonPinState;     //variable for storing state of button
unsigned long time;   // variable for measuring elapsed time since button press

void setup()  {
  Serial.begin(9600);
  pinMode (ledPin, OUTPUT);    // set LED/pump as output
  pinMode (buttonPin, INPUT);    // set button as input
 
}

void loop()  {
  buttonPinState = digitalRead(buttonPin);    // read button state
  if (buttonPinState == HIGH)  {            // if it is being pressed
    Serial.print("Button pressed");
    time = millis();                        // begin counting
  while ((millis() - time) <= 3000)  {      //from 0 sec to 3 sec
    analogWrite (ledPin, 76);              // run LED/pump at 30%
    Serial.println("30%");
  }
  while (((millis() - time) > 3000) && ((millis() - time) <= 5000))  {    //from 3 sec to 5 sec
    analogWrite (ledPin, 152);    // run LED/pump at 60%
    Serial.println("60%");
  }
  while  (((millis() - time) > 5000) && ((millis() - time) < 30000))  {    // from 5 sec to 30 sec
    analogWrite (ledPin, 255);          // run LED/pump at 100% 
    Serial.println("100%");
  } 
  while  ((millis() - time) >= 30000)  {    //after 30 sec
    digitalWrite (ledPin, LOW);      // turn LED/pump off
    Serial.println("0%");
   break;                            // break out of this loop, otherwise it will be stuck here forever
  }
 
  }else if (buttonPinState == LOW)  {      // if button not pressed
    digitalWrite (ledPin, LOW);            // turn LED/pump off
    Serial.println("Waiting for button Press");
 
 
  }
}

Pages: [1] 2 3 ... 5