Equipment I am using.
Tcm2 Magnetometer PNI corp.
Sparkfun Data logger
Schematic
Data Sheet
Max232 chip
Data Sheet/Schematic
Arduino mega 2560 R3
http://arduino.cc/en/Main/arduinoBoardMega2560
Schematic
I have them all connected and working except the magnetometer.
On the max232 Connections are as follow
I Think my problem is below with the max232 connections.
T 1 Out connected to Magnetometer Pin 4 RxD
R 1 In connected to Magnetometer Pin 5 TxD
R1 out connected to the rx10 pin on the logomatic
T 1 in connected to the Arduino TX1 pin 19
My circuits have the correct voltage and capacitors and resistors so The problem is either with the max232 connections or my code which is below.
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int led = 13;
// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
pinMode(led, OUTPUT);
delay(5000);
Serial1.begin(9600);
Serial1.print("ax");
delay(10000);
Serial1.print("go");
}
// the loop routine runs over and over again forever:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
The code is very basic and This is my first time programming a arduino any help would be extremely appreciated thank you.!!!!!!
I send "go" to the magnetometer and it begins its continuous sample and the data logger should receive the data with the file setup below
MODE = 1
ASCII = Y
Baud = 4
Frequency = 100
Trigger Character = $
Text Frame = 100
AD1.3 = N
AD0.3 = N
AD0.2 = N
AD0.1 = N
AD1.2 = N
AD0.4 = N
AD1.7 = N
AD1.6 = N
Saftey On = Y
The Magnetometer is powered by a 9v and connected to common ground.
The Logomatic v2 is powered by 5v and connected to ground.
The arduino is powered by 9v and connected to ground.
The max 232 is powered by 5v Via the VCC pin and connected to ground.
The entire circuit runs off a 11.1v lithium 3 cell battery with voltage dividers for each power requirement.
Thank you !
I tested the max chip and it is working correctly, I think the problem is in my code