Show Posts
Pages: [1] 2 3
1  Using Arduino / Displays / Re: Round LCD and Driver Help on: July 27, 2013, 01:40:00 pm
did you ever get these displays to work?
2  Using Arduino / General Electronics / What are these spring pins called? on: July 27, 2013, 04:40:03 am
So I was looking at the PCB of the metawatch and I wanted to know what these spring pins were called in the picture below.
http://sensorseverywhere.files.wordpress.com/2011/10/img_0210.jpg
There are 4 on the right of the PCB and one in the center. They appear to make contact with mating pogo pins.
Thanks
3  Products / Arduino Due / Arduino Due Backup Mode on: July 21, 2013, 11:30:57 am
So i was reading the ATSAM3X8E's data sheet and came across Backup Mode under low power modes and was wondering how can i put the due in that state. The data sheet says that it requires a WFE instruction with the SLEEPDEEP bit in the system control register to be 1. My question is how do i do that? I don't see any documentation describing it anywhere.
4  Using Arduino / Networking, Protocols, and Devices / Alert Pin - Active Low on MAX17043 what does it mean? on: July 21, 2013, 12:10:46 am
So this is probably a really simple question, in reading the data sheet for MAX17043 and designing a circuit for it, i came across the following line

Alert Output. Active-low interrupt signaling low state of charge. Connect to interrupt input of the
system microprocessor.

So my question is what exactly do they mean?
Is the line usually HIGH and when the IC detects an Alert it will turn the Alert line LOW?

Data Sheet - http://datasheets.maximintegrated.com/en/ds/MAX17043-MAX17044.pdf
5  Using Arduino / Microcontrollers / Re: [Solved] Help with ATSAM3X8E (Due barebones) on: July 18, 2013, 04:26:03 pm
As per baselsw recommendation i'll post this here.
Quote
Hi baselsw,
I was looking at your schematic for the barebones DUE clone, I wanted to confirm something from you,
 SV1 headder's pin 1 is pin 1 on atsam3x8e and pin 1on SV2 is pin 37 on the atsam3x8e and so on so forth?

Also i see that in your schematic for VDDCORE and VDDPLL pins on the atsam3x8e you are powering them with 1.8V but i don't see where you are creating the 1.8V. I don't see any resistive divider or any regulated source with that output. Can you tell me how you are creating that source.

Thanks

Taha

Hey Taha,

Yes, pin 1 on SV1 is pin 1 on atsam3x8e, the same goes for SV2, so you're correct there.

The 1.8V is supplied from the internal voltage regulator (pin 56 [VDDOUT]).. You can see how it's connected on page 22 in the atsam3x8e datasheet, here is the link: http://www.atmel.com/Images/doc11057.pdf

If you have any more questions feel free to ask. But please use the thread instead, so others can learn also =)..

Best regards
//Basel

I thought i'd add this here for everyone else SV2 in baselsw's schematic the pin numbers is are incorrectly labled SV2 e.g. Pin1 goes to ATSAM3X8E -  Pin38 (DHSDM) not Pin37. So if anyone uses it as a reference they should be weary of this.
6  Using Arduino / Microcontrollers / Re: [Solved] Help with ATSAM3X8E (Due barebones) on: July 17, 2013, 03:57:05 pm
baselsw i had another question whats the power consumption like with the barebone circuit?
7  Using Arduino / Microcontrollers / Re: [Solved] Help with ATSAM3X8E (Due barebones) on: July 17, 2013, 03:55:52 pm
As per baselsw recommendation i'll post this here.
Quote
Hi baselsw,
I was looking at your schematic for the barebones DUE clone, I wanted to confirm something from you,
 SV1 headder's pin 1 is pin 1 on atsam3x8e and pin 1on SV2 is pin 37 on the atsam3x8e and so on so forth?

Also i see that in your schematic for VDDCORE and VDDPLL pins on the atsam3x8e you are powering them with 1.8V but i don't see where you are creating the 1.8V. I don't see any resistive divider or any regulated source with that output. Can you tell me how you are creating that source.

Thanks

Taha

Hey Taha,

Yes, pin 1 on SV1 is pin 1 on atsam3x8e, the same goes for SV2, so you're correct there.

The 1.8V is supplied from the internal voltage regulator (pin 56 [VDDOUT]).. You can see how it's connected on page 22 in the atsam3x8e datasheet, here is the link: http://www.atmel.com/Images/doc11057.pdf

If you have any more questions feel free to ask. But please use the thread instead, so others can learn also =)..

Best regards
//Basel
8  Using Arduino / Project Guidance / Re: bluetooth HCI communication on: July 14, 2013, 12:06:37 am
Hi I'm looking into this module as well did you ever get it to work?
9  Using Arduino / Storage / Re: Dataflash AT45DB161D and Arduino Leonardo on: November 13, 2012, 11:32:25 am
Okay so i finally got the AT45DB161D to work with the leonardo. I used another library i found online http://blockos.github.com/arduino-dataflash/ maybe this can be helpful for someone else. The pageTest example in the library should work with little work, but i found it to be more geared towards uno and duemilanove. Below is a little sketch i wrote to test the Lenonardo. you can also download it from here http://code.google.com/p/osyrisos/downloads/list

Code:
// DATAFLASH LEONARDO TEST.
//
// Pin Connections Dataflash to Arduino Leonardo
//
//  DataFlash  Arduino Leonardo
//    pin 1  ---   pin 16
//    pin 2  ---   pin 15
//    pin 3  ---   pin  8
//    pin 4  ---   pin 10
//    pin 5  ---   pin  7
//    pin 6  ---   3.3V
//    pin 7  ---   GND
//    pin 8  ---   pin 14
//
// AT45DB161B Pin Layout
//         ___
//  SI  1 | u | 8 SO
//  SCK 2 |   | 7 GND
//  RST 3 |   | 6 VCC
//  CS  4 |___| 5 WP
//
// Arduino Leonardo ICSP Pin Layout
//
//              _____
//  D14 MISO 1 |__|__| 2 VDD
//  D15 SCK  3 |__|__| 4 MOSI D16
//      RST  5 |__|__| 6 GND
//
// This sketch is using blockos arduino-dataflash library available here:
// http://blockos.github.com/arduino-dataflash/
// and uses the arduino-timerone Library avaiable here:
// http://code.google.com/p/arduino-timerone/downloads/list
// Example by Taha Bintahir, http://mtaha.wordpress.com
//************************************************************************************


#include <DataFlash.h>
#include <TimerOne.h>
#include <SPI.h>

#define ledPin 13 // LED @ pin 13
#define baudRate 115200 // Baudrate for serial communication
#define timerIntterupt 1000 // Microsecond tick
#define lF 10 // ASCII Linefeed
#define msgLength 512 // Message Length

DataFlash dF; // DataFlash library object

unsigned long tickCounter = 0; // Tick counter used for subtimers
byte mode = 0; // 0 - default waiting mode, 1 - store mode, 2 - read mode

void setup(){
  uint8_t dFStatus;
  DataFlash::ID id;
 
  pinMode(ledPin, OUTPUT); // Initialise Led Pin
  digitalWrite(ledPin, LOW); // Ensure Led is turned OFF
 
  Serial.begin(baudRate); // Initialise Serial Communication @ 115200 bps
  SPI.begin(); // Initialise SPI
 
  Timer1.initialize(timerIntterupt); // Initialise Timer1 @ 1ms tick
  Timer1.attachInterrupt(timerIsr); // Initialise Timer1 Interrupt Subroutine function
 
  //delay(25000); // 25sec delay, allow us to press the serial monitor button and to compensate for the Leonardo to be detected by the PC
  while(!Serial){
    // Wait for serial port to connect. Needed for Leonardo only
  }
 
  dF.setup(10, 8, 7); // Initialise DataFlash SS - pin 10, RST - pin 8, WP - pin 7
 
  delay(10); // Settling time
 
  dFStatus = dF.status(); // Read status register
 
  dF.readID(id);
 
  // Display status register
  Serial.print("Status register :");
  Serial.print(dFStatus, BIN);
  Serial.print('\n');

  // Display manufacturer and device ID
  Serial.print("Manufacturer ID :\n");  // Should be 00011111
  Serial.print(id.manufacturer, HEX);
  Serial.print('\n');

  Serial.print("Device ID (part 1) :\n"); // Should be 100110
  Serial.print(id.device[0], HEX);
  Serial.print('\n');

  Serial.print("Device ID (part 2)  :\n"); // Should be 00000000
  Serial.print(id.device[1], HEX);
  Serial.print('\n');

  Serial.print("Extended Device Information String Length  :\n"); // 00000000
  Serial.print(id.extendedInfoLength, HEX);
  Serial.print('\n');
 
  Serial.println();
  Serial.println("Press 'S' to store data or press 'R' to read data"); 
   
}
void loop(){
  // Read Serial buffer only when there is data present
  if(Serial.available() > 0){
    uint16_t inByte = 0;
   
    inByte = Serial.read(); // Read Serial Buffer
    if(inByte != 0){
      // If 'S' byte is read
      if(inByte == 'S'){
        mode = 1; // Set state machine to mode 1
        Serial.println("What page do you want to store your data on?");
        while(1){
          // Store Data;
          if(Serial.available()){
            inByte = Serial.read();
            // If '`' is recieved exit out to main menu
            if(inByte == '`'){
              inByte = 0;
              mode = 0;
              mainMenu();
              break;
            }
            // Store data in page specified by user
            storeData(inByte);
            mainMenu();
            break;
          }
        }       
      }
      // if 'R' byte is read
      else if(inByte == 'R'){
        mode = 2; // Set state machine to mode 2
        Serial.println("What page do you want to read data from?");
        while(1){
          // Read Data
          if(Serial.available()){
            inByte = Serial.read();
            // If '`' is recieved exit out to main menu
            if(inByte == '`'){
              inByte = 0;
              mode = 0;
              mainMenu();
              break;
            }
            // Read data from user specified page
            readData(inByte);
            mainMenu();
            break;
          }
        }       
      }
    }
  }
}

// Timer1 Interrupt Subroutine Function triggered every 1ms
void timerIsr(){
  tickCounter++; // Count number of ticks
 
  // SubTimer1 @ 250ms
  if(tickCounter % 100 == 0){
    //Serial.println(mode);
    if(mode == 1){
      digitalWrite( ledPin, digitalRead(ledPin)^1 ); //  Blink LED every 250ms in Store mode
    }   
  }
 
  // SubTimer1 @ 500ms
  if(tickCounter % 500 == 0){
    //Serial.println(mode);
    if(mode == 2){
      digitalWrite( ledPin, digitalRead(ledPin)^1 ); // Blink LED every 500ms in Read mode
    }
  }
}

void mainMenu(){
  mode = 0; // Set state machine to default - 0
 
  // Check if led is turned ON if it is turn it OFF
  if(digitalRead(ledPin) == HIGH){
    digitalWrite(ledPin, LOW);
  }
 
  Serial.println();
  Serial.println("Press 'S' to store data or press 'R' to read data"); // Print main menu again
}

void storeData(uint16_t nPage){
  char msg[msgLength]; // Serial Read message buffer
  byte dataLength = 0; // Number of bytes recieved in the message
 
  Serial.println("Enter Data String: ");
  while(1){
    if(Serial.available()){
      dataLength = Serial.readBytesUntil('\n', msg, msgLength);
      break;     
    }   
  }
  msg[dataLength] = '\0'; // Terminate end of message with '\0' to easily find EOF
 
  dF.bufferWrite(1,0); // Select dataflash buffer 1 @ 0 offset
 
  // Transfer message to DataFlash Buffer
  for(int i = 0; msg[i] != '\0'; i++){
    SPI.transfer(msg[i]);
  }
 
  SPI.transfer('\0'); // Add '/0' to locate EOF within the DataFlash
 
  dF.bufferToPage(1, nPage); // Write DataFlash Buffer 1 to Pag
}

void readData(uint16_t nPage){
  uint8_t data; // Byte storage of data as recieved
 
  Serial.print('Page being read: ');
  Serial.println(nPage);
 
  dF.pageRead(nPage, 0); // Read user specified page from offset 0
 
  // Send FF to retrieve bytes from DataFlash
  do{
    data = SPI.transfer(0xff);
    if(data != '\0'){
      Serial.print(data);
    }
  }while(data != '\0');
 Serial.println();
}
10  Using Arduino / Storage / Dataflash AT45DB161D and Arduino Leonardo on: November 11, 2012, 01:59:24 am
Okay so i've been trying to get the at45db161d with the leonardo for the past couple of hours using the library available in the playground and haven't had much luck with it.
After looking online i realised that the SPI headders are no longer populated with the DIO headers instead they are on the ICSP header I modified the library to use those pins instead pointing them to:
MISO -  Digital 14   
SCK -   Digital 15   
MOSI - Digital 16

Since SS pin is not brought out on the leonardo I initially tried using just a regular DIO pin in my case D11, which didn't work. Next reading online I found out that the SS pin can be tapped into using the via just on top of RX Led and pointing the code to use D17; that hasn't worked either.

I've tested the flash using an Arduino Mega (Mega1280) and using its SPI headers and the flash is working without any issues with the Leonardo it hasn't worked. Any Ideas?
11  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Slave to Arduino Master SPI on: May 20, 2011, 10:30:51 am
Okay so i may have come across another issue as you guys suggested i started looking into Ethernet to send the data across to the PC. i came across the WIZ811MJ Ethernet module it seems to be a popular one, that can be interfaced with the Ethernet Library. I noticed that it was that the WIZ811MJ also worked over the SPI protocol. Now i'm wondering would this cause any problems me?
12  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Slave to Arduino Master SPI on: May 11, 2011, 09:53:46 am
I guess you are right i've been thinking it over all day yesterday, Ethernet with a simple chat server maybe the way to go it should be much faster for communication plus it'll give me additional bandwidth just in case for future expansion. So reading over everything you guys are recommending that i keep the parallel approach for acquiring data from the sensors to the slave arduino but i should go with a traditional master->slave hardware spi configuration for data concentration on the master arduino and ouput it all via ethernet? 
13  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Slave to Arduino Master SPI on: May 10, 2011, 10:23:40 am
Quote
The drawing shows 8 sensors going to a single ADC, are they 8-input chips? What sample rate do you need?

At 8 bits each that's 1024 bits of data, have you done the maths? At the end of the day all this data has to get to a PC and AFAIK the fastest you can do this from an Arduino is 115200bps (via USB anyway, maybe using Ethernet would be faster).

Yes, I'm using a MCP3208 its a 8 Channel, 12-bit ADC. For my final prototype i intend to use 5390 sensors; however i plan to threshold sensor values to restrict the amount of data flow; Further more i plan limit the number of inputs to 30 which equates to about 175 sensors; this should decrease the bandwidth i need even further- 175*12*50 (number of sensors * bits per sensor * samples per second) = 105000bps this is under the 115200bps that the Arduino can output. So theoretically it should work.  
14  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Slave to Arduino Master SPI on: May 09, 2011, 02:32:28 pm
One last thing, at the moment my prototype board has the following architecture where the SPI interface between the ADC and the Arduino is Bit Bang SPI using the bus architecture model as what i have posted above.

Now what i want to do is expand on this project by having multiple modules such as this sending data to the pc for that i though i'd use another arduino (just one as a master) that acts as a data concentrator to collect all the data from multiple modules and send it to the computer. After reading what you guys said, I'm just wondering would it be possible to change the Bit Bang SPI to hardware SPI while at the same time have the master arduino acting as a data concentrator on the same bus? it would kinda be like this:

Master Arduino -> Slave Arduino -> ADC -> Sensors
                      -> Slave Arduino -> ADC -> Sensors
.
.
.

Now another thing, would this be the best architecture for system, i want the design optimsed for speed i.e. the data which is received at the PC (the faster it is the better), i would think daisy chaining would be faster since you won't have the master communicating to each slave saying send me data.
15  Using Arduino / Networking, Protocols, and Devices / Re: Arduino Slave to Arduino Master SPI on: May 06, 2011, 02:07:10 pm
Thanks for all the information. After reading more i don't think theres a major advantage apart from saving pins if i were to go with Daisy Chaining. And since im using the Arduino Mega i'll more than enough pins. One thing i did come across and wanted more information on was the SS pin; the SPI hardware has only a single SS pin i presume to select other slaves on your BUS you can substitute the any DI pin as an SS pin to select a slave?
Pages: [1] 2 3