Show Posts
Pages: 1 2 3 [4]
46  Using Arduino / Networking, Protocols, and Devices / Re: PCD8544 LCD (Nokia 5110) + SD card SPI issues on: February 21, 2011, 11:22:17 am
No I haven't yet.  I suppose the next step is probably to plug the shield directly to the Uno and see what happens...

Actually, maybe that's my problem: I'm using a level shifter for the data pins and resistor divider for the SPI select from the Uno to the shield... but obviously when the shield is plugged directly into the board those won't be there.  That would infer that the shield already has the circuitry to drop the voltage from 5V to 3.3V and in effect that's happening twice.

Still doesn't explain why adding SD.begin() without the SD shield breaks the LCD... maybe I'm initializing the SPI bus twice and that's "bad"?
47  Using Arduino / Networking, Protocols, and Devices / PCD8544 LCD (Nokia 5110) + SD card SPI issues on: February 20, 2011, 07:47:19 pm
I have my LCD working just fine with my Arduino Uno, but when I initialize the SD library via SD.begin() or even just hook up my SD card reader (Seeedstudio SD card shield v2.1) wired via a breadboard rather then plugging in directly so I can use the SPI pins for both then the LCD stops working.   It does not matter if the LCD is initialized before or after the SD card.

Trying to initialize the SD library with the SD card connected and with or without the LCD connected also fails.  I'm using the hardware SPI pins (11-13) and a level shifter for those signals.  Note, that I've modified the PCD8544 library to use 13 = SCLK, 12 = MISO, 11 = MOSI and 9 = SPI select (10 is SD select).

Basically my problems boil down to:
1. I can't initialize the SD card library
2. I can't use the LCD with the SD card

Anyways, I've double & triple checked my wiring and everything seems ok.  Just lost as how to debug this further. 

Also, if anyone can suggest a good app for creating wiring diagrams for a Mac that would be great.  I realize it's hard to debug this without seeing how things are wired up. smiley-sad


#include <VirtualWire.h>
#include <PCD8544.h>
#include <Wire.h>
#include <RTClib.h>
#include <SD.h>

uint8_t debug = 0;

#undef int
#undef abs
#undef double
#undef float
#undef round

/* Define Digital PINS */
#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 */
#define LED_PIN         6  /* LED Status */
#define RX_PIN          5  /* RF315Mhz RX */

 * DS1307 pins:
 * RTC_SCL = Analog 5 I2C
 * RTC_SDA = Analog 4 I2C

#define GMTOFFSET    -8 * 60 * 60 /* PST is GMT-8 */

#define RF_BAUD 600
#define DELAY 2750

PCD8544 LCD;

unsigned long missed = 0;
unsigned long received = 0;
uint8_t temp_mask = 0;
unsigned long mstimer;
int t1 = 0;
int t2 = 0;
int t3 = 0;
int t4 = 0;

void setup() {
    pinMode(LED_PIN, OUTPUT);

    /* USB Serial */

    /* I2C & RTC Setup */

    if (! RTC.isrunning()) {
        Serial.println("RTC is NOT running!");
    // following line sets the RTC to the date & time this sketch was compiled
//    RTC.adjust(DateTime(__DATE__, __TIME__));

    /* Wireless receiver */
    Serial.println("Starting receiver!");

    pinMode(LCD_SELECT, OUTPUT);
    pinMode(SD_SELECT, OUTPUT);

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

    /* 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!");
48  Using Arduino / Sensors / Re: Decoding thermistor characteristics table on: January 30, 2011, 02:07:30 pm
Yep, you're right.   I just measured the resistance of the thermistor using my multimeter, and it's definitely increasing as the temp decreases (ice water vs room temp).

So if V = IR, I'm guess current must be the same regardless of temperature, so V is proportional to R.  As R increases, so does the voltage.  Hence, as temp drops, the resistance increases which increases the voltage towards the max, which in this case is the input: 5V.  That' what I had wrong- I thought V & R were inversely proportional.

So, I guess the last thing to figure out is which column to use in the tables.  The information about the thermistor says the beta value (100/200 - what does that mean?) is 4300k.  The 2nd to last column has a label of 4300 at the bottom (labeled b value @ 25/50C).  I guess that must be it?  So at 0C it should read 352.4 * 100Kohm (.3524M Ohm)?  

Doesn't seem to match that or any column though.  My multimeter (+/-(%2 + 4) accuracy) is showing .75M @ 0C and .28M at 18C.  Or am I confused again?

49  Using Arduino / Sensors / Re: Decoding thermistor characteristics table on: January 30, 2011, 12:13:58 am
Actually, looking at the tables, am I confused or is that not for a NTC?  Looks like the resistance is *decreasing* as temperature increases.  Seems backwards.  Or am I just really confused?
50  Using Arduino / Sensors / Re: Decoding thermistor characteristics table on: January 29, 2011, 11:53:59 pm
Thanks for the replies everyone.  I'm still learning about the Steinhart-Hart equation and how to apply it with a thermistor, but it seems quite doable.  The main issue I'm having is trying to understand/decode the information that Amwei has posted about the thermistor.  Basically, the data seems to be there, but I'm not sure what I'm looking at.  Any help would be greatly appreciated.

51  Using Arduino / Sensors / Decoding thermistor characteristics table on: January 29, 2011, 01:18:52 pm
So as my first real Arduino project, I'm building a custom multi-temp monitor for smoking meats.  I picked up some cheap thermistor meat probes from Thermoworks and believe I tracked down the OEM to a company called Amwei.  Anyways, I'm trying to understand the information about the themistors- especially the B-value and resistance.  Some brief information about the probe is listed here (search for 'meat probe'):

And the characteristics table is here:

I've done some tests, and I get the widest range of voltages when using a 10K resistor with it.  Does that seem reasonable? Is the beta value really 4300k?

Anyways, I'm looking into using the Thermistor4 library:  Looks like I'll have to grab my scientific calculator to figure this out!  Any help or advice would be appreciated.  Thanks!
Pages: 1 2 3 [4]