Using Ultrasonic Sensors?

I basically want to make a customisable reversing sensor in that I want to be able to use the sensors from a basic car system and be able to add and change the audio and visuals outputs and the distance at which they are triggered.

Question by kjhdfadn   |  last reply


Ultrasonic distance measure

Hi eveyone, I'm an assistant cameraman in film and tv and sometimes I've hired in a  professional distance measure device to help with really tricky shots. Trouble is, to buy one costs an arm and a leg, I was just wondering if anyone here had come up with an affordable version. The device sits on top of the camera and sends out ultrasonic pulses to where ever it's pointing and displays the distance in feet and inches on a LED display, that constantly updates. That's all it needs to do. Should have a range of 2' to 15' and be +/- 1" accuracy. Any help would be greatly appreciated.

Topic by Fat Sparrow   |  last reply


Ultrasonic soldering bath

Making a working ultrasonic soldering iron is not as easy as I though it would be.Finding tanrsducer of suitable design and size is even harder.So I thought I start with something easier and share the thoughts here.If you need to solder impossible to solder things then quite often you could get away by wetting the entire area.For example the end of a wire or a lug where it won't matter that you can solder on the bottom as well as the top.Back in my days flux core solder was a rare and very expensive thing to find.So we had a little soldering pot and flux pot instead for working with lots of wires.Dip, dip, done....The pre-soldered wires where then easy to work with and the ramaining flux on then was enough.Doing this for metals like aluminium, stainless steel or even ceramics seems impossible at first sight.China offers cheap ultrasonic transducers including the required driver electronics for very littel money these days, despite the trade wars.The most obvious solution would then be to get a cheap and big enough soldering bath and to attach the transducer to it....Won't work though and if it does then not for long.Problem is firstly the heat transfered to the ceramic parts of the trandsucer and secondly the fact that most of these soldering baths use quite thick steel for the container.Add the that you deal with quite some grams of molten metal and you know where I am going.Building your own ultrasonic soldering bath to solder the impossible with ease!Project costs:40kHz transducer with driver board : about 50 bucks.Thin walled stainless steel bowl ( about 50 to 100ml but go bigger if you like) : about 2 bucks.Leftovers for an enclosure can be wood, plasic or your favourite 3D printer.Ultrasonic horn: About 500 bucks from your favourite engennering company or you need to make it yourself - I prefer the later.Main design considerations for the horn:We need something to keep the heat away from the transducer that also amplifies the power coming from it.That is why we can use a bowl or container that has a small bottom daimeter as the transducer if need be ;)There is a good reason a commercial horn costs a lot of money.They are preferably made from titanium and they need to perform as advertised right from the start.We substitude by using some aluminium round stock and a lathe.It is advisable to leave the transducer as it is!Do not take it apart to mount your horn directly onto the ceramics!Use a long enough set screw or include the required thread on your horn to mount it onto the transducer.If you prefer to use stainless steel doe to the lower heat conductivity then be my guest.The horn should have the same diameter as the mating part of the transducer for a quarter of the wavelength of the transducers frequency in the given material.Please look up how fast sound travels in your choosen material and calculate it properly.Having the lenght of the thick part right is quite cruicial.The thinner part that amplifies our movements should be about a quarter of the diameter of the transducer.For example: if the mating face of the tansducer is 40mm in diameter then the thin part of the horn should be 10mm.The length again is a quarter of the wavelength or the same as the thick part.Where thick meets thin please allow for a 3 to 5mm radius and make sure this area is nice and smothly finnished.Now, length is quite critical here....As we will mount our finnsihed actuator free hanging under the bath we need a feasable way to comapensate for our tolerances by creating our horn without a simulating software. I found that welding a short stub onto the container works best but with aluminum it is harder.I assume most will opt for welding a 6mm soft steel threaded rod onto the container.Either way the container surface must be kept flat for the mating surface of our actuator rod.So it is best to make the stud yourself or to use a suitable replacement - like using some flux and your stick welder for create a makeshift spot welder ;)If you decided on using steel for the horn then of course you can just mill a 10mm piece with a suitable thread and flat mating surface...What you want to end up with is a screw connection that has a flat mating surface and no empty spaces, fine thread prefered.Tuning the horn....The ensclosure is easy to make as a box, so the only thing to worry about is insulation but nothing to affect performance.So I just assume you have it all ready ;)With the horn at one quarter wavelength either end our thin end will be too long unless a short stud is used for a direct fit.So whatever you had to add for the part on your container or bowl need to be removed from he horns thin end.Try to keep the gad for the threaded part as small as possible as it affects the resonace.As things never turn out perfect the first try I prepare some thin steel washers - 100mm outer diameter in case you wonder and stick with the above example.I use a strong neodymium magnet and belt sander to create washers from very thin to slightly thinner ;)Taking off slightly more from the horns end will then allow toadd these washers if required - but please do a try as it is first when you think you got the measurements all right!For an aluminium horn you will of course use aluminium washers here.To do so fill the container with some water and place a sheet of thin alumiium foil on top of the water.Turn it on and within a few seconds you should see holes appearing in the fiol or even small fractures.If nothing but noise happens it is quite certain your rod will be a bit too long.Unscrew and take about one tenth of a mm off the thin end of the horns mating surface to shorten it.Try again with the foil and if no better remove some more material.Once you see some action try adding a layer of aluminium foil between the mating surfaces - screw it tight!The foil won't last long but if the action on the water is far better until it fails you know you took off too much.The washers come into place if the tuning won't work at all.Sometimes you can cut off a little bit again and again but the piece will remain too short ;)Especially if you have an aluminium horn and needed to use a steel screw on the bowl...So once the shortening of the horn fials you add a washer to get slightly above the original length and start replacing the differently thick washer until you find a sweet spot.The tricky part is over, now to solve the heating poblem...Using some glass seal as used on wood fire ovens not olnyl provides good insulation to our enclosure but also prevents the vibrations from spreading too far.As our hardware store won't just give use the little bit we need the rest can be used to insulate our container.Dending on the size and shape of your container I hope you decided to buy a container tha fits your heating element...I found that replacement coils for lab heaters work fine but some small fan heaters also use round heating elements instead if wire spirals.For a custom shape it is quite easy to use a coil of heatin wire rated for your mains voltage and a glass fibre sleeve for insulation.To keep it all in shape just wrap some steel wire over it - over the insulated coils of course.The temperature control can be as fancy as with a microcontroller or as simple as using a dimmer like I did.Most heating elements will go glowing red hot if the mains voltage is not reduced.It makes sense to limit the dimmer's movements accordingly by testing it.Just do it in the dark afeter exposing a small bit of the heating wire from the insulating sleeve.Once you see a faint glow coming dial it back a bit until you can see any glow - that should be the max setting.For a big bath or to save time you can of course crank it up to what the glass insulation can tolerate but be aware that solder can boil over!I do a temperature check either with a touch free IR thermometer of by checking how quickly some rosin boils off.If you need to dip bigger parts you need a higher temperature, so I think a digital or sensor temp control is not really required.Once you found a sweet spot to hold the solder temp long enough without getting too hot or cold just mark it for reference ;)Using the ultrasonic soldering bath correctly.Cavitation is what the work for us, so we only need to activate the ultrasonic part when we need it with a push button or food pedal switch.We do not use any flux or resin!That means if you used the bath for normal soldering and or resin then clean the remains off the surface first.A shiny and clean surface is best but the oxidisation will happen quickly so don't be too disappointed ;)Start by dipping in a clean copper wire.Some solder might stick but it won't look proper.Now dip it in again and while it is in push the button for about 3 seconds.Like magic, if tuned properly your wire is soldered and properly covered to where it was dripped in.Try the same with some slightly sanded or at least clean aluminium wire, but use the button right away for about 5 seconds.The wire should be coated with solder once more.You can try a glass rod or some stainless wire next but I guess the working principle is clear now ;)Not everything will bond with solder, especially not if it is not clean.A piece of glass with your fingerprint on it might just fail and some ceramics will only let the solder stick without actually bonding.You should always check the mechanical strength of your soldered connection before having to rely on it ;)And why would you need such a machine?Well, most people won't have any use for it.Those who do might not be able to afford a commercial model.And there is always those who just want it all...If you know why you need such a thing than you have an alternative now at a fraction of the cost.You only need a lathe or someone who can machine the horn for you.Another benefit is that for smaller containers it is possible to weld a small "bridge" over the top.Should be placed so the bottom is in the solder while top is above it.In many cases you will then be able to use this plate to heat up whatever you need to solder on.Like a glass plate where you would like to solder a wire to.Once up to temp turn the ultrasonic part on and use a normal soldering iron and flux flree solder.Works quite well for these small solar panel kits...Ok, and how far away is our cheap ultrasonic soldering iron?Not that far :)I already have a topic for this though....

Topic by Downunder35m   |  last reply


arduino ultrasonic communication

I was thinking about using the ultrasonic  module (hc-sr04) for communication for two or more arduino.the way i was thinking of do to turn a 8 bit number into single bits(i have no idea on how to do that) and send them one at time(with delay) to a another arduino which turn it back into a number also  has a master arduino  and slave arduinos 

Topic by act casual   |  last reply


Ultrasonic mixer for immissicable fluids?

Any idea's for a 12V-15V DC circuit to drive some transducers e.g. AU 12550 ? On board Water/Fuel mix, try in an ultrasonic cleaner! 35%H2O + 65%H CO is stable and burns just mighty fine thanks. Make it free to the world and free the world ,hip, hip ,hooray!

Question by Gofish   |  last reply


Building an ultrasonic soldering station ?

I have some strage projects coming up that will require me to solder things together that usually don't really like this.In my past job this was quite easy as we had an ultrasonic soldering bath and several ultrasonic soldering stations.Well, the access to those is gone :(At first I thought "How hard can it be to build one?"Not really too hard for a half decent soldering bath but a lot harder for a soldering iron...The soldering stations we used operated in the range of 50-60kHz.Commonly available transducers and their drivers however you find for 28 and 40kHz.Finding small ones in the range of 10 to 20W is also not easy.I can deal with a soldering iron that ends up in the size of a 500W wood burning iron as long as the tip is replacable.But what are the frequencies really required to solder for example on ceramic, titanium or lab grade glass?Does anyone have experience with doing this on lower frequencies than what the professional stations use?Last but not least:Is there any software available (preferably free or as an online tool) to simulate the quite long feed horn that is required with a soldering tip?Going with 1/4 wavelenghts is logical but how could I get the info on the actual shape required without simulating it first?I was thinking of using a heater cartridge like used for the hotend on a 3D printer to heat the tip.However, tests on my ultrasonic actuator showed the entire thing disintegrates within a few minutes, at least the filler and "glue" used to hold it all together.Would a free standing heating coil around the tip work?Heat transfer would be a pain and losses high, but should be possible?In case you wonder why: I just don't ave the thausands of dollars at hand required to buy one of these soldering stations....

Question by Downunder35m   |  last reply


I am working on a ultrasonic paintbrush cleaner.? Answered

I am working on an ultrasonic paintbrush cleaner... I have the transducer and I am pretty sure I can use a regular stereo amp... (because a transducer is just a different type of speaker) what else do I need. I guess I am asking how to make an ultrasonic generator.

Question by bellinghammakerspace   |  last reply


does anyone know any how to`s on how to connect a picaxe 20m to a SRF005 ultrasonic range sensor? Answered

I want to connect an ultrasonic rangefinder to my robot and my robots brain is a picaxe 20m so i need a way of interfacing it with a picaxe 20m , im pretty sure it`s an ADC input so if anyone knows an adc to cm converter i would be very grateful!!! thanks in advance if anyone answers this!!! cm

Question by thecookiemonster   |  last reply


What components would be needed to build an ultrasonic thickness gauge to measure paint the thickness of paint coatings?

I need an ultrasonic thickness gauge, they work by sending a pulse through the material being measured (paint in this case). When the pulse strikes a denser material it returns to the sensor, the delay from the time of the pulse being sent to being received gives the depth. I anyone knows the components that would be needed, or ideally, a set of schematics could you be so kind as to help me out. Thank you.

Question by alkem   |  last reply


where can i get a under water ultrasonic sensors in india or online. i'm doing a progect on under water robot using arduino

Hello, im from bangalore india. looking for a under water ultra sonic sensor for a under water robot. compatible with atmega 8, arduino.

Topic by opadigela 


Why does my Arduino script do the opposite of what I want? Answered

Hey out there! I am trying to write a code for an Arduino project I am working on. I am using an ultrasonic proximity sensor and an arduino nano clone. What I want is that when the object it detects is under 50cm an led turns on. When it senses an object farther than 50cm I want theLED to go off. Below is the script I wrote. The problem is it does the opposite of what I want(objects >50 LED goes on, objects <50 LED goes off). Any help would be greatly appreciated! Thanks! #define trigPin 3 #define echoPin 9 int LED = 12; void setup() {   Serial.begin (9600);   pinMode(trigPin, OUTPUT);   pinMode(echoPin, INPUT);   pinMode(LED, OUTPUT); } void loop() {   float duration, distance;   digitalWrite(trigPin, LOW);   delayMicroseconds(2);   digitalWrite(trigPin, HIGH);   delayMicroseconds(10);   digitalWrite(trigPin, LOW);     duration = pulseIn(echoPin, HIGH);   distance = (duration / 2) * 0.0344;     if (distance >= 50){     Serial.print("Distance = ");     Serial.println("Out of range");     digitalWrite(LED, LOW);   }   else {     Serial.print("Distance = ");     Serial.print(distance);     Serial.println(" cm");     digitalWrite(LED, HIGH);     delay(500);   }   delay(500); }

Question by Mpc1055   |  last reply


Is an ultrasonic transducer for measuring liquid levels... capable of being used for an ultrasonic cleaning transducer? Answered

I am working on something I know nothing about. I have a transducer (from a liquid level sensor) and an ultrasonic generator... can I make an ultrasonic cleaner with it or is the transducer the wrong type?

Question by bellinghammakerspace   |  last reply


Is electromagnetic wave can travel with ultrasonic wave? Answered

Is electromagnetic wave can travel with ultrasonic wave.If yes,then how far an ultrasonic wave will travel in air medium.

Question by Rajkumar2506   |  last reply


There is lot of ic's that can produce ultrasonic Freq. plus. Is it possible to catch the bounce back and trigger relay?

Is it possible to triggering  a relay by freq. shift or tone? Some of those ant-barking curcuits that use 555's is it possible that they could they be modified for proximity detector use? Could  transmitter  catch the signal or tone on the return  the echo bounce and trigger the relay. Also can some of those Max Bot's run directly to a relay and work? 

Question by    |  last reply


what is the output voltage of 100 watts with 40khz frequency and 220 input voltage generator of home made ulta cleaner?

Home made ultrsonic cleaner sounds good.for this system that is 100 watts and 40khz with 220 input voltage and two 50 watts transducers which are connected to them,so what is the output voltage of generator? thanks

Question by mehran1376   |  last reply


How do I make a 3D distance scanner using ultrasonic arduino modules?

I have 3 Ultrasonics Arduino compatible distance sensors. A single ultrasonic sensor can be used to measure the distance of an object from the sensor. But my application for the sensors is a bit different. How do i measure the distance of the object on all 3 axes with respect to the ultrasonic sensor?

Question by Jonathanrjpereira   |  last reply


can we record ultrasonic sounds. ?

.if it so how we can.can we recieve it using microphone(ie it can be converted to electrical energy ah

Question by thenmozhi   |  last reply



What ultrasonic frequency actually hurts dogs? Answered

I AM NOT TRYING TO TORTURE ANIMALS. I'm trying to make a dog repellent device and I need to know how high I can make it before it hurts the dog, because hurting it is not my intention.

Question by martzsam   |  last reply


Trying to figure out how ultrasonic humidifier detects low water level

Hello all, I'm currently working on a home automation system and have decided I want to throw my fragrance diffuser into the mix. What I'm trying to accomplish is I'd like the diffuser to come on whenever the unit has power so I can simply control it with a Sonoff SV. I was originally planning on just replacing the guts with an Arduino Nano or something until I tore into it and realized I have absolutely no clue how this thing detects when the water level is low! There's no sort of float switch or resistive fluid detection. In fact, the only part that has contact with the fluid is the ultrasonic transducer. I'm curious if anyone can look at the PCB and give me some more insight as to what's going on. On the far left the five pins coming into the board is the cable connector for the buttons and LEDs, the two large pins beneath that are the buzzer for making beeping noises when buttons are pressed, The SMD IC towards the middle is from what I can tell the brains of the operation. The three large pins (two with solder) near the top center are where 24vdc comes in. The two large pins on the upper right are for the fan and the two large pins on the bottom right are for the transducer. If anyone has any insight as to how this thing reads a low water level it'd be very much appreciated. Thank you!

Question by harry88   |  last reply


How to stop a servo using conditional if?

I'm using an Arduino Uno, Ultrasonic sensor (HC-SR04) a Servo motor (SG90 Tower Pro). I would like to rotate the servo continuously from 0 to 180 and back to 0. I would like to stop the servo whenever the ultrasonic sensor detects an object  at a distance of 40 cm or less. I know how to rotate the servo and how to detect an object using the ultrasonic sensor, but I couldn't combine the two. Can you kindly help me on how to do so?

Question by iSmartov   |  last reply


ultrasonic sensor convert 4 pin to 5 pin

Hello there, Is it possible to convert a 4pin ultrasonic sensor to a 5pin? I have this sensor with 4 pins: http://www.ebay.com/itm/Waterproof-DC-5V-DYP-ME007Y-Ultrasonic-Sensor-Module-Measuring-Range-30cm-3-5m-/201025966447 and this display module with "5 pins": http://www.ebay.com/itm/Mini-Non-contact-Ultrasonic-Motion-Detector-Module-Sensor-Display-Board-Security-/360717776823 How do i get the display module and sensor module, to talk together? BEST :) Regards Lasse

Topic by dmor 


[Help] bicycle proximity sensor

Hello guys i would like to start making a proximity sensor the idea is to mount it on the back of my bicycle when an object/vehicle come close it gives me reading with distance and maybe a beep or something like that,the question is i found there are 2 methods one using IR and one using ultrasonic,which one is cheaper and which one is better and easier.this is supposed to my first instructable involves programming.

Topic by Mido Masry   |  last reply


Arduino | Run 2 Function at the same time.

Hi , i wanna ask about 2 function which is Ultrasonic and Heat that run at the same time  , For me , i just got Heat running as i want but the Ultrasonic doesn't trigger the buzzer if object (Laptop) 30cm away from the ultrasonic. I've been trying since last week but the result is still the same ;'( Btw here is the code , i've seperate it to 2 function which is Ultrasonic and Heat.  i hope u guys can guide me which part should i change or Add. Thanks in advance ;) //*********************************** #include #define trigPin 6    //trigPin #define echoPin 7    //echoPin LiquidCrystal lcd(12,11,5,4,3,2); int tempPin = A1;   // the output pin of LM35 int fan = 10;       // the pin where fan is int led = 9;        // led pin int temp; int tempMin = 35;   // the temperature to start the fan int tempMax = 70;   // the maximum temperature when fan is at 100% int fanSpeed; int fanLCD; int duration, distance; int buzzer = LOW; void setup() {   Serial.begin (9600);        //Baud rate   pinMode (trigPin, OUTPUT);  //trig pin as output   pinMode (echoPin, INPUT);   //echo pin as input   pinMode (13, OUTPUT);       //Buzzer pin as output   pinMode(fan, OUTPUT);   pinMode(led, OUTPUT);   pinMode(tempPin, INPUT);   lcd.begin(16,2);   } void ultrasonic() {   digitalWrite (trigPin, HIGH);   delayMicroseconds (1000);   digitalWrite (trigPin, LOW);   duration = pulseIn (echoPin, HIGH);   distance = (duration/2) / 29.1;   if (distance > 30)   {     Serial.print(distance);     Serial.println(" cm");     digitalWrite (13, HIGH);   }   else   {     Serial.println (distance);     Serial.println ( "cm");     digitalWrite (13, LOW);   } } void heat() {   temp = readTemp();     // get the temperature   if(temp < tempMin) {   // if temp is lower than minimum temp     fanSpeed = 0;      // fan is not spinning     digitalWrite(fan, LOW);         }   if((temp >= tempMin) && (temp <= tempMax)) {  // if temperature is higher than minimum temp     fanSpeed = map(temp, tempMin, tempMax, 32, 255); // the actual speed of fan     fanLCD = map(temp, tempMin, tempMax, 0, 100);  // speed of fan to display on LCD     analogWrite(fan, fanSpeed);  // spin the fan at the fanSpeed speed   }   if(temp > tempMax) {        // if temp is higher than tempMax     digitalWrite(led, HIGH);  // turn on led   }   else {                    // else turn of led     digitalWrite(led, LOW);   }   lcd.print("TEMP: ");   lcd.print(temp);      // display the temperature   lcd.print("C ");   lcd.setCursor(0,1);   // move cursor to next line   lcd.print("FANS: ");   lcd.print(fanLCD);    // display the fan speed   lcd.print("%");   delay(200);   lcd.clear();   } float readTemp() {  // get the temperature and convert it to celsius   temp = analogRead(tempPin);   return temp * 0.48828125; } void loop() {    ultrasonic();   heat(); } //***********************************

Topic by Melromeo   |  last reply


<5mm distance sensing, <100micron accuracy, GUI, RasPi or Arduino?

Hi there, I am trying to keep my hardware/ coding skills alive and spruce up my bicycle wheel truing stand. I need to figure out the required hardware + software for the following: I want to build a non-contact distance measurement sensor system and get the output "into" my computer for display in a graphical user interface. I know I could omit the latter step with going directly onto a mini-LCD screen, but trying to use this a learn-another-programming-language learning experience (I've coded Matlab galore, pondering Python for this project). General system components: Sensor - [something - RasPi or Arduino I guess] - laptop (running debian) - GUI displaying continuous sensor reading Sensor: I've web-searched the hell out of this, but not finding anything quite answering my questions. I want to continuously measure the distance from the sensor to a bicycle wheel rim braking surface. Material is aluminium, shiny, though not smooth. Biggest problem with the web-search is being swamped by proximity sensor results (on/off) rather than a distance proportional output signal and much lower resolution projects. I rule out IR or optical sensing, now stuck between ultrasonic and inductive sensing, though tending to the latter for a faster response/adjustment to change time. Sensor criteria (other than reasonable $$): - total sensing range: ca.5mm - sensing accuracy 10 to 100micron/ 0.01 to 0.1mm - don't ask if that's needed, a bit of overkill, I know, but a bit of OCD doesn't do any harm, eh? - fast-ish sampling rate (so that when I turn the wheel, the number on the screen updates nice and fast, guess >25Hz is sufficient). [Something - RasPi or Arduino]: I know that I could omit the laptop GUI part (mini-LCD, LED array, etc), but keen to learn/ practice a little Python with this project, so I guess I am tending to the RasPi, but I am open minded. All I want is the analogue sensor out to end up as a digital reading "inside" my computer to be passed to my GUI as a reading. Essentially a mini A2D converter. Not fussed whether the output is in actual distance units or in arbitrary units/ current units (I guess the sensors put out a proportional current signal?). GUI: Depending on the above, how do I best get the signal "into" a Python program? A moderate fast sample rate >25Hz should suffice.  Any help with this would be greatly appreciated! LaserCycle

Topic by lasercycle   |  last reply


new to arduino, want to run a dual display for 2 sensors

I'm new to the Arduino community.  wanting to set up a dual radar setup with 2 ultrasonic sensors,  (Ultrasonic Sensor Module HC-SR04), and outputting to a pair of 7 segment displays ( two 7 segment displays each).  I've found a code to do a single could use a lot of help to output two at the same time, basically 2 lanes without 2 units.  im using an arduino mega, ordered a unor3 and hopefully it can be made to run on one or the other. code is as follows: /* HC-SR04 Sensor    The circuit:     * VCC connection of the sensor attached to +5V     * GND connection of the sensor attached to ground     * TRIG connection of the sensor attached to digital pin 2     * ECHO connection of the sensor attached to digital pin 4  */    /*  This is a radar ping sensor that calcultates the speed of an  object traveling away or towards the sensor. I took some of this  code for the HC-SR04 Sensor implementation by Tautvidas Sipavicius. The rest  is original code from me. I know that the seven segment display  code is not the best to look at or the most optimized but it  serves its purpose just fine and is easy to understand.    Written by Matthew Ladd  */   const int trigPin = 2; const int echoPin = 4;   void setup() {   // initialize serial communication:   Serial.begin(9600);   //First 7 segment (ones place)   pinMode(30,OUTPUT);//F   pinMode(31,OUTPUT);//G   pinMode(32,OUTPUT);//E   pinMode(33,OUTPUT);//D   pinMode(34,OUTPUT);//C   pinMode(35,OUTPUT);//B   pinMode(36,OUTPUT);//A   //Second 7 segment (tens place)   pinMode(37,OUTPUT);//F   pinMode(38,OUTPUT);//G   pinMode(39,OUTPUT);//E   pinMode(40,OUTPUT);//D   pinMode(41,OUTPUT);//C   pinMode(42,OUTPUT);//B   pinMode(43,OUTPUT);//A } void zerofirst(){   digitalWrite(30,LOW);   digitalWrite(31,HIGH);   digitalWrite(32,LOW);   digitalWrite(33,LOW);   digitalWrite(34,LOW);   digitalWrite(35,LOW);   digitalWrite(36,LOW); } void onefirst(){   digitalWrite(30,HIGH);   digitalWrite(31,HIGH);   digitalWrite(32,HIGH);   digitalWrite(33,HIGH);   digitalWrite(34,LOW);   digitalWrite(35,LOW);   digitalWrite(36,HIGH); } void twofirst(){   digitalWrite(30,HIGH);//F   digitalWrite(31,LOW);//G   digitalWrite(32,LOW);//E   digitalWrite(33,LOW);//D   digitalWrite(34,HIGH);//C   digitalWrite(35,LOW);//B   digitalWrite(36,LOW);//A } void threefirst(){   digitalWrite(30,HIGH);//F   digitalWrite(31,LOW);//G   digitalWrite(32,HIGH);//E   digitalWrite(33,LOW);//D   digitalWrite(34,LOW);//C   digitalWrite(35,LOW);//B   digitalWrite(36,LOW);//A } void fourfirst(){   digitalWrite(30,LOW);//F   digitalWrite(31,LOW);//G   digitalWrite(32,HIGH);//E   digitalWrite(33,HIGH);//D   digitalWrite(34,LOW);//C   digitalWrite(35,LOW);//B   digitalWrite(36,HIGH);//A } void fivefirst(){   digitalWrite(30,LOW);//F   digitalWrite(31,LOW);//G   digitalWrite(32,HIGH);//E   digitalWrite(33,LOW);//D   digitalWrite(34,LOW);//C   digitalWrite(35,HIGH);//B   digitalWrite(36,LOW);//A } void sixfirst(){   digitalWrite(30,LOW);//F   digitalWrite(31,LOW);//G   digitalWrite(32,LOW);//E   digitalWrite(33,LOW);//D   digitalWrite(34,LOW);//C   digitalWrite(35,HIGH);//B   digitalWrite(36,LOW);//A } void sevenfirst(){   digitalWrite(30,HIGH);//F   digitalWrite(31,HIGH);//G   digitalWrite(32,HIGH);//E   digitalWrite(33,HIGH);//D   digitalWrite(34,LOW);//C   digitalWrite(35,LOW);//B   digitalWrite(36,LOW);//A } void eightfirst(){   digitalWrite(30,LOW);//F   digitalWrite(31,LOW);//G   digitalWrite(32,LOW);//E   digitalWrite(33,LOW);//D   digitalWrite(34,LOW);//C   digitalWrite(35,LOW);//B   digitalWrite(36,LOW);//A } void ninefirst(){   digitalWrite(30,LOW);//F   digitalWrite(31,LOW);//G   digitalWrite(32,HIGH);//E   digitalWrite(33,HIGH);//D   digitalWrite(34,LOW);//C   digitalWrite(35,LOW);//B   digitalWrite(36,LOW);//A } void zerosecond(){   digitalWrite(37,LOW);   digitalWrite(38,HIGH);   digitalWrite(39,LOW);   digitalWrite(40,LOW);   digitalWrite(41,LOW);   digitalWrite(42,LOW);   digitalWrite(43,LOW); } void onesecond(){   digitalWrite(37,HIGH);   digitalWrite(38,HIGH);   digitalWrite(39,HIGH);   digitalWrite(40,HIGH);   digitalWrite(41,LOW);   digitalWrite(42,LOW);   digitalWrite(43,HIGH); } void twosecond(){   digitalWrite(37,HIGH);//F   digitalWrite(38,LOW);//G   digitalWrite(39,LOW);//E   digitalWrite(40,LOW);//D   digitalWrite(41,HIGH);//C   digitalWrite(42,LOW);//B   digitalWrite(43,LOW);//A } void threesecond(){   digitalWrite(37,HIGH);//F   digitalWrite(38,LOW);//G   digitalWrite(39,HIGH);//E   digitalWrite(40,LOW);//D   digitalWrite(41,LOW);//C   digitalWrite(42,LOW);//B   digitalWrite(43,LOW);//A } void foursecond(){   digitalWrite(37,LOW);//F   digitalWrite(38,LOW);//G   digitalWrite(39,HIGH);//E   digitalWrite(40,HIGH);//D   digitalWrite(41,LOW);//C   digitalWrite(42,LOW);//B   digitalWrite(43,HIGH);//A } void fivesecond(){   digitalWrite(37,LOW);//F   digitalWrite(38,LOW);//G   digitalWrite(39,HIGH);//E   digitalWrite(40,LOW);//D   digitalWrite(41,LOW);//C   digitalWrite(42,HIGH);//B   digitalWrite(43,LOW);//A } void sixsecond(){   digitalWrite(37,LOW);//F   digitalWrite(38,LOW);//G   digitalWrite(39,LOW);//E   digitalWrite(40,LOW);//D   digitalWrite(41,LOW);//C   digitalWrite(42,HIGH);//B   digitalWrite(43,LOW);//A } void sevensecond(){   digitalWrite(37,HIGH);//F   digitalWrite(38,HIGH);//G   digitalWrite(39,HIGH);//E   digitalWrite(40,HIGH);//D   digitalWrite(41,LOW);//C   digitalWrite(42,LOW);//B   digitalWrite(43,LOW);//A } void eightsecond(){   digitalWrite(37,LOW);//F   digitalWrite(38,LOW);//G   digitalWrite(39,LOW);//E   digitalWrite(40,LOW);//D   digitalWrite(41,LOW);//C   digitalWrite(42,LOW);//B   digitalWrite(43,LOW);//A } void ninesecond(){   digitalWrite(37,LOW);//F   digitalWrite(38,LOW);//G   digitalWrite(39,HIGH);//E   digitalWrite(40,HIGH);//D   digitalWrite(41,LOW);//C   digitalWrite(42,LOW);//B   digitalWrite(43,LOW);//A } long distanceOverTime(long first,long second){  return ((first-second)/.1)*.0223693629;//taking cm/s to mph } long holder;//store the cm from last time through loop. long temp;//used to store the speed value after changes int counter; void loop() {   // establish variables for duration of the ping,   // and the distance result in inches and centimeters:   long duration, inches, cm;   int tens;   int ones;   long Speed;   // The sensor is triggered by a HIGH pulse of 10 or more microseconds.   // Give a short LOW pulse beforehand to ensure a clean HIGH pulse:   pinMode(trigPin, OUTPUT);   digitalWrite(trigPin, LOW);   delayMicroseconds(2);   digitalWrite(trigPin, HIGH);   delayMicroseconds(10);   digitalWrite(trigPin, LOW);     // Read the signal from the sensor: a HIGH pulse whose   // duration is the time (in microseconds) from the sending   // of the ping to the reception of its echo off of an object.   pinMode(echoPin, INPUT);   duration = pulseIn(echoPin, HIGH);     // convert the time into a distance   inches = microsecondsToInches(duration);   cm = microsecondsToCentimeters(duration);   Speed=distanceOverTime(holder,cm);   holder=cm;//after speed caclulation so take the cm value for another calculation   Speed=abs(Speed);   if(Speed!=0 || counter==10){     temp=Speed;     counter=0;   }else{     counter++;   }   if(temp>=100){    zerofirst();    zerosecond();   }else{     ones=temp%10;     tens=temp/10;   }   if(ones == 0){     zerofirst();   }else if(ones==1){     onefirst();   }else if(ones==2){     twofirst();   }else if(ones==3){     threefirst();   }else if(ones==4){     fourfirst();   }else if(ones==5){     fivefirst();   }else if(ones==6){     sixfirst();   }else if(ones==7){     sevenfirst();   }else if(ones==8){     eightfirst();   }else if(ones==9){     ninefirst();   }   if(tens == 0){     zerosecond();   }else if(tens==1){     onesecond();   }else if(tens==2){     twosecond();   }else if(tens==3){     threesecond();   }else if(tens==4){     foursecond();   }else if(tens==5){     fivesecond();   }else if(tens==6){     sixsecond();   }else if(tens==7){     sevensecond();   }else if(tens==8){     eightsecond();   }else if(tens==9){     ninesecond();   }       Serial.print(inches);   Serial.print(" in, ");   Serial.print(cm);   Serial.print(" cm, ");   Serial.print(Speed);   Serial.print(" mph");   Serial.println();     delay(100); }   long microsecondsToInches(long microseconds) {   // According to Parallax's datasheet for the PING))), there are   // 73.746 microseconds per inch (i.e. sound travels at 1130 feet per   // second).  This gives the distance travelled by the ping, outbound   // and return, so we divide by 2 to get the distance of the obstacle.   // See: http://www.parallax.com/dl/docs/prod/acc/28015-PING-v1.3.pdf   return microseconds / 74 / 2; }   long microsecondsToCentimeters(long microseconds) {   // The speed of sound is 340 m/s or 29 microseconds per centimeter.   // The ping travels out and back, so to find the distance of the   // object we take half of the distance travelled.   return microseconds / 29 / 2; } again, all your help and thought are appricated

Topic by herb1977   |  last reply


how to make an Ultrasonic Water Fogger for those creepy witch's cauldron effect?

Also known as ultrasonic fogging devices, these consist of metallic plates which vibrates with ultrasonic frequency to nebulize the water molecules to form a vapour which appears as thick low lying fog. For the effect they are simply placed below a water body. Please provide complete details. www.mainlandmart.com/foggers.html

Question by adilqaiser   |  last reply


Ultrasonic sensor controled directly from arduino?

I'm on a time crunch for a project, and I want to have distance sensing.  Unfortunatealy, i dont have enough time to get stuff shipped, nor the budget to use radioshack.  I was wondering if I can use a single pieze transducer without premade circuitry, and control it from an arduino.  I have some transistors, some common ICs (386, 555, etc), and basic passive components, plus two arduino UNOs (one with a broken FTDI adapter) can it be done? I don't need an  exact, continuous, or scaling measurment, just one that gives me an idea of the distance/presence of an object. 

Question by jduffy54   |  last reply


Universal ultrasonic driver circuit - help required

I would like to build a few, properly working, ultrasonic devices.For example an ultrasonic soldering iron and an ultrasonic soldering bath.But some small ultrasonic plastic welder or cutter is nice too :)If you ever had one of the above to play with you know why they are great to have.The development story so far:I managed to destroy several driver boards.The ones you find for cheap with 28 or40kHz transducers in your favourite online store.In the beginning I knew I will have a need to repair or replace these boards but no clue why.Take an ultrasonic cleaner and read the manual.There it is always pointed out that a low water level can destroy your toy.What does that exactly mean?The transducer needs to be kept in resonance, if the water level is too low or something havy sits right at the bottom of the tank the frequency drifts off too much.Very expensive untis can cope a bit better here, which gave me the idea for the universal driver.During my experiments with hoorns I noticed that it is very hard to get usable results without extensive computer simulations first.Just one mm too long or too short and literally nothing happens, go a bit further and a thin aluminium horn might start to crack under the stress.And in all these cases the driver overloads, in one cheap case to the point that the transducer fused together.Trying to examine these driver circuits while they operate turned out to be a total nightmare!Place the probe from the ocsilloscope literally anywhere and the thing goes out of tune already.By the way: Never coil up the wires going to your transducer.....Only way I found that somehow works is by adding a tiny transformer around the wire going to the transducer and to measure the voltage generated there.To make it short: Destructive testing provided the requirements a driver needs to match to keep the cost low.Reasons for the premature death of cheap driver boards:Almost all of these cheap drivers I could find generate the 28 or 40kHz signal from the mains voltage.Means it goes through a transformer to get the desired 50-80V and some witchcraft turns that into a more or less smooth DC voltage.This is then switched by some beefy transistors, mosfets or similar, depending on the circuit.The actual feedback happens with a tiny ring toroid, similar to what you use to drive a ZVS system.With this dirt simple design a fully tuned transducer - like when nothing is attached to it yet - would cause the driver to provide a voltage of about 6x of what the transducer is rated for.Thankfully in most cases the transducer survives this a couple of times while the transistors fry within about 3 seconds no matter how good the cooling.Slightly out of tune - like when mounted onto a cleaning tank - the resonant frequency is slightly off the tuned 28 or 40kHz.The driver compensates this through the tiny feedback transformer.But this only goes for a about 1-4kHz, drift away further and first the power drops, then the voltage spikes and it dies.The feedback is not able to shift the generated frequency enough as it is ultimately derived from the mains frequency of your grid.Reasons why a dedicated, low cost driver would open new possibilities:Imagine you need to make a horn or sonotrode for your transducer.Knowing that each half of it should be equal to a quarter wavelength of the operating frequency is nice and easy.But if you add something like a blade for cutting or you need some pressure for welding then calculated dimensions become useless.Programs to fully simulate complex sonotrode designs, especially if you need to add screws or blades are costly and out of reach for most of us.Even if you would have access you still need to know the material properties to know the speed of sound in the material and how much it can flex in various directions without being subjected to metal fatigue.For basically all hobby needs in terms of ultrasonic gadgets we are happy with a simple push pull motion.the same motion our transducer offers by default.And when it comes to attachments it turned out that quite stubby horns of light weight are a good compromise already.A 50-50 ratio of diameter and length works reasonably well in most cases.For example the standard 40kHz transducer of 45mm diameter is quite happy to work with a horn like this:45mm diameter on the thick end, 20mm diameter on the tin end.Thick part 40mm long, thin part 42mm long.The extra 2mm are for the manual tuning by filing or sanding it off until there is good cavitation happening when you put the end into water.This however is only good for simple testing purposes and some fun but as soon as you attach blades or a small pot with about 200grams of molten solder the tuning is way off and destroys the driver quickly.To be able to deal with different pressure levels on the working end or just a different mass that is attached the driver needs to "know" the new self resonant frequency.Basic idea for a dedicated driver:Please bare with me on this one as my developing days got severly neglected once I moved to the other side of the globe....Input should from a 12V power supply, preferably a PSU to keep costs and sourcing time low.The operating voltage for the transducer shall come from a simple switch mode supply.I was thinking of scrapping a PSU for the transformer and switching transistor.This however would provide about 120-160V on 240V mains with the transformer of a PSU.To match the required load changes it would be great to drive this first transformer by PWM means to regulate the output voltage with a potentiometer while keeping it steady within the set values.Basically like every cheap phone charger but with an output voltage that can be adjusted and kept regulated.The switching transistors for the transducer should be well over the required specs of an out of tune transducer.I guess capable of switching 600V should be sufficient.Main design change to the cheap driver boards would be the feedback.A hall effect sensor could provide the proportional voltage to the current going into the transducer.It would also provide the real operating frequency of the transducer for the feedback loop.The resulting real resonant frequency of the running system is then used to drive the switching transistors.As a result the transducer would always be driven at the exact right frequency no matter the load on the working end.These transducers still have a quite limited frequncy range due to the fixed counterweight on the back - it is optimised to be self resonant without the transducer being mounted.To explain this feature let me use a spring with a weight on it....You can move your hand up and down to make the weight swing up an down with the spring force.You can also push the weight to get the same effect.But if the weight would just expand and contract there would be no change in the spring force or position or the weight.Our transducer however is mounted to something and the weight on the back is heavier than what is on the front end of the transducer.As a result the weight is pushed back and forth and because all is fixed together this movement is transfered to for example your cleaning bowl.Without anything attached to the transducer it would literally start to rip itself apart until either the bolt or the ceramics fail.The feedback loop needs to prevent this by adjusting the switching voltage going to the transducer.Once too far out the system needs to shut off until it can reset.The frequency control is not that fragile.With the power controlled through the feedback even a wide drift in the operating frequency of about 5kHz would only reduce the effectiveness and amplitude of the moving horn/sonotrode.Sadly my skill set in circuits is not that good anymore to have the required parts in my head and to know how to combine them properly :(Why this concept is only really good for really basic applications:Professional solutions utlise often less than 20W of ultrasonic power for a soldering iron or scaler.For these devices the sonotrode/horn is spefically designed for the task at hand.Same goes for any possible attachments - without them these things don't do much at all.Finding these low power ceramic transducer rings for a good price is hard enough, making an amplifying horn even harder.But when using these quite big 50 or 100W transducers we find for cheap online we can compensate the lower amplitude with the added power of the transducer.Since we only need surface action but won't have to go through a few liters of liquid it might even be beneficial.Fun fact: A 40kHz transducer has the second harminc frequency at about 170kHz.Means we could design a driver for the second harmonic and enjoy total silence when working with it.Would also mean that the ultrasonic power would be much higher.Mass times acceleration and such things ;)If you want some ultrasonic cutter then you don't want to waste weeks and lots of money trying to come up with a working attachment to your transducer.Just keep it as short as possible and with about the same weight as the front part of the transducer.At least the driver desing would make it quite easy to design an amplifying horn by trail and error through reducing the lenght of the thin end until it really fits.Anyone with good circuit skills willing to volunteer? ;)

Topic by Downunder35m   |  last reply


how to control ultrasonic the servo should be steady if not detected by hands,upon closer your hand servo is get faster?

I need a code for ultasonic motor, controlling the servo motor. it should be steady if not detected by hand, and upon your hands getting closer to the ultrasonic the servo mototr getting faster. thank you

Question by Kirsch chu   |  last reply


Arduino ultrasonic sensor activating servo movement?

I am building a rc car as part of a pretty big project that has a bunch of other stuff on it . But one thing I can't figure out, being I'm only slightly familiar with arduino (UNO), is how to make a servo move when the sensor tells it to. I am going to attach a hook on the front to lift up an object so I can transport it. Now what I want to do is have the sensor detect the object when it is close enough to the hook (3-4") and then tell the servo to move a given degrees, around 25, just enough to pick it up. I've been toying with the code for the obstacle detecting robots trying to see if I cant modify that for this type of use but a lot of that code is backup commands, alternate routes and all that other stuff. just need a simple detect object, send signal to servo and servo moves the hook to pick the object up. Thanks  

Question by dmegill   |  last reply


Modify the ultrasonic range finder sensor - your opinion ???

Hi ... I would like to know your opinion about this ultrasonic range finder sensor. I bought this "JCB ultrasonic distance measurer". I bought it for it's ability to measure up to 18m. I tried it ... and happy with the distance ... BUT ... a realised few issues (for me). 1. I think, it use 2 pulses to make the measurement. It's like ... Tuk - Tuk ... end then cca 1 sek is the result. 2. when I move ... it will NOT tell me the results ... probably, because of those 2 impulses - I think, the device is comparing those two TUK TUK ... and if there is a difference, it tells me ERROR. How ever ... my question is ... if I would take out just the sensor, do you think, I could make it to run only with one TUK - to be faster ... and do you think, then I could make measurements while moving ??? (just to show me the actual distance ???) I would like to make something like the arduino PING sensor ... but with greater distance. EDIT : I forgot to mention, that I want to use it with Arduino ... I don't need the device to work on its own. I would just like to know, if the sensor on its own (taken out of this device) + arduino could measuring by movement and with the same distance (max 18m) ??? Looking forward to your opinions. Thank you. zholy

Question by zholy   |  last reply


How to make an Ultrasonic Proximity Sensor w/ Vibrating motor?

Ok so I want to use something like http://www.parallax.com/Store/Sensors/ObjectDetection/tabid/176/ProductID/92/List/1/Default.aspx?SortField=ProductName,ProductName and http://tinyurl.com/cxlp8jz to create a small system that vibrates when an object is in the way of the detector. To elaborate, Something like https://www.instructables.com/id/Make-an-Attiny13-based-IR-proximity-sensor-for-2/ but using an ultrasonic sensor(for farther range) and a vibrating motor instead of an LED because I am looking to make something for the blind. So how would I build it? I can purchase any parts and just need some instructions like the project above provided. Thanks a lot for any help you can provide. Also , If I need to use a Raspberry Pi, I have one. My Skills? My skills are limited. I know how to solder and work with PCBs, But I do not know how to code a microprocessor. I know that I'd hook it up to an arduino to code it but I can't code. If someone can tell me where to solder the parts and give me a code, I'll be able to do it. Thanks alot for your reply. If someone does this for me, I would be very grateful and might even make some donations to you. :) So to summarize, I need code to program a microprocessor to make a vibrating motor vibrate when the PING senses an object. I also need some sort of a schematic. I will be very grateful and will be sure to give you acknowledgements when I do my project.

Topic by hackery21   |  last reply


How would I make a sensor sense motion coming at me from behind while I'm moving forward?

I'm trying to make a small sensor that would detect a large object coming at me from behind at about 60mph while I'm moving forward at around 7mph. What kind of sensor would I use? I looked up the different types and I found Passive/active infrared, optic-based, piezoelectric, and ultrasonic. I tried to figure it out myself and my best guess is ultrasonic? Like what cars use to detect deer, they use "ultrasonic airflow sensors". Ideally the sensor would beep and get louder or faster as the object approaches. Would I use an arduino? I'm very new at this :/ Thanks for any help!

Topic by arrowstation   |  last reply


does anyone know of a good ultrasonic sound emitter i can make?

Working something that found in some old text to test a theory but need a nice small hand held design for a ultrasonic sound emitter where the frequencies can be altered by the turn of a knob can anyone help please direct me to a good link either here or to some other sight.

Question by maskofdarkness22   |  last reply


How do i connect my created device into my program?

I am creating an ultrasonic device which i want to interface into my program, how is it possible? please help me anyone..

Question by vpuato   |  last reply


Sonic data transmission?

This is just an idle thought, but I was reading a couple of ROV builds, and the one thing they all have in common is a tether - it's a fact of the world that very little in the way of radio signal can penetrate water. So... Could you send control signals to an ROV via sound or ultrasound?  Could beeps and clicks carry enough data, far enough, and clearly enough, to control an ROV? Even more fun, how much data could come back? Sensor readings? Images? Just throwing it out there for you to toy with, but it would be fun to have genuinely-remote control for this class of robot.

Topic by Kiteman   |  last reply


Hey everyone. Can I use this to make something like a ping ultrasonic sensor except for ir? Answered

Hey everyone. Can I use this to make something like a ping ultrasonic sensor except for ir? Or somehing like this.

Question by TOCO   |  last reply


Ultrasound 3D positioning

How would you use an array of ultrasonic sensors to determine the 3d position of an ultrasonic transmitter. Basically i want an ultrasound transmitter on my hand that gets picked up on an array of 5 or so receivers that outputs the position via usb.

Topic by redshirtdeath   |  last reply


Controlling 9 Micro Servos with Arduino & Ultrasonic Sensor

Hello! I'm new to Arduino and trying to build a series of moving cogs attached to micro servos, which are triggered by an Arduino controlled Ultrasonic Sensor. My code so far looks like this #include #define trigPin 12 #define echoPin 13 #define CONNECTED_SERVOS 9 // macro just adds two - the first servo is attached to digital pin 2, this gives us upto 12 servos - digital 2 to 13 #define SERVO_TO_PIN(x) (x+2) Servo myServos[CONNECTED_SERVOS]; Servo myservo; void setup() {   Serial.begin (9600);     pinMode(trigPin, OUTPUT);   pinMode(echoPin, INPUT);     // attach the servos   for(int nServo = 0;nServo < CONNECTED_SERVOS;nServo++)   {     myServos[nServo].attach(SERVO_TO_PIN(nServo));   }    } void loop() { int duration, distance,pos=0,i;   digitalWrite(trigPin, LOW);    delayMicroseconds(2);   digitalWrite(trigPin, HIGH);   delayMicroseconds(10);   digitalWrite(trigPin, LOW);   duration = pulseIn(echoPin, HIGH);   distance = (duration/2) / 29.1;    Serial.print(distance);    Serial.println(" cm");   for(int nServo = 0;nServo < CONNECTED_SERVOS;nServo++)   {     if (distance >0 && distance < 30)   {      myServos[nServo].write(180);   }   else{     myServos[nServo].write(180);   }      }          But it isn't really the code that I am having a problem with. I know that I need an external power supply for the 9 servos but I am having difficulty figuring out what is best. I have tried attaching a 9V battery to the power and ground lines of the servos and it hasn't quite supplied enough, only making them move a little when i get closer to the distance sensor, then jittering about a bit before completely stopping. I have got a Switching Power Supply plug that has an output of 12V which I can use and plug directly into the Arduino? I also have voltage regulators that have an output of 5V available. Could somebody recommend how to wire these supplies up for the servos? Any help would be much appreciated!  Thanks

Topic by j_olo   |  last reply


SENSOR- Ultrasonic HC-SR04 (Interfacing HC-SR04 with 8051)

Hi friends, I am doing a project based on obstacle detector. It is a outdoor project hence i choose to buy an ultrasonic sensor to work efficiently on both bright sun light as well as dark nights. Now my problem is i am not able to interface this sensor with my controller. Anyone please tell me what input i must give to trig input of that sensor and what kind of output i get form the echo pin. also tell me how can i interface this sensor with the AT89S52. i have attached the user manual which i downloaded from internet.  Please help me with your valuable comments, Thanks in advance.

Topic by knachuthan   |  last reply


How can I make a Burglar alarm using ultrasonic sensor with a microcontroller Zilog Z8? Answered

We were asked to construct  a burglar alarm using ultrasonic sensor with a micro controller Zilog Z8. It's our requirement for the Final term this semester. We also have difficulties in our documentation because it is in thesis format. I know that somebody can help us from Instructables. We definitely need documents so we can have ideas to be included in our documentation. Thank you so much. God bless. ^^,

Question by AljonSalvatore   |  last reply


Can you tell me the code for arduino robot that has HC-SR04 Ultrasonic sensor , L293D , IR receiver module and remote?

It is a arduino obstacle avoiding robot , that has arduino uno R3 , L293D motor driver , HC-SR04 ultrasonic sensor , IR remote and receiver module on 2wD chassis.

Question by KodakH1   |  last reply


how can i modify the circuit by replacing the LED and photo diode by using ultrasonic sensor? Answered

Please for any one who is capable of drawing a schematic diagram on how i can modify, and use ultrasonic sensor  as a transmitter and receiver for my circuit to work well. also i want it to operate without using micro-controller. 

Question by YallajevoM   |  last reply


How would I go about changing the frequency of the analogWrite() function in Arduino?

I am designing an ultrasonic parking sensor, and need to use the analogWrite() function to produce a 50% duty cycle PWM. I would ordinarily use the tone() function in this situation however, this is currently tied up with something else and noTone() cannot be called. The problem I am having is with the default frequency of the analogWrite() function aliasing occurs with my reading on the ultrasonic sensor and I receive values that are a factor of ten off what they should be. I have tested the sensor at a range of frequencies and it appears to work best at about 50 Hz. Any help would be greatly appreciated.

Question by Pash1987   |  last reply


arduino code nedded

HI, MY  NAME IS THIAGO IKEDA AND HERE IS MY FIRST "ASK" my english is VERY bad. well sorry anyway FIRST  i made this arduino tank (named ardutank) with ladyada motor shield and i used library and worked then i like WOW I SUPER GENIUS so i buy an HC-SR04(ULTRASONIC SENSOR) to put with ARDUTANK, and i used the library too but when i upload the code the ARDUTANK START make some wild noises. i dont know what to do to ARDUTANK work with the sensor obs: in first mode (with out ultrasonic sensor) one motor spins more fast than other, WHY? the bouth motors are the same motor. but when i put to HIM to RUN HE make lil curve. here is code WITH SENSOR PLEASE IGNORE THE RELE AND BUZER NEXT TO SENSOR // Adafruit Motor shield library // copyright Adafruit Industries LLC, 2009 // this code is public domain, enjoy! #include #include #define TRIGGER_PIN  12 #define ECHO_PIN     13 int distance; Ultrasonic ultrasonic(TRIGGER_PIN, ECHO_PIN); AF_DCMotor motor1(1); AF_DCMotor motor2(2); void setup() {   Serial.begin(9600);           // set up Serial library at 9600 bps   Serial.println("Motor test!");   // turn on motor   delay(10);   motor1.setSpeed(20);   motor2.setSpeed(20); motor2.run(RELEASE);   motor1.run(RELEASE); } void loop() {   uint8_t i;   float cmMsec, inMsec;   long microsec = ultrasonic.timing();   cmMsec = ultrasonic.convert(microsec, Ultrasonic::CM);   inMsec = ultrasonic.convert(microsec, Ultrasonic::IN);   Serial.print("tick");   motor1.run(FORWARD);   motor2.run(FORWARD);   if(distance<10) {    motor1.run(RELEASE);    motor2.run(RELEASE); } else {    motor1.run(FORWARD);   motor2.run(FORWARD); } }

Question by crazy_thiago   |  last reply



logging ESP8266 data of(BMP180+DHT22+Ublox GPS Neo 6m +hc04 ultrasonic sensor)

Hi instructables , i'm just starter in this filed i just need Sketch for logging ESP8266 data of(BMP180+DHT22+Ublox GPS Neo 6m +hc04 ultrasonic sensor) all data in separeted files  i found in Net GPS neo logging but for the authers no ..please if someone can help me i will be very thankful 

Topic by Slash09   |  last reply


I wan to Do A Gps Guided Rc Car controlled via 3g (web) with obstacle avoidance ?! Anyhelp !?

Hey Guys !! I Need Your Help my project is to do a Gps Guided Rc Car controlled via 3g (web) with obstacle avoidance + video streaming from the rc car to the web  I am Using Arduino UNO .. I will be glad if someone could help ?! Thanks in Advance 

Question by abedier   |  last reply


Distance between two electronic systems sensor for the Arduino

Hello. I've been thinking about this for months and haven't figured out how to do it... Don't be frightened by the wall of text, it's a VERY entertaining read! You'll fall down laughing! ______________ The basics: Imagine two systems: A and B. Both A and B use the Arduino as their "heart". I want A and B to know, at all times, the distance between them. The distance is 3-dimensional, ie, it doesn't matter if A is in front of B, if A is on top of B, etc. The distance ranges from about 10cm to 2m. It's not that strict, though. Something around that... The final project (which is not the sensor; the sensor is just a piece of it, just like the Arduino or an LED or a resistor) is a gift, so it has to be 'good-looking'. Because of that, the sensor has to be as inconspicuous as possible. Problem 1: Linear solutions can't be used, like Infrared LEDs or Ultrasonds. Besides being too linear (which makes sensing in 3 dimensions too hard and expensive because of the use of arrays of LEDs or sound generators), the only way (that I came up with) they could be used is this (because it can't be based on reflections): 1- A emits signal (IR modulation or Ultrasonic frequence) and starts timer (microcontroller function). 2- B receives signal. B waits 2 milliseconds. B emits signal (different from the signal emitted by A, so they don't get messed up). 3- A receives signal and stops the timer. A then calculates the distance through a simple formula. That's how A would know the distance between itself and B. B would do exactly the same thing to know the distance between itself and A, but with signals different from those used by A (so they wouldn't get messed up). This is infeasible because: Using IR, every millisecond (the smallest unit of time a general microcontroller can measure) is equivalent to 30,000,000cm (or 300,000km or 186,400 miles). Using sound, every millisecond is equivalent to 34cm (or 13.4 inches). With such a short distance range (10cm to 2m), 34cm is too much, which makes the sensor incredibly inaccurate. Problem 2: Using the sensor with the Arduino The sensor would have to output something to let the Arduino know the distance so that I could then do stuff like: If distance is between 0 and 20cm, do this. If distance is between 21 and 50cm, do that. If distance is 51 and 200cm, do that. Else do nothing. etc. :) Problem 3: It has to be simple (and cheap) I'm no programmer nor do I know a lot about electronics. I'm a simple hobbyist with the dream to finish this project, so it can't be overly complex. :) So, after reading this wall of text, what do you think I could use? Do you know any wireless technology that lets me do this? Oh, sorry about claiming it would be a fun read.. It was the only way I found to make you ACTUALLY read this. :p THANK YOU! :D

Question by pedrotome   |  last reply