Show Posts
Pages: [1] 2
1  Using Arduino / Programming Questions / Re: Loop problem on: June 12, 2012, 05:53:47 pm
You are AWESOME, I love this forum!
2  Using Arduino / Programming Questions / Loop problem on: June 12, 2012, 12:32:52 pm
Hi, I need to control a electrostatic deflector that has a TTL input. I need to send a some number of pulses and the rest of the time the signal must be in HIGH. I want to decide when are going to start my pulses pushing a button, the code is pretty easy but I dont understand why it doesn't made the number of pulses of I write in the for sentence, always send more. The idea is: press the button "play" the pulses and keep in high until the button is pressed again.
Thanks
Code:

void loop(){
   buttonState = digitalRead(buttonPin);
 
    if (buttonState == HIGH) {    
        for (int i=0; i <= numberOfPulses; i++){
        // set the LED on
      delay(10);              
      digitalWrite(13, LOW);  
      delay(10);
      digitalWrite(13, HIGH);
         }
        }
  else {
       digitalWrite(ledPin, HIGH);
   delay(100);
  }
}
 
3  Topics / Science and Measurement / Sortest pulse on: June 12, 2012, 10:00:58 am
Hi, I have an arduino nano with a ATmega328 and I can't make pulses shorter than 11microseconds. I'm using a 100MHz probe with a 250 bandwith oscilloscope. I have used the function delayMicrosecond but it doesn't works fine for periods shorter than 100microseconds, It seems "bad calibrated" the time that I measure it's not a linear function of the time that I put in the software. Using the __asm__("nop\n\t") I can't get pulses shorter than 11microseconds. I'm using the blink example in different pins but the same problem.

Thanks
4  International / Software / Re: Escribir Binario fácil on: May 24, 2012, 06:46:53 am
GRACIAS A TODOS, Jorge me has solucionado la vida! (en argentino sería "me solucionaste")

Saludos
5  International / Software / Re: Escribir Binario fácil on: May 23, 2012, 04:09:39 pm
Si busco eso no me doy cuenta como usarlo.

Habia pensado guardar la lectura del serial en un entero llamado numero, y despues la salida del bit menos significativo sera Bitread(numero,0)
Entonces deberia poder escribir algo como digitalWrite(pin del menos significativo, Bitread(numero,0)) no se si interpreta HIGH como 1, pero se debe poder hacer algo asi.

Escucho ofertas
6  International / Software / Re: Escribir Binario fácil on: May 23, 2012, 02:01:35 pm
Dicho de otra forma mas quiero un traductor a binario, con entrada por serial y salida digital.
7  International / Software / Re: Escribir Binario fácil on: May 23, 2012, 01:59:49 pm
osea lo digo de nuevo si escribo 1 quiero tener LOW LOW LOW.... HIGH si escribo en el serial 2 a la N -1 quiero HIGH HIGH HIGH.... HIGH, para cualquier numero entero en el rango
8  International / Software / Re: Escribir Binario fácil on: May 23, 2012, 01:56:54 pm
No, no. Quizas no me exprese bien, yo quiero escribir cualquier numero entre 0 y (2 a la N)-1, en binarios con N igual al numero de bits q tenga. Por eso decia de pasarlo a binario. Quizas hay algun metodo para escribir un numero cualquiera en binario sin hacer las divisiones.
9  International / Software / Escribir Binario fácil on: May 23, 2012, 12:57:18 pm
Hola, necesito para controlar una fuente de corriente digital. Para eso quiero escribir un número via serial y que un arduino mega me lo escriba digitalmente: ejemplo si el serial dice 1 quiero que mi salida en 10 puertos digitales sea LOW LOW LOW....HIGH, si dice 2 LOW LOW..... HIGH LOW y así para cualquier número. ¿Hay alguna forma de hacer esto sin escribir las tediosas divisones necesarias para pasar un número a binario? Leí http://www.arduino.cc/playground/Code/BitMath pero no me quedó del todo claro qué código usar.


Gracias
10  Using Arduino / Sensors / PING distance sensors prices on: May 21, 2012, 02:59:20 pm
Hi, I have a short question,  I saw on Ebay a lot of distance sensors that look very similar but can cost from 2 to 12 uss, what is the difference??
11  Using Arduino / General Electronics / Re: PWM on a high power led on: May 13, 2012, 01:35:19 pm
You can use a MOSFET or a transistor -- they're much faster than relays. Here is one circuit idea using a transistor:

http://ruggedcircuits.com/html/circuit__19.html

and another using a MOSFET:

http://ruggedcircuits.com/html/circuit__11.html

The details will differ depending upon your circuit (15V, 700mA) but the overall configuration shows you what to expect.

--
Thank you so much, I've found that site http://www.electronics-tutorials.ws/transistor/tran_7.html that shows the same that you says. I think I need a P channel mosfet if I want to place my led between something and ground, so I will use the NDP6020P I hope I found it in Argentina.

Thanks 
The Rugged Audio Shield: Line In, Mic In, Headphone Out, microSD socket, potentiometer, play/record WAV files

12  Using Arduino / General Electronics / PWM on a high power led on: May 13, 2012, 01:02:44 pm
Hi, I have a high power led (3W) that already has a constant current power supply(700mA). I've tested that power supply and it's fast, it can be turned on and off in some miliseconds, and it works with any voltage from 4 to 15V. How can I drive it with a digital PWM signal? I need something like a relay but faster. 

Thanks and sorry for my English
13  Topics / Science and Measurement / Re: Digital input frecuency?? on: February 10, 2012, 06:39:53 pm
Take a look at the pulseIn() function also, may do what you need already.
YEEEEAHHHH, Thank's CrossRoads   smiley
14  Topics / Science and Measurement / Digital input frecuency?? on: February 10, 2012, 02:45:22 pm
Hi, my name is Nahuel and I want to make a proyect. I have digital pulses of 50microsec of duration that came from a detector. It's not regular pulses, the only thing that I know is that the signal will be in high for 50micosec but could be 100 pulses in 1s or 3 pulses in 1s. I wan't to make a counter that say's the number of pulses in one second. I don't know how fast is the digital read, how many samples it takes?

Thanks and sorry for my English
15  Using Arduino / Networking, Protocols, and Devices / Bluetooth issues on: December 21, 2011, 11:21:26 pm
Hi, I bought an bluetooth module from dealextreme http://www.dealextreme.com/p/wireless-bluetooth-rs232-ttl-transceiver-module-80711
I conected the voltage divisor to transform the 5V signal to 3.3 in the input of the bluetooth. It seems to work at the begining, when i wrote AT it responds OK, but 5 minutes later it stops. I try to reset de module but nothing happens, I tried to use another bluetooth but the problem is the same. How can I check if the arduino is sending a serial signal?
Suggestions?
PD: There's no good english teachers in my country, I'm sorry

Thanks for reading
Pages: [1] 2