This week the exercise was about documenting the progress of the project and as i am making a drone as my final project, i have faced lot of difficulties in order to make the drone fly. Here is the link to see the details NOTE: Intially i have saterted this project as a group project with Aldo Sollazzo but now its an individual project.
I have started with making my main electronic board; fabIMU. fabIMU is basically An inertial measurement unit, or IMU, is an electronic device that measures and reports on a craft's velocity, orientation, and gravitational forces, using a combination of accelerometers and gyroscopes, sometimes also magnetometers. IMUs are typically used to maneuver aircraft, including unmanned aerial vehicles (UAVs), among many others, and spacecraft, including satellites and landers. Recent developments allow for the production of IMU-enabled GPS devices. An IMU allows a GPS receiver to work when GPS-signals are unavailable, such as in tunnels, inside buildings, or when electronic interference is present. The fabIMU which i made is based on the open source ArduIMU board which is being explored for the drone to control the flight of the board and stabilise the flight of the drone. Here is the link to download the reference eagle file for ArduIMU_V3.
FabIMU_1.0
I adapted the board in order to create the FabIMU and changed most of the components based on the components which are available in the fab inventory so that i can make this board here in the fablab. FabIMU is incorporating all the components like resistors, capacitors, voyage regulator (which i changed according to the fab inventory) and sensors like Gyroscope and Accelerometer combined, Magnetometers(Compass) which basically controls all four motors Individually and stabilise the flight and direction. Here is the link to download the eagle file for fabIMU_1.0
First of all, FabIMU board is super complex board and i had to make it double sided in order to make it more compact and connect all the components so i put lot of vias on the board to make the connect both the side. I didn’t realise that there are too many and how difficult they are, until i started soldering them. As you can see in the picture, on both sides, whereever you see the copper on the board are defined as Ground so all the components which are connecting to Ground. I don’t need to make traces traces connecting to ground and it can be soldered right at the place. In this way, i can reduce the traces. (Here is the link for the tutorial to get the basic understanding when you are working with double side PCB).
Now, i finished the Eagle file for the FabIMU, i was quiet exited to mill this board to see the result. and in the first trial, i made the file to make traces first (1/64 bit) and used the same bit to make holes for the Vias (which was an experiment and it worked) and then changed the bit to 1/32 to run the file for the Pads and Cutout. After when i flipped the board to run the file for traces for bottom side, somehow i placed it wrong and as you can see, the holes were not matching. so first trial FAILED. In the second trial i put big hole at four different corner to take them as reference, when i flipped the board and it should match the placement. so in this trial i managed to match the holes for Vias but traces for the small components like Gyroscope, Accelerometer and magnetometer either they were all connected like a big patch or they were all destroyed. Basically second trial also FAILED. I made couple of more trials, while playing around with different parameters but i couldn’t make the FabIMU board with Ronald Modela and i started thinking about different methods through which i can make this board even for the small components.
FabIMU_2.0
Mean while i started to discuss about the process and my board with different experts here in fablab Luciano Betoldi, Guillem Camprodon and Miguel Angel de Heras and i understood that by changing the micro controller ATmega 328p with ATmega 32u4, i can have more connectivity and pinouts, which can make the board more efficient in sense of programming the board every time and also i can get more pinouts to add some extra sensors like IR sensors for obstacles and sonar sensor for altitude hold. here i leafed that, even after changing the micro controller i still can’t have the GPS and Bluetooth or RC connectivity at the same time as ATmega 32u4 has just one Rx and Tx pinout. Here is the link to download the eagle file for fabIMU_2.0
In the next version of FabIMU_2.0, i made all those required changes and also we figure out, how to make this board for which i have to go to the Another Lab called HNAGER (here is the link about this place) where they are mostly working with electronics and they have all the tools to make this kind of board with small components. Finally I was forced to find an etching method to be used at home after all the failed experiments with Ronald Modela prototype PCB production tools.
The PCB layout is a mirrored positive one - black on white. Mirrored as viewed from the silkscreen top (component) side. The PCB layout is printed 1:1 on paper by means of a copier machine. After printing both sides, stick both of them together with the board inside and you have to really careful that Vias should match. Then put them in the box with UV light for the PCB UV Exposure process. Each side will take five minutes 300W bulb UV exposure will do the photo process. Take care when finished and removing the PCB, it gets hot! The next step is PCB Development process. The PCB is developed with a 1% solution of sodium hydroxide NaOH. You can make this solvent by adding 10 gram of sodium hydroxide pellets to 1 liter of water and mix it until everything is dissolved. Use a brush to speed up the developing and clean the PCB during this process if the PCB is still greasy due to the applied sunflower-seed oil. The developing process takes about 1 minute. It is sometimes difficult to guess when the developing is finished. The traces should become clear and the exposed photosensitive layer has dissolved (during the brushing you see darker cloud coming off the PCB surface). The developed PCB is etched with a 220 g/l solution of ammonium peroxydisulfate (NH4)2S2O8 a.k.a. ammonium persulfate, 220 gram added to 1 liter of water and mix it until everything is dissolved. Theoretically it should be possible to etch slightly more than 60 grams of copper with liter etching solution. after this process wash the PCB with clean water and now i have the PCB ready. Since the whole process of making FabIMU board is manual, i had to make all the holes manually with Dremel tool. as you are using really small bits to make holes you have to be really careful. by the way this whole process is of 1 hour and you have the board ready to solder all the components. while Ronald Modela took 5 hours to mill the board. so in way i would say it quiet fast process. and in this, if you go wrong somewhere you can make it again and you can still save time.
Now its time to see whether this process is efficient enough or not and i was still facing some problems with this board as the traces for the small components were still joined to each other as you can see in the picture but it was better then the other trials. and i had to make those traces carefully with cutter. after doing all this i had to sand the whole board with fine sandpaper in order to make those traces clean and clear. here what i learnt is that this process is good for now to mill my board but it requires lot of manual work and patients.
I soldered all the components which i could manage by myself in the fablab and i left just two components (Gyroscope and Accelerometer combined, Magnetometers) as they are two small i couldn’t do it by myself and i had to go to HANGAR again to use the Hot Air Reflow Soldering tool. after soldering those two last components the board is ready to program to check after all the hassles the board is still working or not.
Since the board is really complex, i had lot of difficulties to check the board whether it works or not. As soon as i connect the board with AVR programmer it was showing the RED light so i had to talk to the Guillem in order to see where i am going wrong. So we have started making all the basic test to check whether all the components are soldered well or not and also if its passing the current or not and guess what the soldering and everything was perfect and i was quiet proud of myself that i did a good job(at least till this part). Now it was time to check the Eagle file and i realised that ICSP connecter was powering through 5V and the Micro controller was 3.3V so we remap the pin and plug into the 3.3V pin and BOOM. I got the GREEN light. So the board works well and we did the burn boot loader and now its ready to program.
After burning the bootloader i uploaded the an Open source Multiwii CODE (here is the link to find the code) which i was using for the drone.and started to check the voltage flow in board and pinouts. and i was getting nothing. so there was something wrong as all the connection and soldering was good but the voltage wasn’t passing through the pin. So again after talking to Guillem i had problem with the 5V regulator which was wrong. for that reason i when i passed 12V i already burnt the micro controller and and i had to change the micro controller. Now this time 5V regulator burned out so there was something wrong with the this 5V regulator which i was using and i took it out and made the bridge for the voltage flow and now it was powering but after this i couldn’t send more then 5V to the board and to run all four motors i need at least 12V. Finally after all these trials and a lack of time, i couldn’t make another board and i couldn’t use my FabIMU board to make the drone fly and i have got the Multiwii SE Hexatronic board (here is the link about the Board) as it has the same Micro controller and the Pinouts for all the sensors.
Frame Structure of fabDrone
As i figure out all my electronics and programming, now its time to work on the frame structure of the drone and for that together with Aldo Sollazzo, we have developed the grasshopper script for the drone to make it parametric so that all the sizes of the frame and the press fit joineries can be adapted to all the different sizes of the motors and ESCs, propellors and electronics boards also the thickness of the wood. Here is the link to download fabDrone file.
I am using 4.5 MM thick plywood, which we got from the leftover materials, here in the fablab. After laser cutting the first prototype, i realised some mistakes with joineries and also about structural strength, which i managed solved in the second prototype that was working very well with all the joineries and also the type of motors, ESCs and propellers i am using for the fabDrone.
The idea behind using the Plywood as frame structure is that even if it crash and the frame will break, its easy to dismantle everything and you can laser-cut the pieces gain and assemble and it and it will be ready to fly again.
As you can see in the images, assembly process is already quiet simplified, i have been using this flexible connector so that in case, if i need to change the direction of the rotation its easy, but once you know which direction you required you can solder the cable of motors and ESCs. In the case of Propellors, you have to be really careful that you tie the bolt tight enough that because of the rotation of the motors, it doesn’t fly away and also it can be dangerous for people around and also for the drone that can crash. basically you have to take some safety precaution before you start flying it. I am using two different colours of propellors in order to understand the direction of the drone that helps a lot when you are controlling the drone.
Now we need to check on the code to define the type of motors and ECSs i am using in order to set the Throttle to fly the drone and also each motors belongs to particular pinout on the board. The front and the rear motor rotate clockwise, the left and the right motor rotate counter-clockwise, nearly cancelling gyroscopic effects and aerodynamic torques in trimmed flight. By varying the speed of the single motors, the lift force can be changed and vertical and/or lateral motion can be created. Pitch movement is generated by a difference between the speed of the front and the rear motor while roll movement results from the difference between the speed of the left and right rotor, respectively. Yaw rotation results from the difference in the counter-torque between each pair (front-rear and left-right) of rotors.
For programming, i am using an open source code to program the board as with the time limit and the complexity of the code, it was impossible to write the code as its required lot of calibration in oder to find the best settings and adapted it to the kind of settings i required to make the drone fly. Here is the link to download Code file. The following explanations are agnostic to the mode used. Starting and stoping the Motors The engine launch is done by tilting the yaw stick right while having the throttle stick in minimum position (An alternative method was also introduced recently: roll stick right while having the throttle stick in minimum position) For security reasons, the throttle stick must be set to minimum. Now motors turn at an idle rate and the quadcopter is ready for flight. Once armed, FabIMU should permanently switch ON the status LED and once disarmed, FabIMU should permanently switch OFF the status LED. Gyroscopes calibration To calibrate the neutral of gyroscope sensors, you must tilt the yaw stick left, tilt the pitch stick back while having the throttle stick in minimal position. The Quadcopter should not move during this stage. However its inclination has no influence. The status LED will blink to confirm this step. Accelerometers calibration The multicopter inclination should be as horizontal as possible during this step. This step must be realized at least once, the acc calibration is then stored in the EEPROM. This step can also be realizedd directly from the GUI via the CALIBRATE button. If this step is not correctly done, the status LED will blink forever and you won’t be able to arm the motors (security). The status LED will blink to confirm this step.
MultiWii GUI is a .NET based configuration and GCS interface for the famous multi-copter controller software, which is based on processing. Basically it is exhaustive parameter configuration and graphical visualisation of sensors, motors and RC signal. This also helps to check all the wiring connection if its right or not, calibrate the motors based on the type of motors and type of ESCs, also calibrates sensors like Gyroscope, accelerometers and magnetometers. and its give realtime visualisation based on how you are tilting the drone and you can understand that how all the motors are controlled individually by these sensors.
Since all the physicality and the programming of the drone is done now its time to fly the drone . As the circuit board has just one Rx and Tx pinouts, i can either connect the bluetooth device to the board and control the flight through the Mobile app or the Remote control. here i am using this app which is based on Mutiwii Gui, (developed by Lot Amores). So basically the Gyroscope and the Compass of the mobile is communicating with the sensors on board and control the flight of the drone based on how do you move the mobile, drone move according to the same direction.and the sensors on board is controlling the pitch and roll movement while controlling the rotation of all four motors individually.
Finally i managed to make the drone fly.
I am quiet happy with the result so far. its just i need to tweak the settings in order to make the flight more stabilise and more in control and that is going to happen while experimenting with different settings and flying it again and again. about the electronics, now i have basic understanding about micro controllers (about ATtiny and ATmega) and the components and specially about the voltage regulators (thanks to Gullime Camprodon, Miguel Angel de Heras and Luciano Betoldi) that how can you improvise the board and make it more efficient by changing the micro controller and also while developing the drone i learnt a lot about the coding (Arduino and Processing) and bout developing an app for mobile (for instance creating a network between two devices to receive and transmit data). Now as i told you, i need to more focus on the controlling and stabilising the flight and i am going to make improvised FabIMU. As i have been working with Aldo Sollazzo to combine the Gimbal and drone together. we managed to connect the gimbal with the board i am using fro the drone and we managed to make the gimbal stabilised by using the same Gyroscope and Accelerometer, which was also working quiet well.