- It was comparatively quite big and heavy, which ultimately meant that we needed more space and helium to take it up.
- It took too many batteries to power it.
- It was very much a ‘prototype’, where the components were soldered on to strip board – not always the most reliable method.
- It was not very robust – we were always scared of dropping it – or it breaking on landing.
Designing the new tracker
The first thing I needed to do is work out what I wanted to achieve with the new tracker. If you aren't familiar with our first tracker, have a look here. I identified a few key areas:- Must be under 100g.
- 3 or less AA batteries.
- Look a lot more ‘professional (!)’.
- Be a lot more robust.
- Future-proof – with the ability to add additional features at a later stage.
Designing the layout in Eagle CAD |
The idea of Eagle is first to create a schematic. This is basically the circuit in block form, showing the logical connections and providing an overview of what is joined to what. Once you are happy with your schematic, you then move into the physical ‘view’ where you can then decide where on the finished circuit board the components will end up. Having not done this before, I found it quite time consuming but really enjoyable to work towards a finished board.
It was at this time that I had to make a decision on the form-factor of the components. On the first tracker I used ‘hole-through’ components – those that you have to poke through the board and solder on the other side. My third requirement above however, said that the new board needs to look more professional – so for this reason I decided that the best (and more challenging) way would be to use ‘surface-mount’ components. These, as their name describes, are soldered directly onto the surface of the circuit board and give that ‘made by a machine’ look. I knew this would test my soldering skills but I just went for it.
Circuit and components
Because prototyping on a breadboard has been known to introduce more problems than there would actually be, I took some advice and decided to create the board, have it checked and then hope it would work when I soldered it – a little risky but it had worked for others before, so I hoped for the same! I already knew I would be getting the boards from Hackvana for a very reasonable price, so it was a risk I was willing to take if I had to change the board because of some unfixable problem.Main components of tracker |
I decided to stick with the same microcontroller as in the first tracker, the ATMega328. This was because I was already familiar with this way of working and coding, so wouldn’t have to relearn this element. The other key components were also familiar – the same NTX2 model as before and the uBlox GPS chip, although this time using the upgraded Max7C which promised better power consumption. The GPS antenna also remained the same Sarantel brand as before, though this time a different model than was found on the previous breakout board. I later learned that Sarantel have gone into administration (at the time of writing), so I guess stocks of this antenna will soon diminish – will have to keep an eye on this. The same one-wire DS18B20 temperature sensors were included, I mounted one directly on the board and ensured I had a connection for the same external probe as on our second launch. Finally I included a micro-SD card reader to record our data as before.
For our next launches, we wanted some way of moving the camera or an object in near space. To do this I have made previsions to allow for a servo to be connected, with the power being delivered through a MOSFET to allow us to turn it on and off to save power.
Olimex ISP-500 AVR |
Soldering the new board
New boards! |
New code
The code from the first tracker was not ideal, it did the job but was not very refined and I knew many improvements could be made. I decided that if I was making new hardware, then the software would get the same attention. The main thing to improve with the first tracker was the fact that it was doing everything sequentially – looking for a GPS position, processing it, sending it over the radio, repeat. After some research I and talking with some people on IRC, the concept of ‘Interrupts’ was brought to my attention – they are fantastic! The idea is that you can set up a scenario where two portions of the code can be run at the same time. To do this you create your main repeating chunk of code in the loop, but at the same set up ‘timers’ which then ‘interrupt’ the main flow of code to process some other code, while continuing with the main flow. For our purposes, the GPS data receive and processing is the main body, while the radio transmission is our interrupt element. This has improved the reliability of the code no-end and I really do recommend trying to use interrupts instead of the delay code. You can see the basic working GPS and radio code on my Github code repository.The finished tracker
The New Tracker |
We look forward to flying it soon!
No comments:
Post a Comment