Which platform to use, question of voltage, current, plus SPI question...

Hello everyone,

this is my first post in this board, I'm very happy and thankful that it exists ;) I have used it several times in the past, e.g. doing research for a "project" I did last year: Some friends and I used a Flowmeter+Arduino to measure and display the amount of beer flowing through it. You might want to look at this: http://www.youtube.com/watch?v=cA32hqF4ErE - this doesn't have to do with my actual problem, but this is my first post and I want to show off what I'm proud of ;)

So, this is now my second approach to working with arduinos, and a should clearly state that I'm an absolute beginner in electronics. I know how to solder, but am utterly unable to do complex things as building my own shield from schematic eagle files.

Dude, what's your problem? Yeah, I come to that now ;)

I want to build a device with: Arduino, sd shield, GPS shield, lcd display. I'd like it to be not too power-consuming, because I want to take it with me on my bicycle for day-trips. I thusly found the Arduino Fio very interesting since it can be powered with 3.3V by a LiPo battery. Taking a 2000mAh batt from Sparkfun, I thought I could get quite good results in the "running time" branch.

These are the components that I'm currently interested in:

-GPS: LS20031, http://www.sparkfun.com/products/8975 --The page says that the module needs 3.3V @ 41mA, but the page of the Arduino Fio makes no statements on what the current of the Fio's 3.3V pin is. Does anyone know that?

-sd: microSD shield from Sparkfun, http://www.sparkfun.com/products/9802 --I suppose this thing works at 3.3V because it has a corresponding pin. --Important to note here is that it uses SPI communication

-Display: ST7565 graphic lcd from Adafruit http://www.adafruit.com/products/250 --According to http://www.ladyada.net/learn/lcd/st7565.html, this display uses SPI as well

All this stuff actually collapses into two questions:

Is it a good idea to use the Fio for a long-lasting low power application? Can you recommend a power source for the Arduino Uno that has comparable properties? I know that the Fio isn't really made for the cool stackable shield-architecture, that should be no concern at the moment.

Concerning SPI, do I rightly understand that I can connect multiple devices to pins 11-13 (as CLK, MOSI, MISO) and just have to use one separate pin as SS for the individual device? For example, pin 10 as SS for the display, 8 as SS for the microSD shield? I guess that, if this is at all possible, I'll also have to change the pin number for the SS pin in the libraries of the individual shields - right?

Lastly, I beg your pardon if it would have been better to pack these questions into single threads. I hope that I could show the problems clearly and that there won't be any understanding problems ;)

Greetings,

Stefan

The SPI takes 3 pins to communicate and one extra pin for each device you connect in the SPI bus. So for your case, you'd use the 3 SPI pins, plus an SD pin for the card, plus another for the display. I suppose that the GPS uses a serial port. If it uses SPI, then you'll need another pin for it.

You'll need to verify where each of the shield connects the SS and make sure that it's not overlapping. I think I've seen a shield with GPS and SD card before. Maybe on the Seeedstudio.

Regarding the low power... it's not really a matter of the board you use (although using a board with 3,3V instead of 5V helps, and the lower the frequency, the better) but how you make your software. If you manage to put the device to sleep once in a while, you can extend the battery life on it. Also, going below 8MHz if that doesn't hurt the application would help on the powre supply too. ;)

Thank you very much, that was very helpful. Good to hear that I can really use multiple SPI devices at once. There is indeed a GPS+sd shield, it's called GpsLoggerShield or something. The microSD shield from Sparkfun just seemed more attractive to me, because they somewhere state that it is compatible with larger cards and you can use long filenames with it. These features are not really necessary, but are nice to have on the other hand.

Is there really a way to go below 8 MHz? Wouldn't that cause problems on serial communication etc.? Anyway, I also thought about trying some power saving. That includes experimenting on how quickly the gps can get a fix after turned off for a short while, or enabling the user to turn off the display when not needed.

Unfortunately, the question concerning the current on the Fio's 3.3 V pin is still open. I thought about wiring it directly to the battery - it's 3.7 V lie within the input voltage range of the gps module. But I actually think that this might be a flawed concept ;)

Yes... last time I looked, SeeedStudio had theirs on sale. But you'd have to get the XBee shapped GPS to use it.

Yes, It is possible to go below 8MHz, but of course that the baud rates would have to be lower, and the performance of the device (on the screen for example) could be a bit on the laggy side. However, I don't think the bootloader as is would work with lower frequencies. It would however, work if you used AVR-GCC to compile your code and skip the Arduino bootloader all together. You can still use the IDE to program (although you'd have to change some settings).

Last but not least. I don't think 0,4V would make a big difference. How did you measure it? With a voltmeter and no load attached? Chances are that once you load the battery up it'll go down closer to 3,3V. However, testing this with a resistance would be the first step, just to be on the safe side.

Okay, I think for starters I'll just leave the clock speed as it is. Main goal is to get it wired and running ;)

I didn't measure it (I haven't even ordered any of the parts yet), the data comes from the web pages: The battery pack: http://www.sparkfun.com/products/8483 (somewhere in the description it says "3.7 V") And on page 10 the data sheet of the GPS (http://www.sparkfun.com/datasheets/GPS/Modules/LS20030~3_datasheet_v1.2.pdf), the table says that for the LS20031, the min and max input voltages span from 3 to 4.2 V.

For battery applications, you can seriously extend the battery lifetime by using the sleep modes in the AVR chip. Wakeup on internal watchdog or external pin interrupt.

See http://donalmorrissey.blogspot.com/2010/04/putting-arduino-diecimila-to-sleep-part.html and http://interface.khm.de/index.php/lab/experiments/sleep_watchdog_battery/

Wow, thanks for the comprehensive blog post and the example from the other page. Looks very promising, although I'll have to make up my mind on how I can apply this to my project. Maybe I should go into further detail on this ;)

The plan is to create .gpx files on the internet, using e.g. bikeroutetoaster.com to plan a route that you want to ride your bike along. The gpx file (or a beforehand simplified format) is loaded on the microSD card and plugged into the shield. While riding, the gps tells the current position and the Arduino tries to guess where we are on our track. Based on the next sections of the track, it displays a list of driving instructions (e.g., when the gpx track changes its direction by a certain amount of degrees, it says "left turn in xx meters"). So it kind of depends on the track whether it makes sense sending the arduino to sleep or not (when theres a section with ten turns in 50 meters...). How would sending the arduino to sleep affect the display? Would it keep showing the last content I sent to it, or would it be turned off too?