Arduino UNO based GPS navigation system. Total cost below $25. It has 320*240 TFT showing the actual position on a map.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
I tested the software this morning with the GPS unit connected, it shows my exact position on the map!
As soon as I have more programspace available I will repair the positioning errors that still might occur. See the Github!
I just put the first stage of the project on github: middelbh/GPSnavigator
I hope you have a look at the sketch and help me reduce the size as I need some more programspace to optimize.
I just put the first stage of the project on github: middelbh/GPSnavigator
I hope you have a look at the sketch and help me reduce the size as I need some more programspace to optimize.
I now have the software completely running! The next step is to connect the GPS module and do some tests.
I hope someone can help me in further optimizing the sketch, it's about 99% of the maximum size for my UNO, and displaying the map still takes 1-2 seconds. That must be faster I think. I am a relative beginner with Arduino, so any help is greatly appreciated!
Other question is, where shall I put the source of the sketch??
Create an account to leave a comment. Already have an account? Log In.
Sorry Sr. but the map is it only from Amsterdam? How or where can I download a map from Spain if you know some page.
I have another question: with your tft module you have the pins A4 and A5 free to do a I2c with other arduino?
Thanks you and good job for this project
hi Antonio. The map I am using covers all over the Netherlands, so not just Amsterdam. In the Netherlands these topo maps are publicly available. You should check youself for topo maps in Spain, I do not know if they are available freely.. Otherwise you could scan a map of the area you are interested in and georeference that yourself using Google Earth. Regards and success, let me know
But did you use an image .jpg or other typof file? I mean, i downloaded a file for a gps and the extension of the file was .img
My question is: What type of file did you put to read in the lcd?
Also, as I noticed, a couple of things you might want to fix:
- your handling around FileNameMap/FileNameString looks a little fragile. You build up the file name in a loop, incrementally adding a character to the String type. You then copy the resulting String to a char array, but use not the size of the char array but the size of the String. It is fine now (as your String making loop limits the size to 8 characters) but if things ever got out of step you'd have a horrible bug to find. Probably easier to just directly write to the char buffer, perhaps.
- you are calling SD.begin() far too often. No idea if that call is idempotent or not, there could be the chance of a memory leak here - which in a system without memory management will just result in bizzare and unpredictable behaviour. Best to avoid, I've had similar before :)
Hi stoduk! Thx for your proposals! I have to admit that this program is the first somewhat more complex I wrote for Arduino. Therefore I do not have sufficient experience in converting chars to strings and all that, I originally am a VB programmer (blush)! Would it be possible you help me with that subject?
I will certainly go through the program and have a serious look at your remarks, I hope I can learn a lot of that!
Seconded regarding the libraries - the size of pulling one in can massively bloat a script. eg. just adding #include <SD.h seems to increase program storage space usage by almost 5k. No idea what the constructors in there doing, but perhaps there is a more lightweight SD library that will do what you want.
Using floats won't be doing you any favours either, http://arduiniana.org/libraries/tinygps/ claims that using floats adds 2k to program size off the bat. On top of that are the usual accuracy and speed problems - a decimal type would be far better and wouldn't be hard to define (given you only care about comparisons, you don't care about arithmetic on the values).
Regarding screen update time - I don't know what LCD you are using, but adafruit website says that if you can use the parallel data method for fastest updates. If you have to use SPI, then make sure you are using the hardware pins as it is much faster.
I also noticed you are doing updates any time you get a valid NMEA sentence from the GPS. Depending on how fast that might be you could want to avoid doing this every time - eg. perhaps just update once a second, or maybe do a quick check and only update if the lat/long have changed "enough". I found something that claimed 6 sentences/second at 4800bps - you are doing a lot of floating point arithmetic in a tight loop, so I don't know how much time you have available for each update. If you aren't quick enough then things might get messy :)
Hi ipaq3115! thx for your comments! I agree that the Teensy would give me much more capacity. It's just the fun I had trying to do this on the most basic microcontroller I could find. Your proposal to start digging in the libraries is the best I can do I think. And really, the GFX library is a monster for this simple system. I will try and see if I can do what you propose, will take some time however..
Hey there middelbeek, this project looks pretty awesome! I don't know exactly how far you want to take this but since you are running out of memory you might consider a Teensy 3.1. You'll get much faster screen writes and you'll be able to use real 8 byte doubles which is invaluable for GPS calculations.
If you really want to optimize for the UNO though I would make copies of those libraries you are using and start looking through them for things that you don't need/aren't using and start cutting stuff out. I'd start with the gfx libraries. Those tend to be a little big!
Become a member to follow this project and never miss any updates
By using our website and services, you expressly agree to the placement of our performance, functionality, and advertising cookies. Learn More
Hey, nice project and very interesting. I'm trying to adopt your idea, however i can't find topo maps of my country (greece). Do you have any idea what should i do in order to work? Thanks in advance