Show Posts
Pages: [1] 2 3 ... 8
1  Using Arduino / Project Guidance / Re: I'm a rookie, please help me out on: June 11, 2013, 11:31:11 pm

As matter of interest if I want to do the same as the OP (but used in a different scenario), how would I get the GPS coordinates, time and date via GSM if there's no arduino in the prototype?

GPS receivers output a GPS information string in serial or other means of communication in a format that usually contains coordinates, time and quality indicators etc. There are so many GPS receivers to pick from (by GPS receiver I don't mean one with an LCD screen) that output TTL/UART data as their primary means of communication. With increased accuracy comes increased pricing of course, depends on the task.


GPS receiver TTL -> Serial TTL to Ethernet Serial Server > Internet router
GPS receiver TTL -> TTL to RS-232 IC -> PC Com Port -> Internet
GPS receiver TTL -> GSM Serial Server

And many more ways ...hope this gives you an idea...

2  Using Arduino / Project Guidance / Re: I'm a rookie, please help me out on: June 05, 2013, 09:56:57 pm
You may not even need an Arduino for this, a GPS receiver (you buy it not make it) can output a serial string and you can either use a VHF/UHF/900 MHZ/Wifi/GSM etc radio to output your serial string to your desired location. Unless you plan on modifying the GPS string output from the GPS receiver, then I see no need for an Arduino.

So the most important question is, how are you getting the data from the vehicle to the base station (pit stop) ? If serial radio, then for sure no Arduino but if networked (GSM/Wifi), I would use a serial to ethernet converter and route the data to your desired location.

3  Products / Arduino Due / Re: Serial Port Question on: June 05, 2013, 04:45:25 pm
In other words, all you want to do is log this data so you can later graph it?
If this is the case then I would use the Arduino mega you have available and use softwareserial for the extra UART. Log the data to an SD card etc. An even easier way would be to use USB to TTL adapters, all four to a PC, log all streams from terminal windows to text files, no programing required.
4  Products / Arduino Due / Re: Serial Port Question on: June 04, 2013, 10:44:17 pm
As far as pinouts, you might like this...


I don't think you can use the UART0 port, given is already connected to another UART device which does the USB to UART conversion.

I don't think SoftwareSerial is supported by the Due yet, otherwise you could add more Serial inputs.

May I ask what is your ultimate goal? I have a feeling there may be an easier way than to plug all these devices to one Arduino...
5  Products / Arduino Due / Re: Arduino Due and Sd shield on: June 03, 2013, 08:25:33 am

You want:

DUE        SD Adapter

GND  <-> GND (Both)
SCK   <-> SCK  (CLOCK)
3.3V  <-> Vcc 3.3V
I/O 8 <-> SS (Chip Select) (can be any Due pin you like, my example code uses smiley-cool

You don't need to use Reset and definitely do not connect to 5V! Use 3.3v output on Due

If you are using a shield then simply trace the pins to a spot where you can connect to, do not connect the shield to the Due as this may damage your shield or Due.
6  Products / Arduino Due / Re: Arduino Due and Sd shield on: May 30, 2013, 09:42:20 pm
Very important!!!

The Due's SPI is on the 6 pin ICSP header, not shared with the I/O pins as on the Uno etc. From that pinout you should be able to connect wires to the correct places on whatever shield you use, just not plugged directly. Personally I build my own shield once I noticed the Due and my SD shields were not compatible, soldered some wires to a micro SD to SD adapter and was rolling.


While the Arduino Due is 3.3v, the VCC pin on the ICSP is 5V!!! The Sd card is 3.3v so do not connect to that pin...

Here is a simple data logger, with some write error reporting...let us know how it goes!!!

#include <SdFat.h>

const int chipSelect = 8;

SdFat sd;
SdFile myFile;

void setup(){
  pinMode(8, OUTPUT);
  sd.begin(chipSelect, SPI_FULL_SPEED);
  if(!"test.txt", O_RDWR | O_CREAT | O_AT_END))  //To print an error message when boot up and it can't write to the SD file
    Serial.println("AHHHHHHHHHH File open ERRORRRR!");
    String x = "Loggin Started";
    for(int i=0;i<x.length();i++)  //Writes to text file
    myFile.sync();  //Actual write command from write buffer
    if(!myFile.getWriteError()){  //Check for writes error
      digitalWrite(13, LOW);  //Goes Low when no error
    else if(myFile.getWriteError()){  //If write error, turn LED on and Write Error message
      myFile.clearWriteError();  //clear error flag
      digitalWrite(13, HIGH);  //Goes high if error LED onboard

void loop(){
  while(Serial2.available() > 0){  //The source of Data to be logged
    char tempChar =; //The source of Data to be logged
    String inputString = "";
    inputString += tempChar;
    if(tempChar == 10){  
      for(int i=0;i<inputString.length();i++)  //Writes bytes of Serial String to buffer
      myFile.sync();   //Writes to File
      if(!myFile.getWriteError()){  //Check for writes error
        digitalWrite(13, LOW);  //Use onboard LED for Error clear
      else if(myFile.getWriteError()){  //If write error, turn LED
        myFile.clearWriteError();  //Clear error flag
        digitalWrite(13, HIGH);  //Use onboard LED for Error Flag
        sd.begin(chipSelect, SPI_FULL_SPEED);   //Re-initiallize SD after an error"test.txt", O_RDWR | O_CREAT | O_AT_END);   //Reopen file after a write error
      inputString = "";  //Clear the buffer string
7  Products / Arduino Due / Re: Arduino Due DS3231 on: May 28, 2013, 08:01:44 pm
I believe I have solved my problem, I used this example, modified the deprecated wire commands and it works great.

I believe that the DS3231 should work with the DS1307 library, but I have not used it...

#include "Wire.h"
#define DS3231_ADDRESS 0x68

void setup(){

void loop(){

byte bcdToDec(byte val)  {
// Convert binary coded decimal to normal decimal numbers
  return ( (val/16*10) + (val%16) );

void printDate(){

  // Reset the register pointer

  Wire.requestFrom(DS3231_ADDRESS, 7);

  int second = bcdToDec(;
  int minute = bcdToDec(;
  int hour = bcdToDec( & 0b111111); //24 hour time
  int weekDay = bcdToDec(; //0-6 -> sunday - Saturday
  int monthDay = bcdToDec(;
  int month = bcdToDec(;
  int year = bcdToDec(;

  //print the date EG   3/1/11 23:59:59
  Serial.print(" ");


void printDigits(int digits){
  // utility function for digital clock display: prints preceding colon and leading 0
  if(digits < 10)
8  Products / Arduino Due / Arduino Due DS3231 on: May 28, 2013, 05:05:20 pm
Is there by any chance a DS3231 or equivalent library for the Arduino Due?
9  Using Arduino / Sensors / Re: Small signal and high voltage on: May 02, 2013, 05:19:18 pm
Indeed I was confused, Thank you very much for the simplification of the concept. I noticed that the reactance of the capacitor and inductor values was both close to +30k and -30k, which makes sense now why you asked for that value.

I changed C1 to 22pf and inductor to 22.2, the circuit is so much better tuned now, I get a good signal with a 30k resistor and I use much less current (15 times less?) My transducer voltage went up significantly too, given the smaller current drawn.

My next step....

I like to try and clamp that source (TX) down to ground. I have a 100 transistor pack and both a NTE2361 (NPN) SI NPN HI speed switch and a NTE2362 (PNP). As I mentioned I'm not as good on transistors, re-learning my way though. Any help on figuring out those values?
10  Using Arduino / Sensors / Re: Small signal and high voltage on: May 02, 2013, 12:06:55 pm

Here is my current circuit...

I some calculations and came up with:

fc= 1/(2*pi*sqrt(1mH * 670pf)) = 194.438KHz

Not sure how to apply the 4pf capacitance from the diodes, which may or not make a difference.

Here are some results...

R1 = 30k

R1 = 5.6k

R1 = 2K

I have a small assortment of transistors (I'm not as good on transistors) my experience has being that they were too slow on RF level, likely because of the saturation you mentioned. I'm looking for a signal mosfet for that clamping of the Tx but in the meantime, how would I go about the transistor amplification? Given that I'm short on a high BW op-amp.

11  Using Arduino / Sensors / Re: Small signal and high voltage on: May 01, 2013, 10:05:27 pm

Good points on resistive loading on my transducer, the datasheet on the transducer says 60 +j0(t) (uses internal transformer) 500 watts, so it does not seem to hurt it so far.

I'm currently using a 10nf in series with a 2k resistor. I also use a 1mH inductor in parallel with the diodes, which gives me a great looking signal atm. (I'll soon post a screenshot of my scope)

You are correct about the 328p, the fastest I can sample with the Uno is around 16-20us, way slower than what I need. I will however try and use the Due tomorrow (I got two with me).

The current application for this is an echosounder, just for depth which I feel I can accomplish with just timing but I rather digitize the signal and do some DSP with it for future projects of underwater acoustics. Seems like 4us sampling (250KHz) is the best I can accomplish with the Due, from reading this:

Seems I'm close now to getting this into the Due, if it could do 500KHz (apparently stated in the datasheet) I would be golden...

I'll also look into that higher BW op-amp, Thanks!
12  Using Arduino / Sensors / Re: Small signal and high voltage on: May 01, 2013, 04:09:56 pm
Thanks for all the replies!

The dual diodes trick certainly got me started! I tried that spice circuit and as dc42 mentions, I used the 102 capacitor, replaced the 100k resistor with a much smaller one and got better results, also used a 1mH inductor to dissipate the DC build up, the end result so far is a really short blanking area of <100us (way better than I expected).

As dc42 also mentions, the bandwidth limitations of the LM324 would not allow me to even make a unity gain filter.
I now realize I need much better bandwidth op-amps. What would you guys suggest?
13  Using Arduino / Sensors / Re: Small signal and high voltage on: April 30, 2013, 04:47:31 pm
My transmit pulse is about 100 us, this signal returns after a short period (a couple hundred microseconds) so there is no overlapping between transmit and receive, both are 200 KHz. I would like to transform the return signal up to 0 to 5v, currently it is a couple hundred millivolts on the best case.

14  Using Arduino / Sensors / Small signal and high voltage on: April 30, 2013, 04:20:45 pm
I'm building a water echosounder with a single transducer (200 KHz). All works well on the transmit side, but now I want to read the small signal returning. My transmit is in the hundreds of volts (about 600-800 vpp) and the signal I'm interested in is in the millivolts. From the end of the transmission to the start of receiver could be as low as 150 us.

My problem is that I can't figure out a way to hook up this to a microcontroller without burning it. How could I extract the smaller signal ?
15  Using Arduino / Project Guidance / Re: Fast sampling ADC on: July 01, 2011, 03:25:59 pm

That SRAM chip might just do it for me!

After I get some SRAM, I could just do some simple code to read and write over SPI as fast as possible for say 5ms and see how many times it does it. I wonder how you guys manipulate the sampling rate of the Arduino's ADC? If this even helps...?
Pages: [1] 2 3 ... 8