Loading...
  Show Posts
Pages: 1 2 [3] 4 5 ... 11
31  Using Arduino / Interfacing w/ Software on the Computer / Cosm and MIT's app inventor on: March 06, 2013, 12:47:38 pm
Hi,
I am trying to use Cosm with apps created using MIT's app inventor (basically enabling web for this -> http://arduino.cc/forum/index.php/topic,148853.0.html)

I do receive data - ie GET requests work fine, but I can't work out how to PUT data. The problem is that MIT's app inventor only allows to methods - get or post

I tried adding '&?_method=post' to the URL but that doesn't work - I get a 403


Oh and since I can actually GET data from Cosm one way communication is possible - if you want to I might as well post an example app
32  Using Arduino / Motors, Mechanics, and Power / Long range PTZ turret on: March 03, 2013, 07:32:02 pm
What would give better accuracy for a long range pan tilt turret (accuracy in mRadians) ?

A)this geared step motor 28BYJ-48 – 5V ( http://robocraft.ru/files/datasheet/28BYJ-48.pdf )
or
B)a geared DC motor like SG-27 6V DC ( http://www.sgmada.com/zl/pdf/SG27125000.pdf )

I would prefer to use just one belt drive transmission for simplicity sake. Ohh and before you ask - controlling either of them isn't a problem for me. Also I am aware that I'd have to add position sensing. I don't plan to mount more than 1 or 2 kg on it

Personally, I find the step motor better as it should (at least theoretically) be more predictable - whereas the RPM of the DC motor would be rather unpredictable - geared motors require more current when they start up, don't they? That would probably make things a little bit more complicated as current to RPM would be as predictable as I'd like to.

Has anyone of you got experience with similar systems or know how commercial products are built?
33  Using Arduino / Sensors / Re: IR receiver based distance sensor on: March 02, 2013, 03:36:30 am
Thx that was really helpful
34  Using Arduino / Sensors / Re: IR receiver based distance sensor on: March 01, 2013, 08:31:14 am
thx but I already have an HC-SR4. I know there are IR based proximity sensors but they have limited range and are very expensive. I have experimented with IR before and I know the range is much greater - it would be cool if I could come up with a cheap IR sensor.
35  Using Arduino / Sensors / Re: IR receiver based distance sensor on: February 28, 2013, 06:21:51 pm
Turns out a couple of turns of sticky tape isn't enough to block IR beam. Replaced with something more substantial and it kind of works  smiley-roll-sweat

I say kind of as it senses objects but not very consistently. I am sure it's not only because some objects reflect IR better than others - it's more complex...


When object is sensed let's say 60 cm from the sensor the sensor keeps sensing it even when I move it 100 cm away from it. But if I move any further and the sensor stop receiving the beam I have to move the object back to 60cm distance from the sensor for it to start sensing it again

It seems the IR receiver circuitry kind of adapts or something... I guess that's caused by the circuitry inside the IR receiver. The code I use doesn't work properly - don't know why... 38khz frequency suggests 26us period, right ? Well I thought I had it wrong (since it was 26us ON and 26us OFF) that but I changed it to 13us ON and 13us OFF and the result is the same.

If I use the IRlibrary to generate 38khz frequency on the LED the range drops to like 30 cm max but it is consistent

What's even better - I get about 3-4 meter sensing range if I use a remote control as the IR source

So uhmm now I am kind of lost  smiley
36  Community / Exhibition / Gallery / Re: Using android mobile to control arduino on: February 28, 2013, 05:49:51 pm
Oh sorry I forgot to post wiring diagrams here. Now it should be a lot easier to understand.




If you can't see the pics just go here -> http://www.instructables.com/id/How-control-arduino-board-using-an-android-phone-a/

37  Using Arduino / Networking, Protocols, and Devices / Re: Bluetooth connection between Android and Arduino on: February 27, 2013, 04:16:03 pm
You have to configure the bluetooth module - IIRC you have to use AT commands to get the MAC addresses of both the slave module and master module - then use command 'ATD=macaddress' on both of them, then set the slave module into undiscoverable mode ('ATH0')

other master devices shouldn't be able to discover the slave... the master should automatically connect with the slave and slave should accept the connection


That's how it works on the module I use (btm222) check the datasheet of yours just to be sure

here is the datasheet of btm222 with AT commands -> http://atnel.pl/download/elektronika/atb_btm_222/btm222_datasheet.pdf
38  Using Arduino / Sensors / IR receiver based distance sensor on: February 27, 2013, 03:49:09 pm
I used both IR receivers, IR LEDs and the library to send and receive - so I am kind of familiar with the concept... The thing is that I am trying to convert them into proximity sensors

The idea is simple - you flash the IR LED and if the beam bounces back it is picked up by the IR receiver (tsop1738).

I generate the required frequency using delayMicroseconds and I vary the power using PWM - the idea is that the IR LED continually loops from 0 power to full power and thx to that I can tell how far the object is.

The problem is that I am experiencing a strange phenomena - the receiver almost constantly picks up the beam - I wrapped the IR LED with a couple of layers of sticky tap - that didn't help much. it only works properly at the lowest possible setting (PWM value set at as low as 5) but then the range is as low as 50 cm or so

Does the IR really propagate that well? Even through a couple of layers of sticky tape ? Or maybe sending the impulses interferes somehow with the receiver ?
ohh and before you ask I do know that the receiver output is normally HIGH - and the indicator LED (the one on arduino board) isn't always on - it flashes (check the code)
Code:
const int IR = 4;     // the number of the IR receiver pin
const int ledPin =  13;      // the number of the LED pin (blinks when object detected)

// variables will change:
int IRstate = 0;         // variable for reading the IR status


void setup() {Serial.begin(9600);
  // initialize the LED and IR LED pin as an output:
  pinMode(ledPin, OUTPUT); 
pinMode(6, OUTPUT);   
  // initialize the IR receiver pin as an input:
  pinMode(IR, INPUT);

}

void loop(){
  // read the state of the pushbutton value:
    for (int i=0; i <= 5; i++){
    delayMicroseconds (26);analogWrite(6,i);
    delayMicroseconds (26);analogWrite(6,0);
   
   

 

 
  if (digitalRead(IR) == LOW) {     
    // turn LED on:   
    digitalWrite(ledPin, HIGH);delayMicroseconds (3);break;
 
  }
  else {
    // turn LED off:
    digitalWrite(ledPin, LOW);
  }
}}
39  Community / Exhibition / Gallery / Re: Using android mobile to control arduino on: February 26, 2013, 08:27:17 am
it works but only if serial data is received as often as it's sent... so your arduino code should send the data every 1 second
40  Using Arduino / Networking, Protocols, and Devices / Re: Bluetooth connection between Android and Arduino on: February 25, 2013, 05:32:57 pm
have you tried connecting with the arduino board from the computer via bluetooth to establish if the code is ok ?? Just use serial monitor - choose the right COM port and baud rate
that's the first thing you should do - if it works then there is something wrong with the android side of the project

have you got a datasheet of the BT module ?? I can't find it anywhere. My module doesn't require sending AT commands every time

ohh and I am affraid I can't help you as far as java is concerned - sorry

41  Community / Exhibition / Gallery / Re: Imperial March on a fast switching valve on: February 25, 2013, 11:12:24 am
actually I thought about using butane  smiley-mr-green
42  Community / Exhibition / Gallery / Re: Imperial March on a fast switching valve on: February 25, 2013, 09:54:12 am
Yeah I've seen a video of a pneumatic sorting machine that used computer vision and air nozzles to blew off defective products from the conveyor belt - very very impressive

43  Community / Exhibition / Gallery / Imperial March on a fast switching valve on: February 25, 2013, 09:08:42 am
I thought that there have been dozens or Imperial marches played by floppy drives or step motors so I might as well do something new...

The video >>
http://youtu.be/VSOXKtjtdbs


Here is that valve I used

It's a fast switching valve - namely Festo MHE3-MS1H-3/2G-QS-6.
Its switch on time is 2.3 ms and it switches off in 2.8ms - very very impressive piece of hardware and they are pretty pricey - luckily I got it for next to nothing.

The circuit is very simple - just a ULN2004A as a driver for the valve.

and here's the code (it's a slightly modified version of a sketch created by Carlton Shepherd)

 
Code:

    const int c = 261;
    const int d = 294;
    const int e = 329;
    const int f = 349;
    const int g = 391;
    const int gS = 415;
    const int a = 440;
    const int aS = 455;
    const int b = 466;
    const int cH = 523;
    const int cSH = 554;
    const int dH = 587;
    const int dSH = 622;
    const int eH = 659;
    const int fH = 698;
    const int fSH = 740;
    const int gH = 784;
    const int gSH = 830;
    const int aH = 880;
     
    const int buzzerPin = 12;
 
     
    int counter = 0;
     
    void setup()
    {
      //Setup pin modes
      pinMode(buzzerPin, OUTPUT);
      pinMode(ledPin1, OUTPUT);
      pinMode(ledPin2, OUTPUT);
    }
     
    void loop()
    {
     
      //Play first section
      firstSection();
     
      //Play second section
      secondSection();
     
      //Variant 1
      beep(f, 250); 
      beep(gS, 500); 
      beep(f, 350); 
      beep(a, 125);
      beep(cH, 500);
      beep(a, 375); 
      beep(cH, 125);
      beep(eH, 650);
     
      delay(500);
     
      //Repeat second section
      secondSection();
     
      //Variant 2
      beep(f, 250); 
      beep(gS, 500); 
      beep(f, 375); 
      beep(cH, 125);
      beep(a, 500); 
      beep(f, 375); 
      beep(cH, 125);
      beep(a, 650); 
     
      delay(650);
    }
     
    void beep(int note, int duration)
    {
      //Play tone on the valve
      tone(buzzerPin, note /4, duration);
     
   
     
      //Stop tone on buzzerPin
      noTone(buzzerPin);
     
      delay(50);
     
      //Increment counter
      counter++;
    }
     
    void firstSection()
    {
      beep(a, 500);
      beep(a, 500);   
      beep(a, 500);
      beep(f, 350);
      beep(cH, 150); 
      beep(a, 500);
      beep(f, 350);
      beep(cH, 150);
      beep(a, 650);
     
      delay(500);
     
      beep(eH, 500);
      beep(eH, 500);
      beep(eH, 500); 
      beep(fH, 350);
      beep(cH, 150);
      beep(gS, 500);
      beep(f, 350);
      beep(cH, 150);
      beep(a, 650);
     
      delay(500);
    }
     
    void secondSection()
    {
      beep(aH, 500);
      beep(a, 300);
      beep(a, 150);
      beep(aH, 500);
      beep(gSH, 325);
      beep(gH, 175);
      beep(fSH, 125);
      beep(fH, 125);   
      beep(fSH, 250);
     
      delay(325);
     
      beep(aS, 250);
      beep(dSH, 500);
      beep(dH, 325); 
      beep(cSH, 175); 
      beep(cH, 125); 
      beep(b, 125); 
      beep(cH, 250); 
     
      delay(350);
    }
44  Using Arduino / Networking, Protocols, and Devices / Re: Bluetooth connection between Android and Arduino on: February 18, 2013, 05:49:09 pm
There are so many things that can go wrong here. You might have connected the module in the wrong way, the baud rate might be wrong etc.

Could you post the both the arduino code and the android app?
45  Community / Exhibition / Gallery / Re: Using android mobile to control arduino on: February 18, 2013, 01:48:31 pm
it's a BTM222 module on a custom breakout board - kind of cool because it is a class 1 device - so the max range is not 10m but 100m  smiley-grin
I bought it from a local tinkerer who makes them - so I don't think you'd be able to get it

Though there are lots of such boards all over ebay - though most of them are class 2 (range ~10meter)



Pages: 1 2 [3] 4 5 ... 11