Show Posts
Pages: 1 [2] 3 4
16  Using Arduino / Sensors / LM34 temp creep due to sun/selfheating? on: April 10, 2011, 01:19:30 pm
So I just transferred my project from a bread board (where everything was working great) to a more permanent solution and I'm having a weird issue where my LM34 sensor starts creeping up from about 65F (correct) to over 100F even though the ambient temperature hasn't changed.  Anyways, unless I'm mistaken, it seems really sensitive to sunlight- as the temps start dropping as soon as I put it in the shade, but doesn't seems to stabilize around 70F.

I could imagine a slight increase in temp due to morning sunlight during a cool morning, but 40F bump?  I'm not placing it in an enclosure- not sure why it seems to be self heating.  Ideas?
17  Using Arduino / Project Guidance / Re: Arduino+Breadboard to custom PCB project on: March 23, 2011, 04:46:46 pm
Anyone with suggestions on cost effective ways to power a project like this?  One idea I had was using a MAX756 setup like MintyBoost to generate 5V off 2-3AA's and then a 5V->3.3V step down regulator like the LM3901 for the SD/LCD, but I'm looking at over $10 in parts which seems a bit much (and that's not even using tentalum caps).

Sparkfun has a $6 NCP1400 5V step up breakout board which would shave off a about $3, but I'm a bit hesitant to use a breakout board for limited gain (I'm hoping to open source the project hardware & software so other people can build it and you never know when Sparkfun will discontinue a part).  Trying to solder such a small SMD part like the NCP1400 seems way over my abilities (or the average hobbyist).

Still trying to figure out how to determine the power draw of a thermistor so I can run some calculations on my power requirements.  I suppose I could just "wing it", but I figured that it wouldn't be too hard to do it right.
18  Using Arduino / Project Guidance / Re: Arduino+Breadboard to custom PCB project on: March 22, 2011, 03:28:23 pm
Thanks for the tip.  I was aware I could always swap Atmega chips, but frankly that seems like more work then it's worth each time I want to update the code- shouldn't be that often, but I guess I'm at the point in this project that if it's worth doing, then it's worth over doing!  I'm actually hoping to design my own PCB's (one for the receiver & transmitter) and either etch it myself or have them done via something like BatchPCB.  That's a little bit farther down the road I guess though... I still need to figure out a good way to power both ends since I don't want to use a wall wart.
19  Using Arduino / Project Guidance / Arduino+Breadboard to custom PCB project on: March 22, 2011, 12:49:34 am
I have been working on an Arduino based project for a while now and it's getting the point I'd like to make it more permanent/professional looking by building a custom PCB for it.  I'm not looking to make a shield, but rather I'd like to convert my project to a standalone board.   I know the next step is to breadboard everything out (no more arduino boards, but use a ATmega328 with Arduino Bootloader).

The project currently consists of two Uno's talking over a simple 315Mhz RF link.  One side collects temperature readings via some thermistors and the other has an LCD display, SD card & DS1307 for data logging.  I need to add some buttons for navigation and a buzzer/alarm on the receiver as well.

I'm learning Eagle and have even started creating custom parts that I'll need, but I could use some advice:

1. The thermistors, DS1307 & RF links run at 5V while the SD/LCD are 3.3V.  I'm trying to figure out the most cost effective/simplest way to generate both voltages off a pair of AA batteries.   

I know I can use an NCP1400 to step up to 5V... should I split that output to a 3.3V regulator?  Seems like I'd be wasting a fair bit of power stepping up, only to step back down.

Perhaps the best way is just use 4xAA's and independent 3.3V & 5V regulators?  Prolly would work as long as I don't use rechargeable batteries right?

2. How can I calculate the power draw of a thermistor?  Yeah, I'd read the spec sheet, but there isn't one.

3. Any suggestions for references for de-Arduino'ing a project?  I know I'll need to build a regulated power circuit and provide a crystal for timing.  Makes sense to add a FTDI programming header too.  Any other gotchas or things to think about?

Thanks!
20  Using Arduino / Sensors / Re: Multiplexing a Thermocouple Input on: March 14, 2011, 07:55:51 pm
Wasn't aware of those projects, thanks for the links!  Looks like quite a few people have tried to create various smoker datalogger & controller solutions. One thing that other's may be interested in are the S/H coefficents for the Maverick thermistors which I found at the very bottom of this page: http://hruska.us/tempmon/BBQ_Controller.pde

A = 2.3067434E-4
B = 2.3696596E-4;
C = 1.2636414E-7;

The author is using a 22.2K resistor as a voltage divider.

I haven't verified how good these numbers are, but sounds like a lot of people have Maverick probes already and may find those numbers useful.
21  Using Arduino / Displays / Re: Minimal power Arduino setup on: March 07, 2011, 01:57:24 pm
Looks like it's just a HD44780 controller.  Many people have these working with Arduino's.
22  Using Arduino / Displays / Re: Nokia 5110 works until I add SD library (also SPI) on: March 06, 2011, 03:06:55 pm
Oops, shoulda done a full test I guesss.

Turns out there's a 4th step:

4. You may also need to edit SD/SD.cpp to lower the SPI speed since the LCD max speed is 4.0Mhz and the SD default speed is 1/2 clock rate, so for the Arduino Uno which has a default clock rate of 16Mhz you need to drop the SPI speed to 1/4 clock:

Code:
boolean SDClass::begin(uint8_t csPin) {
  /*

    Performs the initialisation required by the sdfatlib library.

    Return true if initialization succeeds, false otherwise.

   */
  return card.init(SPI_QUARTER_SPEED, csPin) &&
      volume.init(card) &&
      root.openRoot(volume);
}

I will say I'm kinda disappointed in many of the Arduino libraries... I know they're designed to be easy to use, but there are so many hard coded values (which pins to use, speeds, etc) it really makes it hard to consider them as "reusable" across multiple projects.  Not to mention for SPI related libraries, it would be nice to see a consistent use of hw vs. sw SPI to reduce the number of pins required without significant debugging & hacking.  Not to say I don't appreciate the effort the library authors have put in (after reading the data sheet for the LCD I'm amazed anyone can figure out how to program it), but I guess it would be nice if the Arduino community came up with a set of standards for how libraries should be configured that authors could follow.
23  Using Arduino / Displays / Re: Nokia 5110 works until I add SD library (also SPI) on: March 06, 2011, 02:33:31 pm
Happy to say that was it.  Fixing the PCD8544 library (the one from google code) was pretty easy. 

1. First change the #define's for the SPI pins in PCD8544.h to match the hardware SPI pins.  Make sure your SPI select pin is different from the SD card library (default 10).

2. Rewrite the PCD8544::send() method to use the hardware SPI method of sending data:
Code:
void PCD8544::send(unsigned char type, unsigned char data)
{
    digitalWrite(this->dc, type);
 
    digitalWrite(this->sce, LOW);
    SPDR = data;
    while (!(SPSR & (1 << SPIF)));
    digitalWrite(this->sce, HIGH);
}

3. Initialize the SD library before PCD8544 so it can configure the HW SPI bus.  It doesn't matter if the SD library initializes properly (ie: you don't need a SD card inserted).
24  Using Arduino / Displays / Re: Nokia 5110 works until I add SD library (also SPI) on: March 06, 2011, 12:37:25 pm
Ok, i'm pretty sure I understand what is going on now...

The PCD8544 library uses *software* SPI via shiftOut() while the SD library uses *hardware* SPI via spiSend() and spiRec().  I'm still digging through the Atmega spec sheet, but I'd have a hard time believing you can run both hardware and software SPI over the same pins at the same time.

Anyone know why all the PCD8544 libraries use software SPI?  Is there a problem with hardware SPI and this device?  I figure I could just port the code to use the SPI library... shouldn't be that hard.  As it is, I'm pretty low on pins for my project- I may have to rethink it if I can't share the SPI clock/miso/mosi pins.
25  Using Arduino / Displays / Re: Nokia 5110 works until I add SD library (also SPI) on: March 05, 2011, 12:21:45 am
Well I tracked this problem down to the SD library.  Specifically  Sd2Card::init() in Sd2Card.cpp.  I tried finding a specific line or lines, but the answer seems to be "most of them"- even those which appear at first glance to be talking to the SD card (the SD select pin is set low).

Anyone have any experience getting the SD library working with any other SPI device on the bus? Trying to figure out if this issue is specific to this LCD or a common problem with the SD library.
26  Using Arduino / Displays / Re: Nokia 5110 works until I add SD library (also SPI) on: March 01, 2011, 11:06:24 am
For SS, I use pin 10 for the SD and pin 9 for the LCD.
27  Using Arduino / Displays / Re: Nokia 5110 works until I add SD library (also SPI) on: February 28, 2011, 06:09:17 pm
JanD: that was good advice, but doesn't seem to help any. smiley-sad

zachwiej: It's an Arduino Uno board.  I believe they have 2K of RAM?
28  Using Arduino / Displays / Nokia 5110 works until I add SD library (also SPI) on: February 28, 2011, 11:45:24 am
Sorry for cross posting in multiple forums, but I wasn't getting any replies in the networking forum.

So I have my Nokia 5110 LCD working and the SD card shield working; I just can't seem to get the LCD working when I initialize the SD library.  I've already hacked the PCD8544 to allow me to define all the SPI pins to use to be the same SPI pins as the SD library (11-13 on my Uno), but something about the SD library is breaking the SPI bus for the 5110.  Note: It doesn't matter if the SD shield is connected or not.  The SD card seems to work just fine (I can write files).

If you're curious, my hacked version of the PCD8544 library is here: http://synfin.net/arduino/PCD8544/

Ideas?

Code:
#include <PCD8544.h>
#include <SD.h>

#define SPI_CLK         13 /* SPI CLK */
#define SPI_MISO        12 /* SPI MISO */
#define SPI_MOSI        11 /* SPI MOSI */
#define SD_SELECT       10 /* SD Card SPI Select */
#define LCD_SELECT      9  /* LCD SPI Select */
#define LCD_DC          8  /* LCD data/command */
#define LCD_RESET       7  /* LCD Reset */


PCD8544 LCD;

void setup() {
    pinMode(LCD_SELECT, OUTPUT);
    pinMode(SD_SELECT, OUTPUT);

    Serial.begin(9600);

    Serial.println("Starting LCD");

    /* initialize LCD */
    LCD.begin_custpins(84, 48, SPI_CLK, SPI_MOSI, LCD_DC,
            LCD_RESET, LCD_SELECT);

    // don't talk to LCD while we init the SD
    digitalWrite(LCD_SELECT, HIGH);

    /* initialize SD Card on SPI Bus */
    if (!SD.begin(SD_SELECT)) {
        Serial.println("SD card initialize failed, or not present");
    } else {
        Serial.println("SD card initialize success!");
    }

    LCD.setCursor(0, 0);
    LCD.print("Started LCD!");
}

void loop() {
    delay(1000);
    LCD.println("LCD is running!");  // this does nothing when the SD library is initalized
}
29  Using Arduino / Sensors / Re: Calibrated Thermistor for Cooking on: February 28, 2011, 11:12:57 am
Honestly the averaging out just helps setup an "average" thermistor.  For the most accurate results you'd have to measure each thermistor to build it's curve since there will be per-sample variations.  The Thermistor4 lib also allows you to use a "fudge factor"- basically setup one thermistor and then take a measurement of your 2nd, 3rd, etc and tell the library how far off it is to your reference in degrees Kelvin which for most people should be good enough.

Thermistors should be powered by 5V on the Arduino Uno (what I have) since the analog read covers the 0-5V range and if you used 3.3V you'd miss out on a fair bit of accuracy due to compression.  To get the most accurate results, you need to actually measure your 5V power and divider resistors and plug in those values into the Thermistor4 library.  For my project, I may try using a MCP3204 DAC which is 12bit vs. the 10bit Arduino.  Not sure if it will help really help, but for $5 I'm willing to try.  That said I know my Maverick transmitter uses 2xAAA batteries, so not sure if they're using 3.3V or doing an up convert to 5V.  Guess it would be easy to measure at the probe plug to find out.
30  Using Arduino / Sensors / Re: Calibrated Thermistor for Cooking on: February 27, 2011, 12:00:25 pm
Correct.  I don't believe the Arduino will take advantage of the extra precision.  I wanted to provide the values as reported by the 'coeff' tool since other platforms may be able to utilize the extra precision and specifying them does no harm since the avr compiler will just throw away the extra numbers.
Pages: 1 [2] 3 4