Show Posts
Pages: 1 ... 56 57 [58] 59 60 ... 107
856  Using Arduino / Storage / Re: SD ReadWrite example writes too often on: September 12, 2012, 10:17:27 am
An Arduino sketch starts when you power up or load a sketch.  The Arduino is reset when you open the serial monitor.  This means the sketch runs several times, not just once.

Change this:
Serial.print("Initializing SD card...");

To this:

Serial.println("Type any character");
 while ( < 0);
 Serial.print("Initializing SD card...");

This will prevent writing to the SD before the serial monitor is running.

Then run the sketch and type a character when this message prints.
Type any character
857  Using Arduino / Storage / Re: SD Card filesystem poblem on: September 12, 2012, 10:04:50 am
Modern SD cards are very tolerant to voltage drops.  They don't commit writes when power is failing. 

The SD data blocks have very powerful ECC so hardware write errors would be detected when you read the Sd on a PC or Mac.

This is a software problem.

How do you run data logging while GPRS is working?

You can't have a file open more than once and you can't call SdFat functions in an ISR.
858  Using Arduino / Storage / Re: How robust is SDlib to other interrupts on: September 12, 2012, 09:14:12 am
SD cards seem to be very tolerant for delays in SPI transfers.  I have delayed for many milliseconds mid-transfer with no problem.

Many people call analogRead() for several pins in an ISR while data is being written to the SD with no problem.  Each call takes about 120 microseconds.

SdFat uses millis() to detect timeout errors so spending more than a millisecond in an ISR will cause millis() to drop counts.  This should just extend the length for a timeout error.
859  Using Arduino / Storage / Re: SD Card filesystem poblem on: September 11, 2012, 12:22:07 pm
Do you get corrupt files if you don't comment out the remove()?

If you still have the problem with remove(), is is likely something is writing over SdFat memory. 

Remove() needs to do lots of writes to the SD and would likely cause file-name problems if SdFat memory is overwritten.
860  Using Arduino / Storage / Re: SD Card filesystem poblem on: September 10, 2012, 05:10:21 pm
I am the author of SdFat which is also the base for SD.h. 

I have found most bugs that result in junk file-names are due to overwriting SdFat internal memory.  The SD cache often has a directory block with 16 directory entries so you get lots of junk names if it is over written.

Check loop indices, array dimensions, strings with no zero byte termination, bad pointers, and any other causes of overwriting memory.
861  Using Arduino / Storage / Re: Sd works in example append but fails in integration. on: September 10, 2012, 05:00:12 pm
SdFat only supports FAT 8.3 names.  This name has nine characters before the dot so is not valid.

char name[] = "GardenLog.TXT"
862  Development / Other Hardware Development / Re: Teensy 3.0 on: September 08, 2012, 12:16:41 pm
I wasn't very clear, I am sure you can generate a hex file with any Cortex M4 tool chain.

Here is my question.   How easy is it to load an arbitrary hex file?

I read this also
Teensy 3.0 features an off-chip bootloader design.  On Teensy 2.0 and all Arduino(R)** brand boards, the bootloader consumes a small portion of the available flash memory.  On most boards, the bootloader executes briefly before your own program.  By storing the bootloader in a separate chip, your code can use all of the flash memory.  Your code can also run immediately after a reset event, without bootloader interference.

I wonder how you start the boot loader?

My guess is that the button copies the boot-loader into RAM.  The boot-loader can then program all flash.

Perhaps the boot-loader uses FlexMemory.  I don't have a clear understanding of FlexMemory.

The next question is how do you send the hex file to the boot-loader?
863  Development / Other Hardware Development / Re: Teensy 3.0 on: September 08, 2012, 09:17:17 am
You should be able to use any tool chain that supports Cortex M4 processors.  

The only problem could be how Paul's boot-loader works on Teensy 3.0.  You need a hook to load you hex file.

The easy way is to use what ever Paul has packaged with his software.  His stuff is always easy to use and reliable.

I am hoping to make ChibiOS a library for Teensy 3.0 using his tools.  That way I can use his tools and have a RTOS.

I did that with the Arduino IDE for AVR processors.

I really like Freescale's documentation.  Here is a good overview of true bare metal use of the device
864  Using Arduino / Storage / Re: Bug in SD library ?! on: September 08, 2012, 08:57:54 am
This bug has been around for a long time. 

It is now in the issues list
865  Using Arduino / Sensors / Re: OPamp on: September 07, 2012, 10:33:58 am
Sorry I didn't understand you wanted to learn op-amp use.

I you just want typical bathroom scale accuracy the Arduino is fine.  You won't need much amplification to get that level of accuracy.

The sensor in the scale is probably a half bridge like this

Sparkfun has this link

The video uses a full bridge sensor but you just need two resistors and/or a pot to complete the bridge.  The video uses a true instrumentation amplifier, an AD620, which is expensive but easy to use.

18 - 24 bit delta-sigma ADCs are a better fit for this type application.  A delta-sigma ADC requires less signal conditioning circuitry, less amplification, and has greater resolution than the Arduino SAR ADC.

There are lots of app notes like this on the web:
866  Using Arduino / Storage / Re: Small SDCard library on: September 06, 2012, 04:29:50 pm
You might want to look at my Fat16 library

It's smaller than my SdFat library but only supports FAT16 on standard SD cards.
867  Using Arduino / Sensors / Re: OPamp on: September 06, 2012, 04:23:50 pm
The Arduino ADC just isn't a good choice for measuring a bridge, even with an amplifier.

The MCP3422 was designed as a single part solution for low voltage differential measurements.
The part costs a little over $3.00.  Here are typical applications:
Temperature Sensing with RTD, Thermistor, and Thermocouple

Bridge Sensing for Pressure, Strain, and Force

Weigh Scales
868  Development / Other Hardware Development / Re: Teensy 3.0 on: September 06, 2012, 08:09:09 am
I have been using lots of Cortex boards including M4 boards and this is the most elegant board I have seen.

I pledged and can't wait to see the Teensy 3.0.

The Freescale Kinetis processor is an excellent choice.  It's amazing to see that 64 pin part on such a tiny board.  It truly is Teensy.

I hope this mean it will be open enough so I can port a RTOS like ChibiOS to it.
Teensy 3.0, an affordable 32 bit ARM Cortex-M4 board, for development in Arduino or C/C++.

I have been using ChibiOS and really like having the same RTOS on all boards.
869  Using Arduino / Sensors / Re: OPamp on: September 06, 2012, 07:22:11 am
I assume the load cell has no amplifier.  If it has typical ratings, a MCP3422 or MCP3424 would work well.

The LSB (Least Significant Bit) at full gain corresponds to about 2 microvolts.

This is an 18-bit ΔΣ ADC with Differential Inputs. It has these features:

On-Board Programmable Gain Amplifier (PGA) with gains of 1, 2, 4 or 8.

On-Board Voltage Reference (VREF) Accuracy: 2.048V ± 0.05%.

I2C interface.

Here is an old post with some test code
870  Using Arduino / Storage / Re: SdFat update on: September 03, 2012, 05:38:15 pm
SdFat has been totally rewritten since the version used with the SD.h wrapper so it is not practical to update the version of SdFat used in SD.h.

The Arduino company is responsible for SD.h and has never contacted me so I don't know if they have plans to update to the new SdFat.
Pages: 1 ... 56 57 [58] 59 60 ... 107