Loading...
  Show Posts
Pages: [1] 2 3 ... 6
1  Using Arduino / General Electronics / Re: Lipo Rider Pro - Bridge Rectifier Generator.. on: February 25, 2013, 08:47:40 am
Could I just use one of these voltage regulator in line with my dynamo and lipo rider, or I would need to build a small circuit?
I am not too sure...

thanks!
2  Using Arduino / General Electronics / Lipo Rider Pro - Bridge Rectifier Generator.. on: February 21, 2013, 08:26:28 am
I am trying to connect a Lipo Rider Pro (which will power my arduino) to a dynamo/generator. To do this I am using an old wind up torch.. the AC generator goes into a bridge rectifier (http://www.diodes.com/_files/products_inactive_data/ds21211_R5.pdf) which converts the power to DC but it gives a bit too much for what the Lipo can handle. I am measuring around 8 volts at full speed, and the Lipo can only get MAX 6.5..

I know this a nooooob question: what could I use to limit the current to the Lipo's range? 4.5 to 6.5, optimal 5v 500mA

https://digitalmeans.co.uk/shop/seeedstudio-lipo_rider_pro?keyword=no-ajax-mode

http://www.seeedstudio.com/wiki/index.php?title=Lipo_Rider_Pro#Specification

Thanks!
3  Using Arduino / General Electronics / Re: Wind Up Arduino, dynamo generators.. on: February 18, 2013, 11:59:07 am
hi lefty, thanks a lot for your answer.

I don't know much about voltage regulators, could you maybe advise on which one should I try? Should it be 5volts or 9 volts? and how many Amps? mmmh really not sure.

The dynamo I would try to use is a really small one i savaged from a wind up radio. I could maybe try and use the circuit and the battery that came with it but I am not sure that could work.. on the battery it saus: Ni-MH Cell 2.4volts 300mAh

What do you think?
Has anybody else tried this before?

Thanks!
4  Using Arduino / General Electronics / Wind Up Arduino, dynamo generators.. on: February 18, 2013, 09:13:49 am
Can you power an arduino with a dynamo? Something like a wind up torch?

Thanks for any help!
5  Using Arduino / Project Guidance / Re: Wifi/bluetooth sound help (DIY AirPlay?) on: February 16, 2013, 07:34:01 am
Someone has used a Raspberry to to this.. but it's a little bit messy though. Still cheaper then buying the Apple airport, but you need a raspberry + a usb wifimodule + a usb soundcard. http://lifehacker.com/5978594/turn-a-raspberry-pi-into-an-airplay-receiver-for-streaming-music-in-your-living-room

Is there anything that contains all these together?
6  Using Arduino / Project Guidance / Wifi/bluetooth sound help (DIY AirPlay?) on: February 16, 2013, 07:27:03 am
Hey,

as part of a project i am developing I am trying to find the best way to fit wireless sound transmission in an object. What I am looking for is something similar to the many speakers that use the AirPlay protocol, so that people can use their apple devices to play music wirelessly.

Has anybody made their own diy airplay system? I am sure that 79£ for an airport express is definitively much more expensive than what the technology actually costs, right?

thanks
7  Using Arduino / Programming Questions / Re: Boolean and millis: doing it wrong? on: December 18, 2012, 09:23:37 pm
Just introduced your bit...

Code:
//Milano 0.1

int buttonPin = 4;
int ledPin = 9;
int fanPin = 10;
boolean lastButton = LOW;
boolean currentButton = LOW;
int ledpwmLevel = 0;
int lastLEDtime = 0;
boolean fanOn = false;

void setup()
{
  pinMode(buttonPin, INPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(fanPin, OUTPUT);
  Serial.begin(9600);
}

boolean debounce(boolean last)
{
  boolean current = digitalRead(buttonPin);
  if (last != current)
  {
    delay(5);
    current = digitalRead(buttonPin);
  }
  return current;
}

void loop()
{
  currentButton = debounce(lastButton);
  if (lastButton == LOW && currentButton == HIGH)
  {
     fanOn = true;
    analogWrite(fanPin, 255);
    Serial.println("FANISON");
   
   
    ledpwmLevel = ledpwmLevel + 85;
    Serial.println("BUTTON");
  }
 
  if (ledpwmLevel > 255)
  {
    ledpwmLevel = 0;
    lastLEDtime = millis();
  }
  analogWrite(ledPin, ledpwmLevel);



if (ledpwmLevel  == 0 && fanOn && millis() - lastLEDtime > 5000)

//if (fanOn && ((millis() - lastLEDtime) > 5000))


{
  fanOn = false;
  analogWrite(fanPin, 0);
      Serial.println("FANISOFF");

}
 
  lastButton = currentButton;


}
8  Using Arduino / Programming Questions / Re: Boolean and millis: doing it wrong? on: December 18, 2012, 06:46:22 pm
Hi Peter,

Thanks for your suggestion, pretty good indeed!
Now, the fan stays on all the time which is amazing. But I leave the light on one of the pwm steps for more then 5 seconds then the fan will not go on when the leds go of.. does that make any sense?
9  Using Arduino / Programming Questions / Re: Boolean and millis: doing it wrong? on: December 18, 2012, 06:24:47 pm
That would be perfect.. but how do you do it? Did you do anything similar before?
Checking the 5 seconds thing...  smiley-red and how would you turn the fan on then if you remove the fanOn variable then?
10  Using Arduino / Programming Questions / Boolean and millis: doing it wrong? on: December 18, 2012, 05:43:54 pm
Hi there,

I am still trying to figure out the best way to do this: I have some led (pin9) being dimmed by a button (pin4) and a cooling fan(pin 10) which needs to be on when the leds are on, and also to STAY on for some seconds when the leds are switched off.
I am using boolean debounce and millis, but for some odd reason this only works the first time that I run it on the arduino, if I press the button again the fan doesn't switch on until the leds are off.. pretty confusing. Stupid mistake?

Code:
//Milano 0.1

int buttonPin = 4;
int ledPin = 9;
int fanPin = 10;
boolean lastButton = LOW;
boolean currentButton = LOW;
int ledpwmLevel = 0;
int lastLEDtime = 0;
boolean fanOn = false;

void setup()
{
  pinMode(buttonPin, INPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(fanPin, OUTPUT);
  Serial.begin(9600);
}

boolean debounce(boolean last)
{
  boolean current = digitalRead(buttonPin);
  if (last != current)
  {
    delay(5);
    current = digitalRead(buttonPin);
  }
  return current;
}

void loop()
{
  currentButton = debounce(lastButton);
  if (lastButton == LOW && currentButton == HIGH)
  {
    fanOn = true;
    analogWrite(fanPin, 255);
    ledpwmLevel = ledpwmLevel + 85;
    Serial.println("BUTTON");
  }
  
  if (ledpwmLevel > 255)
  {
    ledpwmLevel = 0;
    lastLEDtime = millis();
  }
  analogWrite(ledPin, ledpwmLevel);


if (fanOn && millis() - lastLEDtime > 5000)

{
  fanOn = false;
  analogWrite(fanPin, 0);
}
  
  lastButton = currentButton;


}
11  Using Arduino / Programming Questions / Re: PWM dimming + Fan output on: December 17, 2012, 09:03:00 pm
hey thanks dude.
i am gonna test it in a second, but just by clicking on the "play" button.. there seems to be some issue with the debounced thing you introduced. How does that work? the end bit seems great though! thanks a lot
12  Using Arduino / Programming Questions / PWM dimming + Fan output on: December 17, 2012, 06:25:49 pm
Hi everyone,

I am making a sketch to control a lamp with leds and a cooling fan. Until now I have been using this sketch below, where booleans let me divide the pwm numbers into different parts.. When the button is pressed the light gets brighter, a bit like those ikea touch lamps.
Now, I need another pin to connect a fan (i am using pin 10 at the moment) to the circuit. This fan should be on when the leds are on but should also stay on for some seconds when the leds will be switched off.. just to cool down the lamp.
I have tried using millis, but didn't get really far. Maybe is the case to change my previous bit of code too? Maybe I should use different cases to dim the leds instead?
I know it's very simple, but would be good to head someones help asap!



//

int buttonPin = 4;
int ledPin = 9;
int fanPin = 10;
boolean lastButton = LOW;
boolean currentButton = LOW;
int ledpwmLevel = 0;
int fanpwmLevel = 0;

void setup()
{
  pinMode(buttonPin, INPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(fanPin, OUTPUT);
  Serial.begin(9600);
}

boolean debounce(boolean last)
{
  boolean current = digitalRead(buttonPin);
  if (last != current)
  {
    delay(5);
    current = digitalRead(buttonPin);
  }
  return current;
}

void loop()
{
  currentButton = debounce(lastButton);
  if (lastButton == LOW && currentButton == HIGH)
  {
    ledpwmLevel = ledpwmLevel + 85;
    Serial.println("BUTTON");
  }
  lastButton = currentButton;

  if (ledpwmLevel > 255) ledpwmLevel = 0;
  fanpwmLevel =
  analogWrite(ledPin, ledpwmLevel);

}
13  Using Arduino / Programming Questions / Re: Music Shield and Proximity Control: coding issues? on: June 12, 2012, 12:21:12 pm
Ok, big update. Using the Play() function as it was would have not allow me to just play a file, as that function never returns. I have written a new one (JPlay) and now it works much better. I can now get the patch to run as many times as I want... everytime the distance sensor goes over the threshold the file play for all it's length.

Now, would be good to write something to avoid the file to play twice if the person remains in front of the sensor. Is this clear enough? or should I try explain it differently?

first attempt which doesn't work (it plays the file when something is close to the sensor, but it will play it twice if the sensor is still covered)


#include <avr/io.h>
#include "config.h"
#include "filesys.h"
#include "player.h"
#include "vs10xx.h"
#include "record.h"
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); //pin2-Rx,pin3-Tx(note: pin3 is actually later used as volume down input)

const int analogPin = A5;
const int ledPin = 0;
const int threshold = 300;

int sensor = A5;

void setup()
{
  Serial.begin(9600);
  InitSPI();
  InitIOForVs10xx();
  InitIOForKeys();
  InitIOForLEDs();
  InitFileSystem();
  Mp3Reset();
}

void loop() {


  //Serial.println("loop");   
  Serial.println(analogRead(analogPin));
  int pippo = 1;

  while (analogRead(analogPin) > threshold) {
    Serial.println("paperino");
    if (pippo = 1) {
      JPlay();
      pippo = 0;
    }

  }
}


14  Using Arduino / Programming Questions / Re: Music Shield and Proximity Control: coding issues? on: June 12, 2012, 10:12:13 am
All the digital Pins are in use by the the board, so I am not checking the state with an Led.. which anyhow was pointless. I haven't made any change.
15  Using Arduino / Programming Questions / Re: Music Shield and Proximity Control: coding issues? on: June 11, 2012, 08:50:05 am
Yes that's make sense. That's also why the Music Shield is not using them I guess..
My problem is still there though. Anyone?

This seems to be the function I have to use, but I am not really sure how to read this reference..
http://code.google.com/p/musicshield/source/browse/branches/arduino+code/music/player.cpp

void Play()
{
  playingState = PS_NEXT_SONG;

  currentFile = 1;

 
  //cyclely play
  while(1)
  {

         //CheckPlay();
         //CheckKey();
         AvailableProcessorTime();
         
         if(1 ==playStop)
         {
                if(OpenFile(currentFile))
                {       
                        //if open failed, then try it again
                        if(OpenFile(currentFile))
                        {
                                playStop = 0;
                                playingState = PS_NEXT_SONG;
                                currentFile = 1;
                                continue;
                        }
                }
               
                PlayCurrentFile();
                if (playingState == PS_PREVIOUS_SONG) currentFile--;
            if (playingState == PS_NEXT_SONG) currentFile++;
        if (currentFile==0) currentFile = 1;
        //if (playingState == PS_END_OF_SONG) playingState = PS_NORMAL;
                Mp3SoftReset();
         }
  }
}


Pages: [1] 2 3 ... 6