Pages Menu
TwitterRssFacebook
Categories Menu

Blogroll

How to Turn Your Raspberry Pi Into a Development Server

Posted by on Jul 11, 2016 in IoT, Raspberry Pi, Single Board Computers | 1 comment

How to Turn Your Raspberry Pi Into a Development Server

The Raspberry Pi is a little computer that you can get for as low as US $35 and on which you can run many different types of software and build many different projects. In this article, I’m going to guide you through the process of setting it up as a home development server and deploying a full-stack JavaScript application that you can access from outside your network. This is great for setting up your own remote digital workspace, or simply to have control over the hardware you use for development. What Do You Need? In February 2015, the second generation Raspberry Pi was released with more memory and CPU power. This tutorial will also work fine on the first generation model (in fact, this is what I am using), but if you don’t have one yet, you will be better off buying the latest Raspberry Pi 2 Model B from one of the distributors. In addition to the board itself, you will need: A Micro USB charger An Ethernet cable A microSD card (minimum 8GB, and cards up to 32GB seem to work fine) These will also come in handy during the initial setup: A USB keyboard An HDMI cable and monitor The Raspberry Pi Operating System: Raspbian Installing an operating system onto a Raspberry Pi is simple. First, using your computer, install the boot image onto a microSD card. Then simply insert the card into the Raspberry Pi, and boot from there. Raspbian is a Linux distribution ported from Debian 7.0 (Wheezy), and is the official OS for Raspbery Pi optimized for the device’s artchitecture. While there are other options for running your favorite OS on the Pi, we’ll use Raspbian because of its simplicity. To install Raspbian, head to the official download page and download the zip file with the latest Raspbian version. Then, insert the microSD card into your computer’s SD card slot or adapter. Depending on your computer’s operating system, follow the instructions provided on Raspberry’s website for Linux, Mac OS, orWindows. Once the process is finished, eject the SD card from your computer and insert it into the Raspberry Pi. Connect the Raspberry Pi to your router using the Ethernet cable, and plug in the Micro USB charger, which will start the Raspberry Pi booting. For the initial configuration there are two options: If you have a USB keyboard and an HDMI monitor, you can plug them into the Raspberry Pi for the initial setup. Your Pi should recognize these devices as soon as they are plugged in. The first time the Pi boots, it will automatically run raspi-config. After the first boot, you will need to run sudo raspi-config yourself in order to configure the device. If you don’t have them, you can connect to your Raspberry Pi while it is on using SSH: First, you need to find the IP address of your Raspberry Pi in your local network. This can be done byconnecting to your router’s admin page, or by using a network tool like nmap. Once you have the device’s IP address, connect to it using SSH from your terminal (or through Putty if you’re using Windows). The default user is pi, and the default password is raspberry. So, for example, if the IP address is 192.168.1.16, run ssh pi@192.168.1.16...

read more

Getting Started with ESP8266 WiFi Module

Posted by on May 6, 2016 in Expressif ESP8266, Featured, Getting Started, IoT, Microcontrollers | 19 comments

Getting Started with ESP8266 WiFi Module

This is an introductory post on getting started with ESP8266 WiFi Module/Microcontroller used in IoT applications. The purpose of this post is to get you up and running with this device using the Sparkfun Thing board and Arduino IDE. Once set up, in the next post we will learn how to connect it to the internet and stream sensor data to the cloud. Contents The ESP8266 WiFi Module + Microcontroller ESP8266 – Usage Modes ESP8266 as a WiFi Module ESP8266 as a Standalone Microcontroller + WiFi The Sparkfun ESP8266 Thing ESP8266 + Arduino = <3 Setting up Arduino for use with ESP8266 – Step 1, 2, 3 Hello World – LED Blinky Alternate Board Setup as Generic Module Summary The ESP8266 WiFi Module + Microcontroller Yes, you read it right – a low power 32-bit microcontroller with an embedded WiFi module on the same chip. That’s amazing! This tiny device can now connect almost any device to the internet. You know what’s more amazing? It costs just $2! Want even more? It is Arduino compatible! This is like a maker’s heaven. Read the datasheet to know how powerful it is! Just imagine the possibilities. You can now send sensor data directly from your device to the cloud without sending it through a local host. Take the following two scenarios for instance. Scenario 1: You have a local host (say a Raspberry Pi) connected to the internet. That’s it – no other device has internet connection. Say if your fridge wants to talk to the internet, then it needs to connect to your local host first, which then sends that data to the internet. What a pain! Scenario 2: Everything remains the same as in scenario 1, except that we use the ESP8266 to connect the fridge to the internet. Now your fridge can directly talk to the internet without the need for a local host. Amazing! ESP8266 – Usage Modes The ESP8266 can be used in two ways: ESP8266 as a WiFi Module Here all the ESP8266 does is to provide internet connectivity to an already existing platform. Say you could connect an Arduino (or any other microcontroller/processor) to the internet using ESP8266 as a WiFi Module. So basically here it acts as a serial to WiFi converter. ESP8266 as a Standalone Microcontroller + WiFi Or you could get rid of the Arduino completely and replace it with the ESP8266 module and run your application code on it. Now this does has limitations – the ESP8266 doesn’t has as many peripherals as the Arduino, so it can only be used for smaller applications. But it works perfectly fine when all it needs to do is to send data from a bunch of sensors to the internet. You can also run a web server on the ESP8266 that can listen to incoming connections and serve web pages. We will be using ESP8266 in standalone mode for this post. Once you get an idea of how to program it, you can use it the way you like, doesn’t really matter. The Sparkfun ESP8266 Thing But first you need the module! You can either get the cheap $2 module directly, or get a development board offering more functionality like NodeMCU, Adafruit HUZZAH, or Sparkfun Thing. We will be using SparFun ESP8266 Thing board for...

read more

Using Microchip MPLAB Xpress IDE and Evaluation Board

Posted by on Mar 24, 2016 in Featured, Getting Started, Microchip PIC, Microcontrollers | 1 comment

Using Microchip MPLAB Xpress IDE and Evaluation Board

Microchip recently launched its new MPLAB Xpress cloud-based IDE and also a supplemental $10 Xpress development board. I was able to get my hands onto one of the boards (thanks Microchip). So here’s a short post on what it is and how to use it. Contents Cloud is here! The MPLAB Xpress IDE The MPLAB Xpress Development Board Hello World – The LED Blinky Step 1: Create New Project Step 2: Add main Source File Step 3: Write Code! Step 4: Build Project Step 5: Download Executable Step 6: Transfer Executable to Target Board Step 6a: Transfer Executable to Target Board via External Programming Tool Step 7: Enjoy! Summary Cloud is here! Cloud based tools are becoming more and more popular these days because.. well.. it’s 2016 and cloud’s everywhere – from Dropbox to Google Drive to servers and databases. So much that I don’t have a single byte of data stored on my computer locally. All my documents/files are on Google Drive, and all my code is in either Github or AWS or other cloud based tools. The reason cloud has become so popular is because of its storage and performance. Clearly the cloud servers have terabytes of storage available (you gotta pay for it though) and have much more powerful processors with greater memory available. So why should I use my own computer for anything? There’s an exception for security though – cuz here’s a truth that you should know (get it on stickermule): So why don’t we use cloud to write and compile our code? We have been doing this historically by logging into remote servers and executing code, but there wasn’t any GUI based IDE around it and using vim would be a pain in the neck. Enter cloud IDEs. They are becoming quite popular these days. Take Cloud9 for example which allows you create a fully functional Linux virtual machine and an IDE to edit and manage the project right in your browser. Such IDEs can compile and run your code in the browser itself (actually the virtual machine). And you skip the hassle of installing/updating bulky IDEs on your computer like Visual Studio, Xcode, etc. But what happens in the case of a hardware project is that you can’t run the executable on the online virtual machine instance – you can simulate it, but not run it. Somehow you need to get that executable onto the hardware you’re working with. Just because there’s the hardware connected, the online virtual machine running the cloud IDE cannot talk to it directly – which could be challenging especially while hardware testing and debugging. There are many ways to do it (like installing a browser plugin, using software USB bridges, or downloading the code and flashing it using traditional methods). The MPLAB Xpress IDE The MPLAB Xpress IDE is Microchip’s cloud based IDE to program 8-bit PIC microcontrollers (16-bit and 32-bit functionality to be added by the end of 2016 as per Microchip’s website). The IDE lets you write code, create/manage projects, and build executables. There’s more – like browsing code examples, connecting to forums for community support, etc. And all of this without installing/updating any kind of software/toolchain on your computer. You don’t even need a hardware to get started with it. Neat. You can also connect a hardware programming tool like...

read more

Setting up AVR-GCC Toolchain on Linux and Mac OS X

Posted by on Jun 14, 2015 in Atmel AVR, Microcontrollers | 41 comments

Setting up AVR-GCC Toolchain on Linux and Mac OS X

Windows users have been enjoying various awesome tools to help with their AVR development process like the Atmel Studio, Codevision AVR, WinAVR, IAR Embedded Workbench, etc. This doesn’t mean that Mac and Linux users are at any unfair advantage. The avr-gcc toolchain supports Unix based OS like Linux and Mac OS X inherently. In this post I will show how to install the avr-gcc toolchain and avrdude on Mac OS X and Linux. If you are using a Mac and want to save the trouble of going through these steps, simply install CrossPack for AVR Development and follow the instructions in the manual. I might go over it sometime in future though. However if you really want to learn how to set up a cross-compiler, write Makefiles and use command line tools to get things done, I highly recommend doing the following steps. And trust me, they are pretty straightforward. Step 1: Install Homebrew (Mac OS X only) Step 2: Install avr-gcc toolchain Step 3: Install avrdude Step 4: Test the toolchain Busy and just want to get s#!t done? Read the summary! Step 1: Install Homebrew (Mac OS X only) This step is not required for Linux users since almost all Linux distribution comes with a package manager. Homebrew is the new super-awesome package manager for Mac OS X. Install it by typing (or pasting) the following in terminal: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Step 2: Install avr-gcc toolchain Mac OS X First tap the repository: brew tap osx-cross/avr Then install the latest version of avr-libc (version 4.9.2 at the time of writing): brew install avr-libc This will pull avr-binutils and avr-gcc along with it as well. The second steps takes a little while to install everything, so go get yourself some tea in the meantime. The Homebrew repository doesn’t has the avr-gdb formulae yet. If you need the avr-gdb debugger, go for the AVR CrossPack. Linux The following steps are for Debian/Ubuntu Linux. For other Linux distributions, please install read this. It is usually a good idea to update all the packages you already have installed. sudo apt-get update sudo apt-get upgrade all Then install the required packages. sudo apt-get install gcc-avr binutils-avr avr-libc You can also install gdb-avr is you like. It is useful for in-system debugging/emulation. sudo apt-get install gdb-avr Once done, type avr- in the terminal and press tab twice (do not hit enter). You should be able to see all the tools installed for you. Step 3: Install avrdude AVR-GCC is a toolchain that will help you with the software development process, but doesn’t do anything about burning the final executable (the hex file) to the microcontroller. For that we need to install AVR Downloader UploaDEr (avrdude). Mac OS X We will again use Homebrew to install it. brew install avrdude --with-usb Linux The following steps are for Debian/Ubuntu Linux. For other Linux distributions, please install read this. sudo apt-get install avrdude This should be pretty quick. Once installed, type avrdude -v in the terminal to check if it is installed properly. Step 4: Test the toolchain That’s all we need for now. Let’s test whether it works or not. I have used the LED blinking code called led.c for ATmega32 for demonstration. Refer to this post to understand what it does. Once the tools are installed no matter how, everything from here remains...

read more

Raspberry Pi – Headless Setup

Posted by on Apr 5, 2015 in e-Linux, Featured, Getting Started, Raspberry Pi, Single Board Computers | 4 comments

Raspberry Pi – Headless Setup

So you got your hands on your Raspberry Pi and booted it up. Great! But what if you don’t have access to a TV/monitor and keyboard/mouse all the time? But hey, you always keep your laptop/computer around. Wouldn’t it be great if you could use your laptop’s screen, keyboard and mouse to control your Raspberry Pi? Well.. read on! The method discussed here is one of the simplest ways to get started. It uses SSH with X11 forwarding to display your RPi’s desktop on your computer screen! NOTE: From now on, I have used the terms RPi and Raspberry Pi interchangeably. Steps Involved Whether you’re using a Windows, Mac or Linux computer, the basic steps involved remain the same. Step 1 – Connect your RPi to the network Step 2 – Determine the IP address of your RPi Step 3 – SSH into your RPi with X11 forwarding Step 4 – Launch X session There are two ways to display the desktop environment – X11 forwarding and VNC. Whereas VNC launches an entire desktop session, X11 is capable of launching individual application windows. I almost always use X11 since it is light and doesn’t require a separate server running on the RPi (unless you actually start one yourself), but it totally depends on you which one to use. We will learn about X11 forwarding in this post. VNC will be discussed in future post. Step 1: Connecting RPi to the network The idea behind this approach is that your RPi and your computer need to be connected to the same network. There are two ways to do this. Method 1 Connect your RPi to the same network your computer is connected to. This means hooking up your RPi to your modem/router. Be aware that this will connect your RPi to the internet. This can achieved using either Ethernet or Wi-Fi. We have covered Ethernet connection in this post. Connecting your RPi to the network using Wi-Fi requires a separate Wi-Fi dongle and will be covered in a future post. Method 2 If you don’t have access to your router or if you can’t connect to your router due to encryption/security issues, then you might need to create your own LAN network between your computer and your RPi. Simply hook your RPi with your computer with an Ethernet cable. Unless you explicitly share your computer’s network with your RPi, there will be no internet connection available to your RPi. Step 2 – Determining IP Address Once your RPi is connected to the network, it will have an IP address assigned to it. You can make the IP static (IP remains same every time you connect) or dynamic (IP changes every time you connect). You need to have dynamic IP for the server in order to connect to the internet. Depending upon the situation, you might need to configure RPi to use static IP address. If you are using static IP address for your RPi, then skip to the next step (step 3). Since you don’t know the IP address of your RPi (dynamic), the idea is to scan all the IP addresses in the range that your router/gateway corresponds to. If you are using a Windows computer, type the following: ipconfig On a Mac/Linux machine, type the following: ifconfig The things that you’ll be searching for...

read more

Guest Article: The Analog Voltmeter Clock

Posted by on Dec 17, 2014 in Atmel AVR, Guest Articles, Microcontrollers | 6 comments

Guest Article: The Analog Voltmeter Clock

Today’s guest post is by Sam Feller, creator of the Model AWK-105 Analog Voltmeter Clock, live now on Kickstarter (until Jan 14, 2015). The Clock is based around an ATtiny microcontroller and gets into some serious power optimization to run off an AA battery. Power Saving on the ATtiny One of the big design goals for the Analog Voltmeter Clock project was to have a stand alone desk clock that could run off battery power. The two analog meters themselves draw an average of 100uA, so trying to stretch to 6-12 months off a single AA battery (approx 2300mAh) meant being as efficient as possible with the AVR ATtiny44 that controls the device. Low Hanging Fruit The low hanging fruit of power saving is to keep the CPU in sleep mode as much as possible. The ATtiny has the ability to run timer registers in hardware while the CPU is off. Taking advantage of this, one set of registers is actually able to generate PWM signals to drive the clock display meters while the CPU is sleeping! The other timer register generates interrupts to wake the CPU every second to run the logic that counts the time and adjusts the displays. Then the CPU goes back to sleep until the next interrupt. Lower and Slower The next place to look for simple power savings was the supply voltage and clock frequency of the chip. We use a boost converter to get a consistent 2.0V supply voltage from the battery (which is subject to drop as it discharge), and we turned off the internal clock, which comes from the factory at a default 8Mhz in favor of an external clock oscillator at 32.768 Khz. Running at lower voltages and speeds is more power efficient. Reading the Notes At this point, we had to start reading through the design notes (that book length .pdf document) from Atmel to look for more ways to save power. We started turning off any peripherals that weren’t in use… the UART, the AtoD converter, all of it was turned off by flipping bits in register settings. Being a Little Clever The two control knobs of the Clock were implemented with a quadrature encoder (for relative motion inputs to adjust the time) and a potentiometer (for absolute motion inputs to pick between time keeping and calibration modes). The quadrature encoder can generate interrupts, which is great in terms of power efficiency, but the potentiometer needs to be polled. To save power, the top voltage rail of the potentiometer resister divider network is actually powered by a pin from the microcontroller. The pin is turned on when the timer generated interrupts wakeup the CPU and turned off before it goes back to sleep. Furthermore, the AtoD converter that reads the voltage from the potentiometer is actually turned on and off as well! This was the best compromise to stay power efficient while keeping the potentiometer control knob that we liked. Blog, Git and Website If you want some more technical details and information, check out my blog and view the code at my git repository. Swinging by my website would be a cool idea too! Conclusion and Thanks! One of the great things about Arduino is how simple it can make programming a microcontroller by hiding a lot...

read more

PCB Design using EAGLE – Part 3: Using the EAGLE Layout Editor

Posted by on Aug 5, 2014 in Electronics | 3 comments

PCB Design using EAGLE – Part 3: Using the EAGLE Layout Editor

So far in our EAGLE tutorial series we discussed about the software environment and the schematic editor. Next in line is how to create a board layout from the schematic we just created using the layout editor. This is a relatively simple step since EAGLE links your layout file and the schematic file together and automatically includes the components in the board layout. Your task is to arrange them on the board appropriately, route the traces (make electrical connections) and add text/image on the board if you want. And if you use the EAGLE’s autorouter feature, all you need to do is to make it look pretty! Even though it might sound simple, it actually isn’t! For simple circuits, that’s fine, but as the complexity of the circuit increases, and as the number of layers in your PCB increases, the layout becomes more and more mind-boggling and will require your complete attention! There are some design principles and specifications one needs to keep in mind as well which is out of the scope of this post and will be posted separately. This post simply deals with the various tools that EAGLE has to offer. Contents Introduction Parts of the Layout Editor Board Dimension Tools Let’s Design – Step 1, Step 2, Step 3 Introduction Since we are using the free version of the EAGLE software we are going to design a single layer board. We are also going to connect the components manually without using the auto-router. Autorouter is a feature of EAGLE where the software creates the traces connecting the components automatically. The board layout from the schematic is just a click away. Simply click the board button in the menu bar of the schematic layout editor as shown below. Once you click the button, the board layout editor opens up with all the components already added. This is how it looks like– Parts of the Layout Editor The layout editor’s workspace is quite similar to the schematic editor’s workspace like the grid, command line, etc. This saves us from discussing the same concepts again. Only the new and required tools and areas are explained. Board Dimension Board dimension is the actual size of the board which is the big white rectangle visible in the black editor space. Anything outside it will not be produced or included in the board layout. You can change the dimension by using the move tool. When you transit from the schematic to the layout editor all your components are automatically placed by the software outside the board. You can see it on the bottom left in the above image. It is zoomed in to explain further. In the zoomed in image you can see the component package design like the Dual In-line Package of the op-amp. The yellow lines, called the “air wires”, represent the connection between the components that you defined in the schematic. They are not actual connections and are for the designer’s reference only so that the components can be arranged as compact as possible in order to get a smaller board size. Tools Route: The route tool is used to draw traces in between the components. A trace is an electrical connection on a PCB. They are the lines that you usually see on a finished PCB. Rip-Up: Made a mistake while using the route tool?...

read more

Using the Raspberry Pi GPIO with Python

Posted by on Jul 25, 2014 in Raspberry Pi, Single Board Computers | 34 comments

Using the Raspberry Pi GPIO with Python

So you got your Raspberry Pi, installed an OS and using it just like your computer. Great! Now what? You didn’t buy a Raspberry Pi just to replace your computer, did you? Well, Raspberry Pi can do a lot more… much more than your computer can do! Did you notice that there are lots of tiny little pins on one corner of your RPi? These are called “General Purpose Input Output” pins (or GPIO pins). These pins allow your RPi to be connected to the external world. Raspberry Pi Models A and B have 26 pins (17 GPIO) whereas the models B+ and B2 come with 40 pins (26 GPIO). The models B+ and B2 are pin compatible with models A and B. The easiest way to control these pins is to use the RPi.GPIO Python library. The library comes pre-installed with the latest Raspbian OS. In any case, we’ll learn how to install the library, just in case you find it missing. After this post, you should be able to perform simple I/O operations using your RPi’s GPIO pins. Contents Raspberry Pi Pin Configuration The RPi.GPIO Python Library Installation Hello World with Raspberry Pi – LED Blinky A little background Circuit Using RPi.GPIO Library Timing Considerations Let’s Code! Video A Level-up: Reading Inputs Algorithm Let’s Code! Test: Design a Counter What now? Summary Raspberry Pi Pin Configuration As mentioned earlier, RPi models A/B and B+ are pin compatible. The following image (source raspberrypi-spy.co.uk) shows the pin layout of models A/B (rev 2) and B+. Model B had two revisions in which the pin configuration changed a little. The RPi model B consists of pins 1 through 26, of which only 17 of them can be used as GPIO. The remaining pins consist of power supply (5v and 3.3v), ground and serial pins. The RPi model B+ consists of all the pins shown above, out of which 26 can be used as GPIO. The labels mentioned on the left and right of the pins refer to the pin numbers on the BCM2835 CPU. For instance, pin GPIO16 of BCM2835 CPU is connected to pin 36 of RPi B+. Makes sense? What difference does it make to you – we’ll see in a while! :) The RPi.GPIO Python Library Now let’s get to the point. In order to control the GPIO pins of the RPi, we’ll use the RPi.GPIO Python library. Starting version 0.5.6, the library has support for RPi model B+ as well. While the library is the best way to access and control the GPIO pins, it still lacks support for SPI, I2C, hardware PWM and serial functionality, which are planned to be added (this is with respect to version 0.5.6. In future, this might change). This is a really simple library which allows you to read to and write from any GPIO pin by various means (like polling, triggers, events, etc). In this post, we’ll discuss the polling method (don’t worry about the name, we’ll deal with it later. The concept is rather simple), whereas I’ll deal with the other methods in my next post. Installation Method 1 – Install from Repositories The RPi.GPIO library comes pre-installed with the latest version of Raspbian. In case it doesn’t, all you need to do is to install the latest version from the repositories...

read more

Getting Started with Raspberry Pi

Posted by on Jul 21, 2014 in Getting Started, Raspberry Pi, Single Board Computers | 14 comments

Getting Started with Raspberry Pi

So I have had Raspberry Pi for around three years now, but I never had a chance to write something about it. Now that the Raspberry Pi Model B+ and Raspberry Pi 2 Model B are released, I thought I should have done more justice to the one I have, and here it comes! I am using Raspberry Pi Model B for this post, but it should be good for any model. And before you start thinking that this is an obsolete tutorial, please note that the Raspberry Pi Foundation will keep Model B in production as long as there’s a demand for it. This is meant to continue to support the industrial customers. A brief introduction to Raspberry Pi (henceforth abbreviated as RPi) can be found here. The first thing that you would want to do with your RPi is to install and run an operating system (OS) on it. But even before that, you might as well know how it should be connected. Check out this cool video from Raspberry Pi’s website. Contents Things you’ll need Using NOOBS to Install OS Manual Installation of OS Images Windows Linux/Mac Unix File System Setting up your Raspberry Pi First Boot Starting Desktop Environment Opening raspi-config Shutting Down Summary Things you’ll need Things you’ll need in this tutorial are: Raspberry Pi (Model A, B or B+) – any model will work for this. Micro-USB adapter and cable – to power up the RPi. The power adapter should be able to provide at least 5 volts 750 mA current. The RPi is rated a minimum of 750 mA, but if you intend to hook up power consuming devices to the USB ports (like keyboard, mouse), I would suggest you to go for at least 1 A, whereas 2 A is recommended. You can go for your phone’s charger as well. I am using my HTC One’s charger rated at 5 volts 2 amps. SD card (for Models A and B) – at least 4 GB (8 GB or more recommended, up to 32 GB) to install and store the OS image. MicroSD card (for Model B+) – at least 4 GB (8 GB or more recommended, up to 32 GB) to install and store the OS image. Ethernet cable – an RJ-45 10/100 CAT5e LAN cable for internet connection. This is needed if you are going for network-based NOOBS installation. Otherwise it is not needed for this tutorial, but it is recommended. You’ll need the following things for this tutorial, but they are optional for all the future posts. HDMI (to HDMI/DVI) cable – this is to connect a display device (like monitor, TV, TFT/LCD screens). You must not forget that RPi is a computer after all, and computers need a display device. RCA analog cable – this is to be used only if you wish to connect your “old” home TV to your RPi. Keyboard and mouse – to connect to your RPi computer. Try to go for smaller ones that consume less power. SD/MicroSD card reader – to connect SD card to your computer to install the OS image into it. These days many computers come with one such already built in, so check it out first. Once you install your OS, you wouldn’t need it again. Things that are optional are: Powered USB hub – in...

read more

PCB Design using EAGLE – Part 2: Using the EAGLE Schematic Editor

Posted by on Jul 12, 2014 in Electronics | 7 comments

PCB Design using EAGLE – Part 2: Using the EAGLE Schematic Editor

Welcome to the next roll out of tutorial regarding PCB design using Cadsoft EAGLE. This tutorial will mainly focus on the schematic editor of the EAGLE design package. If you are new to EAGLE or PCB design check out our previous tutorial which introduces them in brief. It is recommended that you read it before proceeding ahead with this tutorial. Contents Getting Started Tour of the Schematic Workspace Sections of the Schematic Editor Tool Bar Constructing Schematic of IR Sensor Breakout Board Step 1 – Select and Add your Components Step 2 – Arrange and Name your Components Step 3 – Make Connections Step 4 – Check your Circuit Step 5 – Export your Schematic (Optional) Summary Getting Started To make the learning process easier we are going to design a simple infra-red proximity sensor breakout board. This circuit will be worked on right from the schematics to the stage where it will be ready for production/printing. Moving on with the tutorial, the first step is getting familiarized with creating schematic files in your project. Having created your project folder in the control panel, you can create a schematic by right clicking on an active project > New > Schematic. A new schematic window will open. Tour of the Schematic Workspace Below is an image of how the schematic editor looks. Sections of the Schematic Editor Tool Box: The tool box in eagle schematic editor is feature rich. It consists of a number of useful tools for designing schematics. Tool Specific Options: Some tools have their specific settings and options that you can meddle with. These are displayed above the command line once you have selected the tool. Command Line: Since EAGLE also runs on Linux, it can also be operated as a command driven software. In addition to using the GUI, you can also type in commands in this space to select tools, change settings, etc. If you are faster at typing than moving the mouse, you can use this to select tools using specific commands. Once you get used to it, you’ll realize that it is actually faster than using your mouse. However, for the purposes of this tutorial, we will not deal with this (we have your sympathies :) ) Sheet Display: A schematic file in EAGLE can hold up to 99 schematic sheets. You can summon new sheets by right clicking in the space and clicking on New. You can also right click on sheets to write descriptions. Workspace: This is the area where you will place your components and shape up your schematic. Grid Size and Coordinate Display: Every component in EAGLE has an origin and they can only be placed on a specified grid in the workspace. Grid size refers to the minimum distance apart that you can move/place any component. This is useful to keep your components well placed and organized, otherwise they would be floating around somewhere in the schematic. If it doesn’t make sense now, wait until you experience it! The current grid size is displayed in this area. The coordinate of the origin of the currently selected object is also displayed in parenthesis. This coordinate is calculate from the origin of the schematic, which is on the bottom left of the workspace. After getting acquainted with the schematic environment, next up is the description of frequently...

read more