Sensor ultrasonico HC-SR04

Buenas noches a todos, alguien me podría ayudar, quiero conectar un sensor ultrasonico HC-SR04 a un arduino mega 2560 y poder visualizar la distancia que envíe en labview, ya tengo la interfaz para arduino y labview, solo que no he encontrado la manera de hacerlo.
Intenté con la información del siguiente link pero no me funcionó http://forums.ni.com/ni/attachments/ni/6170/26671/1/HC-SR4ultrasonicsensor.pdf 
Espero me puedan ayudar con el VI

Saludos Fer_Ruiz,
Gracias por utilizar los Foros de Discusión de National Instruments, el siguiente link de la comunidad trata sobre una consulta similar, básicamente lo que hicieron fue agregar la librería del sensor ultrasónico y agregar un caso para llamar la función para medir la distancia. En este caso modificaron el PDE para el Arduino Uno, sin embargo creo que podrías adaptarlo fácilmente al PDE de tu Arduino Mega2560.
Community: !! Arduino Uno + HC-SR04 Ultrasonic sensor + LabVIEW Help!!:
https://decibel.ni.com/content/thread/12971
Quedo al pendiente, saludos.
David P.
National Instruments
Applications Engineer
www.ni.com/soporte

Similar Messages

  • Sensor ultrasonico

    quisiera saber  como se puede utilizar un sensor ultrasonico  con labview.. alguien me podria alludar porfabor 
    me podrian pasar un VI de algun ejemplo.
    se los agradeceria muchisimo

    Hola ds83266.
    Te refieres a un micrófono tipo electret? Este tipo de dispositivos regresan una onda de voltaje que varía en amplitud, mientras que el ejemplo anterior era para leer acelerómetros que lo que varían es la frecuencia y el ciclo de trabajo de una onda.
    Te dejo algunos ejemplos que te podrían ser de utilidad:
    https://decibel.ni.com/content/docs/DOC-16987
    https://decibel.ni.com/content/docs/DOC-10282
    Así como un documento que te podría servir como referencia:
    http://www.ni.com/white-paper/7059/en
    Si quieres ejemplos más sencillos, te recomiendo revisar el buscador de ejemplos de LabVIEW (Help>> Find Examples>>Hardware Input and Output>>Daqmx) para ejemplos relacionados con sonido o aceleración.
    PD: Te recomiendo en un futuro que cuando tengas una pregunta nueva la hagas en un tema nuevo (aunque pongas este como referencia), de esa forma es más fácil que otras personas encuentren la pregunta y respondan más rápidamente.
    Aldo H
    Ingenieria de Aplicaciones

  • The interaction of the people with the computer

    I Am student of ingenieria electronica . i am of last year.
    i am student of university Catolica de colombia.
    i like to receive information about this subject.
    I am developing a project that it has to do with the surroundings of bioingenieria. I want to obtain data of the people who have problems of cuadraplegia or fisicas limitations, that interactuen with the computer like a transmitting ultrasonico sensor in the part later of the head with a panel of nine receiving sensors parallel to the trasmisor sensor to simulate the movements of mouse in the screen and with the pulse of the captured one and extended the signal to open and to close the icons that esten in the computer.
    the Problem to solve.
    With mouse it manages to watch as they are the plots that one sends when it sends the information of the sensors or like the simulation of the movement of mouse. the problem is that I want to know how when one connects mouse to the computer as it is the plot of recognition between the computer and mouse, for asi to generate the movement. depending on the signals sent by the sensors. Knowing clearly that I must follow to standar of the plotted one of bit that sends mouse to the computer.
    Thanks for its immense attention and collaboration about the subject.
    Soy estudiante de ingenieria electronica. soy de ultimo año de la universidad Catolica de Colombia. tengo gusto de recibir la información sobre este tema.
    Estoy desarrollando un proyecto que tiene que ver con el entorno de la bioingenieria.
    yo quiero obtener informacion de las personas que tengan problemas de cuadraplegia ó limitaciones fisicas, que interactuen con el computador como un sensor ultrasonico transmisor en la parte posterior de la cabeza con un panel de nueve sensores receptores paralelo al sensor trasmisor para simular los movimientos del mouse en la pantalla y con el pulso del capturado y ampliada la señal abrir y cerrar los iconos que esten en el computador.
    el Problema a solucionar.
    Con el mouse logre mirar como son las tramas que uno remite cuando manda la informacion de los sensores ó como la simulacion del movimiento del mouse. el problema es que quiero saber cuando uno conecta el mouse al computador cual es la trama de reconocimiento entre el computador y el mouse, para asi generar el movimiento. dependiendo de las señales mandadas por los sensores. Teniendo claro que tengo que seguir un standar del tramado de bit que remite el mouse al computador.
    Gracia por su inmensa atencion y colaboracion acerca del tema.
    correo electronico
    [email protected]
    [email protected]
    [email protected]
    [email protected]
    2formato formulación I-2005.doc (59 kb)

    Buenos Dias,
    En primer lugar, me gustaria saber cuales son el hardware y software que tiene para hacer el proyecto.
    Saludos.
    Felipe Flores
    Engenharia de Aplicações
    National Instruments Brasil

  • Help in the programming of the Hc-sr04 ultrasonic sensor

    Hi im new in labview, i have to connect the HC-SR04 ultrasonic sensor to the SensorDAQ, and i have to measure the distance betwen the sensor and an objetc, i have done a little program but the distance is very erratic, and i have seen an example but i dont underestand all the code in the example, so i dont know how to change it to do what i need, later today i will put the to vi's, the one i did and the one i have found, my code is very short adn the code i found i terrible long.
    If my program is bad, can you tellme where adn why? or is not the code the sensor requieres please tell me.
    If the example i add the code i really need can you explain me all the parts, and how to change it in order to function with the sensordaq.
    Can you tell me how to wire the sensor to the sensor daq? i will add my connection diagram and photos so you can help me.
    I have to make a tank sensor with the data of this sensor, and control a stepper motor with it, if the level is less than 20% use the stepper to open a valve, is its gratter than 80% close the stepper.
    Other thing i need is when the level of the tank is gratter than 80% another mottor, non steper have to be turned on and must be running for a set time. when this set time is over a signal of "empty the tank" must be displayed.
    I think is a lot of help what i need, i have wired the stepper mottor(bipolar 4 wires motor)  and i make it run, i dont know how to make it run in either direction so I have to fix this.
    I'm going to add photos and my vis later today, please helpme, the most important thing is to make the sensor to work.
    THANKS FOR THE HELP.
    Solved!
    Go to Solution.

    Hi nmerzul.
    There are two ways to perform DAQ tasks. One is with the DAQ assistant (the one that you are using) and the low level steps (the one of the example). Basically they both work the same. The difference is that you can configure all the settings in one step with the DAQ Assistant and with the other method you can do it step by step. I modified the example with a lot of notes so you can understand the functionality of each step.
    Now, to help you with the wiring of the sensor and the DAQ, could you tell me what DAQ you are using? 
    Thanks
    Francisco S.
    National Instruments
    Field Engineer
    www.ni.com/soporte
    Attachments:
    distance sensor counter (notes).vi ‏89 KB

  • How i conect de sensor HC-SR04 in labview interface whit arduino?

    how i conect de sensor HC-SR04 in labview interface whit arduino?
    i have a proyects and i dont have idea in what about conect this sensor i labview :/

    Hello sacg94,
    Thanks for using NI’s forums! Additional to the information that Dennis provided I send you a small example of the NI Community that uses the sensor that you just mentioned. Please note that the example uses the Arduino toolkit for LabVIEW.
    Example: https://decibel.ni.com/content/thread/12971
    Toolkit: http://sine.ni.com/nips/cds/view/p/lang/en/nid/209835
    Hope this helps!
    Regards,
    Luis C.
    National Instruments México
    Ingeniería de Aplicaciones
    www.ni.com/soporte

  • Programming Ultrasonic sensor HC-SR04

    Hi
    I'm trying to calculate the distance. I'm using an NI USB-6008 card. It has only one counter. So I'm going to find the digital out and then create a counter (in program). How do I program using only one counter (of the ni 6008)? I need configuration help too.
    Please help.

    Hi kdm,
    again: read the specs of both devices, sensor and USB6008. Compare the specs to understand, what you can achieve with this combination - and what doesn't fit…
    - You can read TTL signals with an AI too. The AI has the advantage of hardware-timed operation with a max sample rate of 10kS/s giving you a timing resolution of 100µs. You can detect echo pulses of atleast 100µs length - but only in 100µs steps (aka resolution). Will this fit for your application?
    - The PFI0 ONLY acts as falling edge counter. That's it. No time measurement. No starting on rising edge and no stopping on falling edge. Just counting falling edges. Will this fit your application?
    AGAIN: Compare the specs of both devices, sensor and USB6008!
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • 6008 hc sr04

    Dear all
    I have hs sr04 ultrasonic sensors and I am thinking to connect it in my ni6008 board.
    I read somewhere that I will need counter ports and NI6008 doesn't has this ports.
    My question is, It is possible using the generate signals module to generate a pulse (in true/false box) armed by the digital port and then read the response by the trigger and gate or other module?
    Can the forum please help me release this?
    Best regards

    Measure is an obsolete add-on for Excel. You have posted to the wrong board.

  • Sensor Mapping Express VI's performanc​e degrades over time

    I was attempting to do a 3d visualization of some sensor data. I made a model and managed to use it with the 3d Picture Tool Sensor Mapping Express VI. Initially, it appeared to work flawlessly and I began to augment the scene with further objects to enhance the user experience. Unfortunately, I believe I am doing something wrong at this stage. When I add the sensor map object to the other objects, something like a memory leak occurs. I begin to encounter performance degradation almost immediately.
    I am not sure how I should add to best add in the Sensor Map Object reference to the scene as an object. Normally, I establish these child relationships first, before doing anything to the objects, beyond creating, moving, and anchoring them. Since the Sensor Map output reference is only available AFTER the express vi run. My compromise solution, presently, is to have a case statement of controlled by the"First Call" constant. So far, performace seems to be much better.
    Does anyone have a better solution? Am I even handling these objects the way the community does it?
    EDIT: Included the vi and the stl files.
    Message Edited by Sean-user on 10-28-2009 04:12 PM
    Message Edited by Sean-user on 10-28-2009 04:12 PM
    Message Edited by Sean-user on 10-28-2009 04:16 PM
    Solved!
    Go to Solution.
    Attachments:
    test for forum.vi ‏105 KB
    chamber.zip ‏97 KB

    I agree with Hunter, your current solution is simple and effective, and I can't really visualize a much better way to accomplish the same task.
    Just as a side-note, the easiest and simplest way to force execution order is to use the error terminals on the functions and VIs in your block diagram. Here'a VI snippet with an example of that based on the VI you posted. (If you paste the image into your block diagram, you can make edits to the code)
    Since you expressed some interest in documentation related to 3D picture controls, I did some searching and found a few articles you might be interested in. There's nothing terribly complex, but these should be a good starting point. The first link is a URL to the search thread, so you can get an idea of where/what I'm searching.You'll get more hits if you search from ni.com rather than ni.com/support.
    http://search.ni.com/nisearch/app/main/p/q/3d%20pi​cture/
    Creating a 3D Scene with the 3D Picture Control
    Configuring a 3D Scene Window
    Using the 3D Picture Control 'Create Height Field VI' to convert a 2D image into a 3D textured heigh...
    Using Lighting and Fog Effects in 3d Picture Control
    3D Picture Control - Create a Moving Texture Using a Series of Images
    Changing Set Rotation and Background of 3D Picture Control
    Caleb Harris
    National Instruments | Mechanical Engineer | http://www.ni.com/support

  • Ajuda com logica de sensores

    Boa tarde,
    Sou leigo em Labview, estou precisando fazer um projeto onde tenho 2 sensores, quan o 1 for atuado comecar a contar o tempo e so parar qnd o  2 atuar, ai com o tempo eu calcular a velocidade e aceleração.
    ate agora eu ja montei o circuito dos sensores, fiz uma logica no labview tb, nao como eu queria... a minha funciona da seguinte maneira, qnd eu aciono o sensor ele começa a contar o tempo, mais qnd desaciona ele para a contagem... ele so deveria parar qnd o sensor 2 fosse acionado.
    Em anexo segue o que fiz, espero que alguem posso me ajudar, estou bem perdido com o Labview.
    Estou usando um arduino UNO e o toolkit para fazer o programa.
    qq coisa meu e-mail: [email protected]
    Att.
    Rafael
    Anexos:
    2 sensor 26-4-13.vi ‏17 KB

    Rafael,
    Você enviou apenas a VI principal. Ficaram faltando algumas sub-VIs. Mesmo assim, pelo que pude entender o acionamento do sensor 1 é sempre antes do sensor 2. Assim, aconselho a fazer uma máquina de estado sequencial simples com as seguintes etapas:
    Inicialização: valores, comunicação serial, etc.
    Espera acionamento do sensor 1
    Guarda momento do acionamento do sensor 1
    Espera acionamento do sensor 2
    Guarda momento do acionamento do sensor 2
    Calcula e apresenta tempo decorrido
    Encerramento: fechar comunicação serial, etc.
    Se você não sabe como montar uma máquina de estado simples pode simplificar mais ainda colocando cada passo em um quadro (frame) de um Flat Sequence.
    André Manzolli
    Engenheiro Mecânico
    Certified LabVIEW Developer - CLD
    LabVIEW Champion

  • Usb 6009:connecting the sensor and motor

    Hi there,
    I am new to the labview also the usb-6009. I want to know if I can connect my sensor to the device. The output of the sensor is either analog voltage, pulse width or serial.If I want to use the AN pin, can I just connect the wire to the ADC from the usb or I need to add some circuit before connect it to the usb?also, if I want to control the brushless dc motor with the driver, can I just connect the wire from the motor driver direct to the device? How to connect it?
    Thanks

    You can connect analog voltages directly to the USB-6009 to be measured as long as they do not exceed the input limits (-10V to +10V).
    Connecting the motor directly to the outputs is a bad idea.
    Digital output is 0-5V, 8.5mA
    Analog output is 0-5V, 5mA
    So unless your motor draws less than 5mA (extremely unlikely) you'll blow up your DAQ!
    You will need to buffer the outputs somehow unless you are just driving logic gates.
    It's all on the datasheet... http://www.ni.com/pdf/products/us/20043762301101dlr.pdf
    Message Edited by Troy K on 06-06-2008 02:36 PM
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle

  • IPhone 5 proximity sensor not working! (iOS 6.0.1)

    iPhone 5 proximity sensor not working! (iOS 6.0.1)
    When I call , the screen is not locked(

    Remove any screen protectors and cases, does the problem continue?

  • Iphone 6 home button sensor not working

    I just got the iphone 6 in the mail and I've been having trouble setting up the fingerprint lock and reachability option. My home button sensor doesn't seem to work. I had my thumb over the fingerprint sensor for 5 minutes and it didn't read at all.. the screen remained idle. I tried everything. (I let my thumb sit over the button for minutes without moving, covered the ring, and even tried pressing down out of aggravation). And when I turned on the accessibility option for reachability. I double tapped my home button and nothing happened. Is my phone defected or am I doing something wrong?

    Hi,
    I had the same problem and after many hours of work was confirmed to be a hardware problem (according to the Apple technical support).
    I have sent it back.
    Did you ever resolve your issue?

  • My proximity sensor does not work on my iPhone 4

    My proximity sensor does not work on my iPhone 4

    Well, it can be fixed, however it is in a very difficult spot, and it may cost me more to replace than what I can get out of it. I don't care to pay for a replacement since my warranty is up, because I already have an iPhone 5. I want to sell the iPhone4, and not for $75 either because you can't make a phone call unless its on speaker. I didn't know what other people had to say, so I just wanted some feedback on my options. I'm sorry that I am not an expert on the iPhone hardware componets, because I actually work for a living. I don't have time to sit here and play on forums. Thanks for all you're help.

  • Windows 7 Pro x64 does not detect HP Mobile Data Protection Sensor (accelerometer)

    Hello there.
    I installed win7pro x64 yesterday and already came across a serious problem that makes my way of using the notebook a bit dangerous for my precious data.
    When I was working on HP-branded Vista 32bit (from recovery partition etc), there was a device called HP Mobile Data Protection Sensor together with HP ProtectSmart (or Protect Smart) software. In other words, the HDD accelerometer that parks HDD's heads when it "feels" it's falling or something, and software for it. It worked brilliantly.
    Until I decided to install Win7... Then, surprisingly after a driver-install failure and taking a look at the Device Manager I noticed that there's no such device! I checked it three times, looked at every device's property, even reinstalled Vista 32bit back - it showed again - and installed Win7 - not detected again. There's nothing that has Device ID's HPQ004! I remember people saying that after fresh Windows install, there were 6 unknown devices or more. I had only 5. [Fingerprint device, 3x MemCard reader and IR receiver]. There was no accelerometer... Also, when I try to install the drivers/software, the windows pops up:
    ProtectSmart Hard Drive Protection: with text Property.AccelerometerNotPresent
    and then another one saying something like Features were not installed because of installation error or unsupported feature.
    So now I'm stuck with a notebook that is unsafe to travel with, because the disk is no longer protected
    I already installed all the drivers available from HP page, even downloaded newest ones from Intel (chipset) etc.
    Is there a solution to this? Has anyone else encountered this problem?
    Windows 7 is officially out and available as RTM version, not beta, so I think HP should open support for it and release new drivers for win7! And most importantly, fix this issue ...
    This question was solved.
    View Solution.

    Well, thanks to myself, I fixed it. After some thinking I remembered that ACPI = BIOS-related. It appears that there is a problem with the newest (F16) BIOS.
    F.16 changelog is below:
      Version: F.16 A  (26 May 2009)       Fixes  
    Updates the Intel MRC Code to version 2.7.
    Updates the Intel AHCI OP ROM to version iSrc 1.20_E.0012 11252008.
    Updates the BIOS to support Microsoft Windows Vista Operating Systems with Service Pack 2 (SP2).
     I went back to version F.14 and... boom! New (unknown) device found And guess what, it's ACPI/HPQ0004... So now my HDD is protected again ^^ yay!
    I don't know which of these changes cause that, but it looks that that can be fixed.
    I'll go back to F.16 again to see if the device will disappear and then contact HP support on that case.
    EDIT: Well, F.16 breaks things again, so it's definetely a BIOS problem. Thanks for... umm... well... at least spread the word, guys I hope this helps if someone has the same problem.
    Message Edited by dark_skeleton on 08-22-2009 07:08 AM
    Message Edited by dark_skeleton on 08-22-2009 07:11 AM

  • IPad touch-screen sensor the does not work on one part of displey

    I have problem with a part of the screen on my iPad. It seems like the sensor on the screen does not work. When draging items or webpages through that section, the dragging stops. It looks like the screen is not detecting my fingers on that part. Part of the screen that is not working is about 1 cm wide. iPad is 1 month old.
    Message was edited by: micronola

    Had the same issue with a 1cm strip from top to bottom (portrait) not responding.  I did a backup, a complete factory reset, and then a restore of the backup.  So far it seems to be working again!!

Maybe you are looking for