Show Posts
Pages: 1 [2] 3 4 ... 140
16  Using Arduino / Storage / Re: Which microSD cards to use for low current & low power consumption? on: August 16, 2014, 09:03:03 am
The newer (larger) cards are smaller fab technology, maybe ~65nm, the older (smaller) ones are larger fab process.
There is a specific size with typical CMOS technology (something like 150-180nm) where:

>150nm - the dynamic currents (capacitive one) are higher, static leakage currents are lower,
<150nm - the dynamic currents (capacitive one) are lower, static leakage currents are higher.

I would estimate  

I_tot = I_dyn + I_leak = N*freq*p + N*q,

where N is number of transistors, freq is freq, and p and q are some "constants".

Moreover, the new one have got much more transistors on the chip there, so the leakage currents are much higher.

And, the newer cards may spend much more time with wear leveling (larger blocks, etc.)..
17  Using Arduino / Storage / Re: Which microSD cards to use for low current & low power consumption? on: August 15, 2014, 06:04:18 pm
For example:

He did not measure the peak but the average currents upon a write operation - he got 1:10 ratio (provided he did the measurement properly). Interesting..
18  Using Arduino / Storage / Re: Which microSD cards to use for low current & low power consumption? on: August 15, 2014, 07:03:50 am
1. the easiest test is to measure the current, best with a digital storage oscope in order to see the current peaks smiley
2. the "old" 128MB cards are usually 2-3x faster, so the "average" current could be smaller
3. with modern high capacity cards I would design the Vreg for 150mA peak
4. a good decoupling at Sdcard's Vcc<->Vss (a ceramic multilayer capacitor of 10uF-22uF as a minimum) is a must (to cover the current peaks)..
19  Using Arduino / Storage / SdCard - reverse engineered on: August 15, 2014, 06:50:40 am
Interesting article on how Joshua REd an NAND Sdcard..

I have described the full recovery of data from an SD card that sustained extensive physical damage. I have described the process of physically connecting to the flash medium; of electrically interfacing with it; of removing the “whitening” from the data; of repairing corrupted data using the ECC information on disk; and of translating linear addresses into physical addresses as controlled by a flash translation layer.
20  Using Arduino / Storage / Re: Suggest a temporary storage? on: August 04, 2014, 01:01:27 pm
With the bluetooth module always on and streaming data constantly the battery lasts for about 1.5 hours. It's not bad but I'd like it to last longer if possible.
What kinds of write/read speeds I could expect from an SRAM chip or an SD card?

The HC-05 module for example, takes 40mA when pairing, 20mA when paired, and 2mA in sleep (at least my firmware does it that way - after 5 secs of inactivity at the arduino side it goes to sleep, it wakes up when you send data out of arduino).

I was thinking that I could improve the power consumption by having a temporary storage for the data and sending it in bursts when necessary instead of streaming everything all the time.

When you switch off the BT completely you have to pair it again - so you have to tell arduino somehow it shall switch the BT on and wait until paired. The pairing costs a lot of energy.

Speeds - with FRAM/SRAM/MRAM and arduino @8MHz you may get 15usecs for a random byte r/w, and about 3usec per byte when r/w a block of data. Mind all that serial memories require 4/5bytes+1 to transact via SPI in order to r/w a single byte, or 4/5+N when r/w a block of N bytes..
21  Using Arduino / Storage / Re: Best way to format data for analysis on: July 26, 2014, 02:42:09 am
Just print all the data delimited by a "," and with cr/lf at the end of a measurement. That's it.

A measurement at time X (use the data_xy as it is in your above code) ie.:

You will get the CSV format:

Before the start of the measurement loop print the headers (column names) in the same manner, ie.:

myFile.print("Humidity S1");
myFile.print("Temperature S1");
myFile.print("Dew point S1");
myFile.print("Dew point S3");

So your CSV file will look like (there will be the actual numbers instead of time and data_xy of course):
Time,Temperature S1,Dew point S1,..,Dew point S3
You may load such file directly to a spreadsheet then..

22  Using Arduino / Project Guidance / Re: Any way to add SRAM to Arduino? on: July 26, 2014, 02:31:19 am
You may use an external SPI SRAM/FRAM/MRAM, up to 512kBytes per chip (8pin serial SPI). The access is slow however, maybe 10-15usec/byte with a random byte access with arduino. A block access, ie. 512bytes is much faster, maybe 2-3usecs/byte.
Then you may use the 8MB Ramdisk - it requires 11 pins for signals and it is a bit faster than the SPI SRAM (there is a thread in Other HW development forum about it)..
23  Using Arduino / Sensors / Re: SPI and multiple and different types of sensors on: July 25, 2014, 11:46:31 am
From all SPI_CLOCK_DIV different values, SPI_CLOCK_DIV8 is the only one working good with the LDC.
I will study your suggestion on the buffer. For the moment I don't have the option to add more cables.
You may try to provide a kind of simple impedance matching - 10-33ohm in series with the signals (at the atmega side) may help to suppress ringing, also to terminate the cable (at the far end) may help as well (ie. ground all signals with let say 1kohm resistors, or lower, when the sensors are able to create the log1 properly with such impedance).
PS: try to terminate the cable with 270-330ohm at SCK, DO (data output from atmega), CS signals.  I will not terminate the DI (the data output of the sensors) as the sensors may have not a sufficient fanout).
24  Using Arduino / Sensors / Re: How do I use a KTY 81-220 temperature sensor in arduino? on: July 25, 2014, 11:35:07 am
The KTY81-xxx is a thermistor (Rt) with a positive temperature coefficient of resistance. See the datasheet for calibration data..
You may wire it as a part of a bridge, or a part of a simple voltage divider.
Search for "bridge thermistor"
25  Using Arduino / Sensors / Re: SPI and multiple and different types of sensors on: July 25, 2014, 05:32:28 am
2m long wire is too long for an SPI unless it is a cable with proper impedance matching (to suppress ringing, reflections, etc.) , moreover you may need a buffer/driver in order to feed such cable with 16 SPI inputs hanging on it.
Mind each device input loads the SPI bus with a capacitance, which adds. So your capacitance is 16x bigger than with a single device.
Try to use a bus driver for the SPI bus (ie. 74HC125), better to split the bus into more buses in parallel, driven by the drivers. You may also try to use 8-16x slower SPI clock, maybe it will work.
26  Development / Other Hardware Development / Re: Half-Byte Computer 'console'-ATMega 328 based 'computer' and gaming console on: July 15, 2014, 12:04:16 am
Finally, I am need of a storage solution for Tiny Basic. Since only a thousand bytes are left for TB program space, I cannot use the SD card library, which requires 512 bytes for a buffer. I don't want this board to have to be tethered to a computer, so I need something simple and very cheap. 
The simplest and cheapest solution is to redesign the stuff with atmega1284p (or better) and a microsd socket..

27  Community / Exhibition / Gallery / Re: Arduino 6502 emulator + BASIC interpreter on: July 06, 2014, 07:21:00 am
This is the version with transferring deltas only from C64 video RAM to the VT100 terminal (25 rows x 40 columns).
VRAM is a temporary video memory holding "old" characters. We compare the new RAM[] to VRAM and if a difference we print the new character at the VT100 [row,col] position.

Mind you have to have CapsLock on on your keyboard..

Works nice with VT100 in TeraTerm.

uint8_t VRAM[1000];

void VTposition(uint8_t row, uint8_t col) {
Serial.print(row + 1);
Serial.print(col + 1);

void setup () {
Serial.begin (115200);
Serial.println ("Booting the ROM..");
for (int i=0; i<1000; i++){
VRAM[i] = RAM[i+1024];

void loop () {
int v_address = 0;
for (uint8_t row=0; row<25; row++) {
for (uint8_t col=0; col<40; col++) {
if (Serial.available()) {
curkey = & 0x7F;
RAM[198] = 1;
RAM[631] = curkey;


uint8_t petscii = RAM[v_address + 1024];

if (VRAM[v_address] != petscii) {
VRAM[v_address] = petscii;
VTposition(row, col);
if (petscii<32) petscii = petscii + 64;
28  Development / Other Hardware Development / Re: 8MB Ramdisk (external RAM) for Arduino.. on: July 05, 2014, 06:40:41 pm
We found out that for experimenting with DUE's EMB bus timings it is better to fill in the memory with random numbers. Below find the sketch.
// DUE EMB Example for 8MB Ramdisk v.1.1
// Library used:
// DUE at 84MHz (12ns clock)
// Provided as-is, no warranties of any kind
// Pito 7/2014

/* Wiring:
 RDisk   DUE's header    DUE's EMB signal name
 D0-D7   PIN34-PIN41     D0-D7
 /WR     PIN45           NWE
 /RD     PWM4            NRD
 /DATA   PWM9            A0 (A0=0 wr/rd data, A0=1 wr addresses)
 /MS     GND             GND

#include <Parallel.h>

// Setting up the rd/wr starting Address (8388607 max)
int set_address(unsigned long address){
Parallel.write(1, address >> 20);  // addr[23..20]
Parallel.write(1, address >> 16);
Parallel.write(1, address >> 12);
Parallel.write(1, address >> 8);
Parallel.write(1, address >> 4);
Parallel.write(1, address);  // addr[3..0]

void setup() {

// Configure parallel bus for 8bits, no CS, A0, and NRD and NWE
Parallel.begin(PARALLEL_BUS_WIDTH_8, PARALLEL_CS_1, 1, 1, 1);

// Configure bus timings.. EXPERIMENTAL
// We do not use any real addressing

// NWE, NCSWE, NRD, NCSRD  - we do not use NCSs

// better read datasheet for CycleTiming:

// make a dummy read;

// set the Serial

void loop() {

unsigned i;
unsigned sumr, sumw, elapsedw, elapsedr;
unsigned char data;


Serial.println("START OF THE TEST");

// Write 1 million random data
sumw = 0;
elapsedw = millis();
for(i=0; i<1000000; i++){
data = random(256);
Parallel.write(0, data);
sumw = sumw + data;
elapsedw = millis() - elapsedw;

// Read and sum 1million of data from Address=0L
sumr = 0;
elapsedr = millis();
for(i=0; i<1000000; i++){
sumr = sumr +;
elapsedr = millis() - elapsedr;

Serial.print("SUM_W = ");
Serial.print("SUM_R = ");
Serial.print("ELAPSED WRITE = ");
Serial.println(" msec");
Serial.print("ELAPSED READ = ");
Serial.println(" msec");
Serial.println("TEST STOP");
Serial.println(" ");

29  Using Arduino / Storage / Re: Any ideas how can one program this SRAM? on: July 05, 2014, 06:21:48 pm
What about this:
8MBytes, 11 wires only, compatible with EMB-SMC bus, existing driver for DUE interface with 4.3MBytes/sec - see the topic.
You can connect several modules in various configurations.
It has got an autoincrement, so you set the initial address and then just write/read the data..
30  Using Arduino / Storage / Re: Using Mighty 1284P with SD card issues. on: July 05, 2014, 06:13:34 pm
Do you use a solderless breadboard? If so try to refresh all the contacts (put out/in the wires/pins few times)..
Pages: 1 [2] 3 4 ... 140