background preloader

How to Use IR LED and Photodiode with Arduino

How to Use IR LED and Photodiode with Arduino
In this post I am going to show you how to use and program IR LED and Photodiode pair with Arduino to detect obstacles in a short range. Before going to do the project let us have a brief look at the IR LED and Photodiode. Photodiode is a light sensitive semi-conductor diode which converts the light energy into voltage or current based on the mode of operation. In general Photodiodes are operated in reverse bias condition. The clear Photodiode can detect visible and IR rays to limit the Photodiode to detect only IR rays a black cotting is applied to the glass of the Photodiode. IR LED and Photodiode Project: In this project I am going to show you How to use the IR LED and Photodiode pair to detect the obstacle in-fornt of it. Materials required: 1) Arduino 2) IR LED 3) Piezo buzzer 4) some Wires. Circuit diagram: How circuit works: Program : int pd=2; //Photodiode to digital pin 2 How program works: If you have any trouble related to this post then, express it in the comment box below.

Électronique en amateur Il y a quelques semaines, j'avais utilisé mon accéléromètre MMA7455 avec un Arduino. Grâce à une bibliothèque réalisée par Moritz Kemper, le processus s'était révélé relativement simple. Pour le raspberry Pi, je n'ai pas trouvé de bibliothèque python spécifique au MMA7455. Quelques articles m'ont servi de point de départ (en particulier celui-ci), mais j'ai dû apporter pas mal de modifications au script pour qu'il se comporte comme je le désirais. 1) Activation du protocole I2C D'abord, si ce n'est pas déjà fait, il faut activer l'I2C sur le Raspberry Pi. 2) Branchements du breakout MMA7455 J'espère que votre accéléromètre MMA7455 se trouve sur un breakout facile à brancher, comme celui qui est représenté sur la photo ci-contre. De plus, il faut alimenter notre accéléromètre en branchant sa pin VCC à une des pins de 3,3 V du Rasbperry Pi, et la pin GND de l'accéléromètre à une des pins GND du Raspberry Pi. 3) Programme en python

Test your sensors for line following robots - Site for electronics hobbyists and engineers There are two ways of making a line sensing/following robot, using a light dependent resistor(LDR) or Infrared(IR) LED. The fundamental logic behind a line sensing robot is that, a dark object reflects less light than a bright object, or we can also say, a dark object absorbs more light than a bright object. So, in a line following robot, we basically build a sensor that can detect the difference between a dark and a bright object, or say, a black line and a white surface. Before you fix the sensors onto your robot, you need to see if the sensors are really reflecting less light on black line and more light on white surface. Assemble your components in the following ways: a. Resistors connected to LDR: 1k Resistors connected to White LEDs: 220Ohm. You can get the source code for testing your sensors at the end of this post. For this circuit arrangement, remember that the LDRs should be slightly above the LEDs so that they get right level of reflection. b. How to connect a photo diode? Tips:

Development Team/Arduino There are different options to connect your arduino board to Sugar (trough sugar-capable activities) Squeak Thanks to the great work found on Gira We can download an squeak project and install it on our Sugar. #/bin/bash echo "Downloading.." echo "" curl -o Arduino.zip unzip Arduino.zip echo "Executing.." echo "" cd Arduino.7/ . Note that on an XO laptop you have to tweak some your Arduino.sh script in these or similar ways #! Installation and use procedure Having executed our initiation script we have an squeak project with essential particularities in order to run our Arduino. But first we have to connect our arduino board, this is done in the following way, 1) Connect the board to the USB port. 2) If the board doesn't have Firmata we have to upload it form Arduino IDE. 3) To find out the serial port to which the board belongs we can go to Tools->Serial Port of a list we can always find the following: /dev/ttyUSB0 /dev/ttyS0 Screenshots Source Code

How to build your own Quadcopter AutoPilot / Flight Controller Back to my home page Fig 1: 3DR Quadcopter Contents This article will walk you through building your own controller whilst teaching you the details of how it works. Fig 2: ArduPilot hardware The first shortcut is your choice of hardware. The ArduPilot project is sponsored by 3D Robotics - this means that they build the hardware and sell it for a small profit, and then feed some of this profit back to the community. In this article, I am going to assume you have the ArduPilot hardware which is essentially an Arduino with attached sensors. Fig 3: Propellor Configuration I'm also going to assume you have some experience with the arduino - or atleast with C/C++. The HAL library is made up from several components: WHAT TO DOWNLOAD: You'll need to download the ArduPilot version of the Arduino IDE. Fig 4: ArduPilot Arduino IDE Setup Back to top RC Radios have several outputs, one for each channel/stick/switch/knob. Fig 5: Radio Signals It is used as: In setup(), let's enable the outputs: In setup():

Arduino ATmega328 Hardcore Arduino ATmega328 - Hardcore Ok, you've completed your prototype using an Arduino Uno board, perhaps using a shield or a breadboard for any additional components, but now you want to finalise your design and construct it using your own pcb. Well, that is fairly straightforward, as we have made a complete kit of essential parts available for the ATMega328 micro (click here). The kit includes the following items (depending on which bootloader chip 16MHz or 8MHz) ATMega328 complete with Arduino Bootloader already installed 8 or 16MHz Crystal and capacitors 3.3V or 5V Voltage Regulator and 47uF capacitor PCB mount reset switch and 10K pullup resistor 0.1uF capacitor for self-reset LED and resistor You can program the processor directly from the Arduino IDE. Just connect the ATMega328 RX (pin 2) to TX on the breakout board, the ATMega328 TX (pin 3) to RX on the breakout board, connect the 0V and you are connected Programming the ATmega328

Alternative Arduino Interfaces Overviewing the Options Arduino is awesome! It’s our go-to electronics education platform, and it’s our top choice for rapid prototyping, but it isn’t for everyone. Maybe it’s the cryptic language, or the Java-based IDE, or maybe it’s just the teal window border – regardless of your reasoning, if you’re trying to escape the Arduino IDE, here are a few alternatives we’d like to share. The Arduino alternatives covered in this tutorial range from simple, introductory graphical programming to web-based Arduino interfaces for your web browser. ArduBlock – A Visual Programming Arduino Extension ArduBlock is a graphical programming add-on to the default Arduino IDE. ArduBlock is a perfect interface if you’re just getting into programming, electronics, or Arduino. Minibloq – Visual Programming Standalone Software In the same vein as ArduBlock, Minibloq is a graphical programming environment where groups of blocks are stacked on top of each other to create your program. …and Beyond ArduBlock Minibloq

Chicoree Installing an Arduino Library What's a Library? Arduino libraries take a complex task and boil it down to simple to use functions. Arduino users have written lots of exciting add-ons for Arduino. Capacitive touch sensing is a very popular interface. *sOut &= ~sBit; // set Send Pin Register low *rReg &= ~rBit; // set receivePin to input *rOut &= ~rBit; // set receivePin Register low to make sure pullups are off *rReg |= rBit; // set pin to OUTPUT - pin is now LOW AND OUTPUT *rReg &= ~rBit; // set pin to INPUT *sOut |= sBit; // set send Pin High interrupts(); // enable interrupts while ( ! All that code can be replaced with a much easier to use and understand statement such as: senseReading = myCapPad.capacitiveSensor(30); myCapPad.capacitiveSensor() takes care of all the heavy lifting and the senseReading variable contains the value sensed from our capacitive pad. There are thousands of libraries out there! Suggested Reading Installing a Library - Windows We are going to use the Capacitive Sense library for this example.

Piloter des dispositifs sans fil Électronique | Informatique Niveau: Avancé Jonathan Schemoul Montage avec la Leonardo Partie 1: Réception en 433 MHz Vous avez sans doute entendu parler ou vu des détecteurs de fumée, d'ouverture de porte, des télécommandes, des prises murales, etc. sans fil ? Que ce soit les modèles chers que vous trouvez en magasin ou les modèles chinois bon marché, la plupart, s'ils ne sont pas avancés, utilisent la bande de fréquence 433 MHz (n'essayez pas ceux en 315, ils sont illégaux en France). En ce qui concerne ces capteurs en 433 MHz, il se trouve qu'ils utilisent pour la plupart un protocole très simple, introduit par des circuits intégrés chinois à bas coût, les PT2262 côté émission et les PT2272 côté réception (d'autres plus exotiques comme les SC5262 / SC5272, HX2262 / HX2272, EV1527, RT1527, FP1527 ou encore HS1527 peuvent être trouvés et fonctionneront aussi). Regardons de plus près ce que nous avons à disposition : Montage détaillé Niveau détecteurs : Installation de la librairie RC Switch

Related: