Hello forum, I have encountered strange behaviour using an OpenLog module
with a Mega 2560.
OpenLog has the following pins:
GRN (pull down to reset)
For simple use, I can get it working on the breadboard by connecting Vcc, Ground and its Rx to the board's Tx and it happily logs.
Now, I want to take it off the breadboard and stick it directly on the board. For this, I need 6 pins in a row, preferably with an existing hardware UART among them. A good choice is Serial2, which is padded with pins on both sides which I thought I 'd use for power. So I did the following connection:
GRN -------> 15 (RX3) ignored (defaults to INPUT, high impedance)
RX ---------> 16 (TX2) enabled by firing up Serial2.begin()
TX ---------> 17 (RX2) enabled by firing up Serial2.begin()
Vcc --------> 18 (TX1) pinMode(OUTPUT) and digitalWrite(HIGH)
GND ------> 19 (RX1) pinMode(OUTPUT) and digitalWrite(LOW)
BLK -------> 20 (SDA) ignored (defaults to INPUT, high impedance)
Now, trying to write to Serial2, does not result in writing to the card. When writing successfully, the right LED flashes blue but I do not get that. What I do get are green flashes on the left LED.
Now, the funny thing. If I disconnect the GND from pin19 and connect it to the Mega's ground, everything works perfectly!
I have tried checking out what is wrong with a multimetre but there's nothing I can see that is out of the ordinary, both pin19 and the board's ground pin (in conjunction with pin 18 being set HIGH) seem to power the OpenLog board with around 4.7 Volts. In both cases, there is a small drop as a burst of data comes through. I also tried using some other random pin (pin 22 which is next door) to use as a sink but got the same problem. For some obscure reason, the only ground that the OpenLog board will accept is the Mega's ground.
Surely it can't be a question of trying to sink too much current, according to this page
, maximum current consumption is a laughable 6mA.
Anyone got any ideas? I 'm really puzzled by this whole thing.