Pre-purchase shield inter-compatibility with Mega

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
WinterWonder
 
Posts: 3
Joined: Tue Feb 16, 2016 12:24 am

Pre-purchase shield inter-compatibility with Mega

Post by WinterWonder »

Disclaimer: though I have some Arduino experience, this is significantly more complicated than anything I’ve tackled previously; so I hope I’m not missing anything obvious.

Because this is a bit long-winded/complex, I have numbered each question. To avoid confusion between questions, please clearly reference which question you are responding to.

I need to construct an Arduino based data logging system, and I need to verify that my selected hardware will work together. My current hardware list is as follows:
- Arduino Mega 2560 R3 (Atmega2560 - assembled) - Mega!
- Adafruit Bluefruit EZ-Link Shield
- Adafruit Ultimate GPS Logger Shield - Includes GPS Module
- Adafruit 10-DOF IMU Breakout - L3GD20H + LSM303 + BMP180
- 2.8" TFT Touch Shield for Arduino with Resistive Touch Screen
- (I am also considering the Adafruit 1.8" Color TFT Shield w/microSD and Joystick, because it appears to have clearer documentations for wiring https://learn.adafruit.com/1-8-tft-disp ... g-and-test)
- Adafruit Proto Shield for Arduino Kit - v.5

And 1 of the following:
- USB / DC / Solar Lithium Ion/Polymer charger - v2
- Adafruit PowerBoost 500 Shield - Rechargeable 5V Power Shield

I have selected the Mega due to needing 14 analogue inputs, and for compatibility with the Bluefruit for remote data retrieval. My understanding is that the Mega can support up to 4 softserial connections (Q1: is this correct?)

My understanding for the Bluefruit, I can specify any 2 digital pins for the softserial (14-19 or 0,1); and that in total this shield needs up to 4 digital pins, 2 of which need to be softserial compatible (softwerial connection 1). (Q2: are these IO requirements correct?)

From the compatibility guide (https://learn.adafruit.com/adafruit-shi ... gps-shield), I understand that I can access the GPS functionality to work with the Mega by setting up another softserial connection (softserial connection 2). And with modification to the SD library (assigning pins 11-13 for SPI, and 10 for select) I can read/write to the SD. (Q3: can these be assigned to different pins?)

The compatibility guide does not specify why the connection to the Mega only “may work”. (Q4: what determines if the SD connection will work?)

My understanding is that the IMU module connects over the I2C bus, and that the I2C bus can communicate with multiple devices over the same 2 pins.

As for the 2.8 inch screen, according to the product description (https://www.adafruit.com/products/1651), it needs pins 13-9, 8, and optionally 4 (not used in this project), and also mentions the use of the ICSP header. (Q5: if the ICSP header is used, are pins 13-9, 8 still required?) (Q6: are pins 13-9 being used as an SPI connection; if not then for what?)(Q7: is these are being used as an SPI connection, and pins 10-9 are the select pins, can these be relocated?)

Since this system is going to be at a remote location, I’m looking at the above solar charge controller, though for stackable simplicity I’m more of a fan of the powerboost shield.

(Q8: Though I doubt it, is it straight forward to modify the powerboost shield to have the same functionality as the solar charge controller?)

(Q9: solar charge controller, at 6Vdc, on the 2.1mm barrel jack, what is the max designed input current that the solar charge controller can handle?)
From reviewing https://learn.adafruit.com/usb-dc-and-s ... he-charger, it says that the output voltage can be up to 6Vdc if a 6Vdc solar panel is active. (Q10: What is the typical load side voltage from just the battery, and what is the designed max current at this voltage?)

(Q11: if I am expecting larger input currents than a typical solar cell could provide, so long as I maintain between 5-6Vdc input on the 2.1mm barrel jack, is there a max size of 10V capacitor that should not be exceeded with this solar charger?)


In advance, thank you for any input/help.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Pre-purchase shield inter-compatibility with Mega

Post by adafruit_support_rick »

WinterWonder wrote:I have selected the Mega due to needing 14 analogue inputs, and for compatibility with the Bluefruit for remote data retrieval. My understanding is that the Mega can support up to 4 softserial connections (Q1: is this correct?)
The Mega has 4 hardware serial ports. It will support more than 4 software serial connections, but only one software serial connection can be active at a time.
WinterWonder wrote:My understanding for the Bluefruit, I can specify any 2 digital pins for the softserial (14-19 or 0,1); and that in total this shield needs up to 4 digital pins, 2 of which need to be softserial compatible (softwerial connection 1). (Q2: are these IO requirements correct?)
It only needs two digital pins. Both for serial.
WinterWonder wrote:From the compatibility guide (https://learn.adafruit.com/adafruit-shi ... gps-shield), I understand that I can access the GPS functionality to work with the Mega by setting up another softserial connection (softserial connection 2). And with modification to the SD library (assigning pins 11-13 for SPI, and 10 for select) I can read/write to the SD. (Q3: can these be assigned to different pins?)
To reassign the SPI pins for the SD requires jumpering to different pins. But it can be done. If you set up both the EZ-Link and the GPS for Software Serial, then you can't receive from both at the same time. However, you can transmit on the EZ-Link while listening to the GPS.
WinterWonder wrote:The compatibility guide does not specify why the connection to the Mega only “may work”. (Q4: what determines if the SD connection will work?)
Our modification of the standard SD library to allow use of any pins is old and hasn't kept up with more recent developments.
WinterWonder wrote:As for the 2.8 inch screen, according to the product description (https://www.adafruit.com/products/1651), it needs pins 13-9, 8, and optionally 4 (not used in this project), and also mentions the use of the ICSP header. (Q5: if the ICSP header is used, are pins 13-9, 8 still required?) (Q6: are pins 13-9 being used as an SPI connection; if not then for what?)(Q7: is these are being used as an SPI connection, and pins 10-9 are the select pins, can these be relocated?)
The Arduino Uno uses pins 11-13 for SPI. The Mega does not. However, the TFT shield is able to use the ICSP pins instead of the Mega's standard SPI pins. You can use 13-11 for anything on the Mega.
But. If you have the TFT, you do NOT want to use the SD card on the GPS. You want to use the SD on the TFT. That way, you can use the more modern standard SD library.
WinterWonder wrote:(Q8: Though I doubt it, is it straight forward to modify the powerboost shield to have the same functionality as the solar charge controller?)
No. But, the problem with solar chargers is that the solar panels themselves do not output a constant voltage. So you can't really use the LOAD output of the charger directly with electronics. Instead, you would connect the BAT output of the charger to the PowerBoost shield. The solar charger will keep the battery charged, and the PowerBoost will provide a steady 5V to the system.

User avatar
WinterWonder
 
Posts: 3
Joined: Tue Feb 16, 2016 12:24 am

Re: Pre-purchase shield inter-compatibility with Mega

Post by WinterWonder »

Hi Rick, thanks for the follow up.

For further clarification:

Serial ports:
I'm (hopeful, but) presuming that the hardware serial ports cannot be used in place of the soft serial connections (for GPS and bluefruit), to allow multiple simultaneous serial connections?
On the mega, I had thought pins 0,1,14-19 were hardware serial ports?

SD storage:
The screen is likely only going to be used for development and testing (output battery charge, if a sensor broke, etc). Once the final mechanical design is locked down I was intending to not include a screen, and I was hoping to rely on the GPS's SD card for the actual data logging.

Your comment is a bit unclear to me:
Our modification of the standard SD library to allow use of any pins is old and hasn't kept up with more recent developments.
This may be partially due to my unfamiliar with SPI and ICSP (are these two names/physical interfaces for the same communication? From reading other forms i'm a bit confused, I was under the impression they were separate communication paths).

Can the SD card on the GPS receiver be accessed for read and write operations over the SPI pins? If not, then how is this intended to be accessed?
In the testing phase (while a screen is installed), if the screen is connected to the ICSP, will this interfere with accessing the GPS's SD (above)?
Currently, I'm more strongly leaning towards the 1.8" screen with the joystick. The only way that I could accept leaving the screen incorporated into the final design (which would allow using the more up to date libraries as you mentioned) is if there was a way to mechanically remove power from the screen so that there was not chance of it draining my battery accidentally. Is there any way to do this?

Battery and solar:
Since you didn't directly answer Q10, i'm currently presuming that the output voltage from the solar changer, when the solar cell is not connected, is whatever the battery voltage is ( 3.7V/4.2V). Is this accurate?
Maybe i'm misunderstanding something, but i'm not sure how the solar changer controller could power the powerboost. The solar charge controller (with the battery attached) to charge the the powerboost shield (with batter attached) sounds a bit redundant.
Additionally, if the solar change controller has battery voltage as its output, how would it power the powerboost shield which requires 5V as an input (from https://learn.adafruit.com/adafruit-pow ... ck/pinouts)?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Pre-purchase shield inter-compatibility with Mega

Post by adafruit_support_rick »

WinterWonder wrote:Serial ports:
Sure - you can use the hardware serial ports. Don't use 0 and 1. But you can use the other three. Just jumper over to them. I was thinking you didn't want to use jumpers.
WinterWonder wrote:SD storage:
The ICSP and SPI headers are the same thing. On the Mega, it's called ICSP, on the Dues it's called SPI. Whatever.
the problem with the gps sd card is that it's designed for a Uno, which has hardware SPI on pins 11, 12, and 13 in addition to the ICSP/SPI header. The GPS does NOT use the ICSP header. It expects hardware SPI on pins 11, 12, and 13. But the Mega does not have hardware SPI on those pins. So you're forced to use software SPI. You can do it, but I thought it would be better to use the SD on the screen, since it DOES have an ICSP/SPI header.

On the other hand, if you're already using jumpers for Serial, you can also jumper the SPI pins on the GPS card over to the Mega's hardware SPI pins: 50, 51, and 52.
WinterWonder wrote:Battery and solar:
The PowerBoost shield takes battery voltage, not 5V. It boost battery voltage to 5V. The problem with the solar charger is that, if you simply use the LOAD port, you can get up to 6V going into the PowerBoost shield. That's too much for it. So, I recommend connecting the battery output of the solar charger to the PB Shield, nt the LOAD output.

User avatar
WinterWonder
 
Posts: 3
Joined: Tue Feb 16, 2016 12:24 am

Re: Pre-purchase shield inter-compatibility with Mega

Post by WinterWonder »

Hi Rick, I appreciate your feedback. I think I’m still misunderstanding something about the battery system.
If I understand your recommendation:
So, I recommend connecting the battery output of the solar charger to the PB Shield, nt the LOAD output.
Are you suggesting connecting SC_L straight to the PB_USB, and only having a battery on PB_B?
To me this sounds a lot like the functionality of the SC is being bypassed, specifically the thermal protection.
Or am I missing something?
Since I'm looking to use a battery larger than 1.2Ah, I would think that the external thermal monitoring would be important.

My understanding is that the Solar Charger (SC), has 4 common connection points:
https://learn.adafruit.com/usb-dc-and-s ... sign-notes
- Batt (SC_B) for connection to a 3.7V/4.2V Li-ion/Li-Po battery. Fixed at ~4.5Vdc by the voltage divider, at some associated current.
- USB (SC_USB) for charging/running off a 5Vdc source.
- DCIN (SC_DC) for charging off the solar panel. Fixed at 6Vdc, and current varying according to received sunlight, and loading.
- Load (SC_L) for connection to some output. Voltage output varying between SC_B and up to SC_DC, and supplying between 0.5A and 1A (depending on adding a resistor).

To my understanding the Powerboost shield (PB) has 3 relevant connection points:
https://learn.adafruit.com/adafruit-pow ... ttery-pack
- microUSB (PB_USB) for charging the battery from a 5Vdc source, at up to 0.5A
- Battey (PB_B) for connection to a 3.7V/4.2V Li-ion/Li-Po battery.
- Output (PB_Out) header output at 5.2Vdc at 0.5A (up to 1A peak) to the Arduino.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Pre-purchase shield inter-compatibility with Mega

Post by adafruit_support_rick »

I'm suggesting connecting the BAT output of the solar charger to the battery input of the PowerBoost. You can get 6V on the LOAD output of the solar charger, and none o this stuff will handle that directly. By using the BAT output, you will get battery voltage, while the battery is still being charged by solar.

You probably don't want to use a PowerBoost shield for this, since it already has an on-board charger. I would use a PowerBoost 500 Basic instead.
https://www.adafruit.com/products/1903

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Arduino products from Adafruit”