Showing posts with label Design. Show all posts
Showing posts with label Design. Show all posts

Saturday, June 6, 2015

Quadcopter Project

Quadcopter

The quad, controller, and camera


Flight Control Board

The flight control board is based on FreeIMU and built onto an Arduino Mega 2560 running MultiWii. The main goals were to build a customizeable and affordable quadcopter using mainly open source hardware and software, and learn a bit about how it all works. Bugs and design issues seem to have been worked out now, so it looks like this will be the base design for my board. Video

Since it is all open source, adding additional custom components to control lights, sound, servos, etc. is about as easy as it gets. For anybody already familiar with Arduino, it's just a matter of  choosing what customizations to add.

The top picture on the right shows the simplicity of  the FC board, using only a few modules. A previous mock-up of the board was scrapped due to some simple design flaws. The current version attempts to address some of those problems:

a: Although the shield fits tight, secure mounting is a must, and nylon standoffs are used to secure the shield to the Arduino.

b: Here I am using a cheap, single sided prototyping board, but we'll see how long it lasts...

c: The first mock-up used the female header pins as shown on the right of the bottom pic, but they aren't made for Arduinos (too thin), and caused I2C errors and subsequent crashes. The header pins shown on the left are thicker and fit snug every time.

d: The GPS module was left out since GPS nav won't be something I'll be using right away.

The ESCs connect to pins exposed on the top of the board, which are hard to see since the angle of the bottom pic purposely hides my shoddy looking soldering work. The Arduino gets fastened to the frame using rubber mounts taken from broken CD/DVD players to minimize vibration.

Notes:

FC Board:
The board is intially based on a FreeIMU board as mentioned previously, and is actually pretty simple to build at this point, with only 3 modules. The HMC5883L magnetometer module is connected to the aux. I2C lines of the MPU-6050, and running on 3.3V. An APC220 module is connected to the fourth serial port (serial3), and a GPS module can go on serial2 or via I2C if desired. The best part of the flight controller and quadcopter is that it is all based on open source software and hardware, so customization and prototyping like this is actually possible without spending huge amounts of money or time.

FC Board/Arduino Mega Connections:
pin2: front motor
pin3: rear motor
pin5: right motor
pin6: left motor
pin14: APC220 RX pin
pin15: APC220 TX pin
pin16: GPS RX pin
pin17: GPS TX pin
pin18: MPU6050 interrupt
pin20: MPU6050 SDA (I2C)
pin21: MPU6050 SDL (I2C)
pinA0: Voltage divider (battery monitor)
MPU6050: Aux SDA to HMC5883L SDA
MPU6050: Aux SDL to HMC5883L SDL


Main Parts:
1x Turnigy Talon carbon fiber frame
4x Turnigy 20Amp MultiStar ESCs
1x Turnigy ESC programmer
4x NTM Prop Drive Series 28-26A 1200kv/250W Motors
2x Slow Fly 8045 propellers
2x Slow Fly 8045R propellers
1x 4000mAh 3S LiPo battery pack
1x Arduino Mega
1x GY-521 Gyro Module (MPU-6050
1x HMC5883L Magnetometer module 
1x APC220 serial data wireless transceiver
Uses Modified XBox controller for RC (previous post)


XBox Controller:
Prev post. Uses the MultiWii RCSerial protocol
Quad can easily be controled by a PC via RCSerial protocol and APC220 transceiver

Frame/Physical Assembly:

Since the controller and FC board are both custom made, I had to code and then debug the controller during flight in some cases, and had no failsafe at the time. The initial assembly of the central parts of the frame used all nylon bolts. This was to prevent damage to the frame and motors when big crashes happened, since parts would usually break away before breaking or bending much. It currently uses a combination of metal and nylon connectors to provide rigidity and allow for some give on big impacts. As can be seen in the picture above, I have also made my own motor mounts.
ESC Calibration:

One of the problems I ran into in some of the first flights was individual motors cutting out seemingly randomly. The quad uses 20A Turnigy MultiStar ESCs, and gives a choice between slow-down of motors, and hard cutoff when the voltage is low. This caused a bit of frustration since the motors would start cutting out when the voltage was low, regardless of the setting via programming card.

I was confused by the MultiWii calibration code at first since, according to the ESC manual, it would basically just set the programming of the ESCs to the LiPo battery setting, and that hardly seemed like 'calibration':

ESC Programming: 
a: Power ESCs on while receiving max throttle signal
b: These ESC will beep accordingly, move throttle to min to select what option to set in the programming 

The ESCs apparently use this interaction for calibration as well, and it made a big difference once I programmed them this way. The motors seemed to sound a bit smoother afterward, and they slow down nicely to force a landing once the battery is low.

Always remove your propellers before uncommenting this line in 'config.h':
#define ESC_CALIB_CANNOT_FLY 

Propeller Balancing:

Another important factor that was initially overlooked was propeller balancing. This made a big difference in the stability of the craft, as well as reducing vibrations. I followed this tutorial and had some good results on my first shot at it. Videos from the previous post show the vibration evident from unbalanced propellers, and a motor wire breaks in the second one, likely related to the vibration issues.

MultiWii Config and GUI:

The videos in the previous post were shot using the PID settings shown in the pic to the right and with the low-pass filter enabled for the MPU-6050 at 20Hz in 'config.h'. Higher values for the filter makes for 'tighter' controls, but is more susceptible to vibration and affects PID. Mitigating vibration issues should allow a higher setting. 

MultiWii Code:
Code base is MultiWii_dev_r1240
Uses slightly modified version, but can work with original:
  • Supports serial rc cmds with smaller payloads
  • Supports failsafe when using serial rc
  • Supports basic monitoring during flight via processing gui and existing transceiver (prev. post)
  • Still unsure whether to remove or work with test code to control a music player from alarms and controls, so left it in for now (alarm buzzer timing is changed)
  • Longer delay for ESC calibration code specific to MultiStar ESCs (see esc manual below)



Reference Material:
MultiWii - Code w/Modifications
MultiWii - Arduino Mega pin layout
MultiWii Wiki

Engineering Simulation Tools

Simulation Tool links

1). Keil software used to compile embedded-C code (for atmel 8051 family )
   feel free to implement the form,  

    click the below link to know how to use keil software  

2). ModelSim Tool used to simulate the VHDL programs   

    click here to see the modelsim video tutorial   
3). Atmel studo 6 tool to compile more atmel family controllers(ATmega series etc., ) 

    click here to see the atmel studio 6 video tutorial   
4).  Microchips MPLAB IDE tool to simulate the PIC controllers etc.,   

   click here to see the video tutorial   

5). Quartus II tool to simulate the Altera FPGAs   

      click here to see the video tutorial   

6).  Xilinx ISE Design Suit 13.4 to simulate Xilinx FPGAs   

    click here to see the video tutorial   

7). Proteus total circuit simulator for controller based circuits
      Proteus 7.4 here

     click here to see the video tutorial   
    

Thursday, December 12, 2013

IC 555 Timer Tester

IC 555 Timer Tester
Hasifnoor_Attasheri

This simple and easy-to-use gadget not only tests the IC 555 timer in all its basic configurations but also tests the functionality of each pin of the timer. Once a timer is declared fit by this gadget, it will function satisfactorily in whatever mode or configuration you may try it.

The two basic configurations in which a timer IC 555 can be used are the astable and the monostable modes of operation.

When the DPDT switch (S2) is in position 1-1, the timer under test automatically gets wired as a monostable multivibrator. In this case, the monoshot can be triggered by the microswitch (S1). The debouncing circuit constituted by the two NAND gates of IC1 (N1 and N2) produces a clean rectangular pulse when the microswitch is pressed. Resistor R3, capacitor C1 and diode D1 ensure that the trigger terminal of timer IC 555 (pin 2 is the trigger terminal) gets the desired positive-to-ground trigger pulse. This differentiator circuit also ensures that the width of the trigger pulse is less than the expected monoshot output pulse.
The monoshot output pulse width is a function of the series combination of resistor R8 and potentiometer VR2, and capacitor C4. When DPDT switch S2 is in position 2-2, the timer gets configured for the astable mode of operation. The output is a pulse train with the high time period determined by the series combination of resistors R8, potentiometer VR2, resistor R9 and capacitor C4, whereas the low time period is determined by resistor R9 and capacitor C4.

The reset terminal of timer IC (pin 4) should be tied to Vcc normally. More precisely, the voltage at pin 4 should be greater than 0.8V. A voltage less than that resets the output. Whether you have connected the timer in the monoshot or astable mode of operation, the output goes low the moment you bring the reset terminal below 0.8V.

The control terminal (pin 5) can be used to change the high time (‘on’ time) of the output pulse train in the astable mode and the output pulse width in the monoshot mode by applying an external voltage. This external voltage basically changes the reference voltage levels of the comparators inside the IC. The levels are set by three identical resistors of usually 5 kilo-ohms inside the IC connected from Vcc to ground, at 2/3Vcc for pin 5 and 1/3Vcc for pin 2. These levels can be changed by connecting an external resistor between pin 5 and ground. Resistor R10 and potentiometer VR3 have been connected for this purpose.

The pulse width in the monoshotmode is given by:
1.1×total charging resistance×charging capacitance

This expression is valid when there is no external resistor connected at pin 5. The pulse width can be reduced by connecting an external resistor.

The high and low time periods in the astable mode are:
High time period = 0.69×chargingresistance×charging capacitance
Low time period = 0.69×dischargeresistance×capacitance

Again the expressions are true with no external resistor at pin 5. The high time period can be made to decrease by connecting an external resistor between pin 5 and ground.

The circuit can thus be used to check:
1. The timer IC in astable configuration.
2. The timer IC in monostable configuration.
3. The capability of the reset terminal to override all functions and rest the output to low.
4. The function of the control terminal to change the ‘on’ or the ‘high’ time of the output waveform in astable mode of operation and the output pulse width in monostable mode of operation.

The circuit operates off a 9V battery, which makes the gadget portable. You can construct it easily on any general-purpose PCB along with the 8-pin socket.

To test an IC 555:
1. Insert it into the socket.
2. Set switch S2 in position 1-1.
3. Switch on the power supply by flipping switch S3 to ‘on’ position. Power-indicator LED (LED3) glows to indicate that the circuit is ready to test the IC timer.
4. If the IC is okay, LED1 glows because the IC is wired as a monoshot and in the absence of any trigger, its output is low.
5. Apply the trigger pulse by momentarily pressing switch S1. LED1 stops glowing and, in turn, LED2 glows. This confirms that the output of the monoshot has gone high. After the predetermined time period, LED2 goes off and LED1 again glows. Vary preset VR2 and trigger the monoshot again through switch S1. You will find that LED2 glows this time for a longer or a smaller time period depending upon whether you increased or decreased VR2 resistance.
6. For checking the reset function of the timer, trigger the monoshot again, and before the expected time is over, quickly decrease the potmeter VR1 resistance so as to bring the voltage at pin 4 below 0.8V. You will observe the output going low (indicated by glowing LED1 and extinguished LED2).
7. For checking the control function of the timer IC, set potmeter VR1 again in the maximum resistance position. Also set preset VR3 in the minimum resistance position. Trigger the monoshot using switch S1. You’ll observe its output going high for a time period that is much less than that determined from the series combination of R8 and VR2, and capacitor C4. In fact, for any fixed setting of this series combination, the output pulse width can be observed to vary for different values of potmeter VR3 resistance—by triggering the monoshot several times, once for each setting of VR3.
8. Now set the DPDT switch in position 2-2. LED1 and LED2 glow alternatively with the timing determined by the resistances in the charge and discharge paths. This means the timer IC is okay and wired in astable mode.
9. The functions of reset and control pins can be checked in astable configuration too in the same way as discussed above for the monoshot configuration.

Friday, February 3, 2012

Design and Test Stripboard Projects Using LochMaster

Design and Test Stripboard Projects Using LochMaster 

Loch master is yet another tool from ABACOM, the software provider who gave Sprint-Layout, sPlan, Sprint Layout, Frontdesigner, Profilab and many other tools for design and simulation of electronic circuits. Lochmaster is basically a developers tool for strip board projects. The latest version available for download is Lochmaster 3.0

What makes this unique?Loch master software allow users to design, document and simulate/test boards. The software is equiped with fuctions like auto generation of components list, connection test, large library of components & symbols. Also it provides an option to allow users to create custom components and extend the existing component library.

 The predefined bord layout is another attraction but the developer has the freedom to draw his own board specifications with the board editor integrated to this software. Under testing the designed circuit board, developer can identify the unwanted signal. Various design and print options are make this a unique stripboard tool.

Submitted By
Mohammed Hasif C
hasifnoor_Attasheri
Thank You
God Bless You

Submitted By
Mohammed Hasif C
hasifnoor_Attasheri
Thank You
God Bless You