Show Posts
Pages: 1 ... 31 32 [33] 34 35 ... 39
481  Using Arduino / Project Guidance / Re: New First Project on: February 06, 2012, 05:35:17 pm
I have messed about with some of the stuff from RF solutions. I was going to make a wireless RGB LED controller. I have got a 4 way decoder + encoder that you can set to latching or non-latching, which is not very helpful because I needed 2 momentary outputs, and one latching to control the power to the PIC and the PSU that runs the RGB stuff.

I didn't get around to working out how to make a latch but its on my list of to'do's!
482  Using Arduino / Project Guidance / Re: Remote Voltage Read on: February 06, 2012, 05:28:28 pm
should be simple enough mate, set up a voltage divider to make a voltage in the range of 0-5v then feed that into one of the arduino adc inputs
483  Using Arduino / Project Guidance / Re: LCD display changing text with button press on: February 06, 2012, 07:19:09 am
Maybe I should have posted this in the display sub-forum?
484  Using Arduino / Project Guidance / LCD display changing text with button press on: February 05, 2012, 07:39:08 pm
Hi all. I have some RGB LED controllers and they have a sequence which changes on pulling an input on the uC low. There are two inputs, one selects the program, the other sets variables such as speed in that program. Here is the sequence http://www.bigclive.com/datagreen.htm

Because the chip is a pre-programmed PIC there is no real way of me knowing which program I'm in.

I want to use an arduino to display this on a LCD.  I want to basically input all the program names and make them scroll on the LCD with a low input on a pin. I could sync it by pressing both buttons together (which reverts to prog 1 on the PIC) or sync it manually so I think it will be ok to run the two uC's independently.

I'm not sure how to code an arduino to change display on keypress?

Thanks
485  Using Arduino / Project Guidance / Re: Cheapest possible Arduino (DIY) on: February 03, 2012, 11:26:46 am
cheers guys, I will have a mess about later and update it.

Here is the schematic that I created the board from - a bit messy and please ignore the single headers lol

486  Using Arduino / Project Guidance / Re: Cheapest possible Arduino (DIY) on: February 03, 2012, 10:42:16 am
Knocked up a board, I think it should work hopefully. Do you guys have some suggestions?
487  Using Arduino / Displays / Re: Easy way to dim parallel LCD backlight with a photoresitor on: February 02, 2012, 07:42:26 am
Thanks DC, I don't understand exactly how the function is working but I understand the principles.

Also a bit confused as to what you mean by treating the open & short circuit cases separately?
I think maybe I need to add a case somehow for sensor reading = 0 and sensor reading = 1024?

Could I use an else - if function.. i.e. if reading is 0 = Lcd displays - sensor disconnected, else if reading is 1024 = Lcd displays - short circuit?

Thanks

Dan
488  Using Arduino / Project Guidance / Re: Cheapest possible Arduino (DIY) on: February 01, 2012, 12:53:42 pm
Got the Sparkfun Lib but can only find SMD versions of the 168 in there?
489  Using Arduino / Project Guidance / Re: Cheapest possible Arduino (DIY) on: February 01, 2012, 12:46:46 pm
Thanks guys. I'm in the UK but those NKC boards look really good! I'll have to check for shipping info. I can solder SMD no worries but I'm after something that I can easily program, hence thinking to use a Uno - and I'm a bit of a noob?

Thanks for the heads up on the standalone link that looks like a good info source. Just looking at Eagle though and I can't find a library with the Atmega 168 or 328 anywhere. I've looked in the sparkfun, atmel, & avr_7 libs, anyone know if I'm just being stupid? lol

Thanks

490  Using Arduino / Project Guidance / Cheapest possible Arduino (DIY) on: February 01, 2012, 10:09:37 am
Hi all, I'm getting to the point now that I would like to leave a couple of projects working that I have built around the Arduino.

Could someone point me in the direction of making my own Arduino with the minimum required components? I will be programming chips in my Uno more than likely then swapping them out so I don't need any USB bridge stuff

Thanks
491  Using Arduino / Displays / Re: Easy way to dim parallel LCD backlight with a photoresitor on: February 01, 2012, 10:06:43 am
Thanks DC, that seems to work like a charm! I don't quite fully understand what the following line is doing though, could you enlighten me?

Code:
outputValue = map(constrain(sensorValue, minLight, maxLight), minLight, maxLight, minBacklight, maxBacklight );

One thing I just thought of, will my project be able to read negative temperatures?

Many thanks again

Dan
492  Using Arduino / Installation & Troubleshooting / Re: What to do next? Uno not working - won't program on: January 31, 2012, 12:18:21 pm
Hi John!

Thanks for the advice, that sounds rather long-winded but worth a try I guess because I would rather get it working than have it sitting about!

Its a real board from Italy, and I paid the full price for it, have  tried a couple of cables.

Am I right in thinking the duemilanove uses the same FTDI bridge as the Nano that I have got working?
493  Using Arduino / Displays / Re: Easy way to dim parallel LCD backlight with a photoresitor on: January 31, 2012, 11:29:07 am
1) thank you, I'd rather keep it as tidy as possible smiley
2) Very good point, I have noticed that the LED does turn off when the sensor gets pretty dark which is no good, I was going to ask you how best to combat this? I thought about adjusting the map() to something like map(sensorValue, 0, 1023, 100, 200) - no idea if that would work though?
3) I have just had another look but I'm not sure what you mean about the temperature printing twice? I think once for LCD and once for serial?
4) I think I know what you mean. I read somewhere once about setting delays between reading different analogue pins for the mux to switch it. I read that you should put two instances of the same analogue read, once to switch to the pin then a delay, then a second read once it has stabilized? I'm using normal 10k thermistors and the LDR. What instances would I need to add in the delay?

Many thanks once again for your time, much appreciated!
494  Using Arduino / Displays / Re: Easy way to dim parallel LCD backlight with a photoresitor on: January 30, 2012, 01:33:20 pm
Sorry yes I forgot to add square root! Tested the circuit on a breadboard and it works smiley might need a little tweeking because the LED virtually turns off if I cup my hand around the LDR but its a start!

Thanks very much. Would you mind taking a look over the code that I have written?
Basically it will read two thermistors, then output those temps to a 16x2 LCD. The back light on the LCD will be adjusted by the LDR that you have been helping me with.

You can ignore the serial stuff, its just there for debugging because I have not hooked up the LCD yet.

Code:
/*
 
 
 The circuit:
 * LDR connected to analog pin 0.
 * LED / transistor connected from digital pin 3 to ground
 
 * LCD RS pin to digital pin 7
 * LCD EN pin to digital pin 8
 * LCD D4 pin to digital pin 9
 * LCD D5 pin to digital pin 10
 * LCD D6 pin to digital pin 11
 * LCD D7 pin to digital pin 12
 * LCD R/W pin to ground
 * 10K resistor:
 * ends to +5V and ground
 * wiper to LCD VO pin (pin 3)
 * LCD LED+ (15) pin transistor
 * LCD LED- (16) to ground
 
 * Thermisor divider 1 output to analog pin 1
 * Thermisor divider 2 output to analog pin 2
 
 
 */

// These constants won't change.  They're used to give names
// to the pins used:
const int analogInPin = A0;  // Analog input pin that the lDR is attached to
const int analogOutPin = 3; // Analog output pin that the LED is attached to

// include the library code:
#include <LiquidCrystal.h>

#include <math.h>

double Thermister(int RawADC) {
  double Temp;
  Temp = log(((10240000/RawADC) - 10000));
  Temp = 1 / (0.001129148 + (0.000234125 + (0.0000000876741 * Temp * Temp ))* Temp );
  Temp = Temp - 273.15;            // Convert Kelvin to Celcius

  return Temp;
}


// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);


int sensorValue = 0;        // value read from the LDR
int outputValue = 0;        // value output to the PWM (analog out)

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
  lcd.begin(16, 2);
  delay(100);
  pinMode(13, OUTPUT); 

}

void loop() {
  // read the analog in value:
  sensorValue = analogRead(analogInPin);           
  // map it to the range of the analog out:
  outputValue = map(sensorValue, 0, 1023, 0, 255); 
  // change the analog out value:
  analogWrite(analogOutPin, outputValue);           

  // print the results to the serial monitor:
  Serial.print("sensor = " );                       
  Serial.print(sensorValue);     
  Serial.print("\t output = ");     
  Serial.println(outputValue); 


  // Temperature 1 print
  lcd.clear();

  lcd.setCursor(0,0);
  lcd.print(int(Thermister(analogRead(1))));


  lcd.print((char)223);
  lcd.print ("c");


  Serial.print ("Temp1=");
  Serial.println(int(Thermister(analogRead(1))));  // display temp

  // Temperature 2 print
  lcd.setCursor(0,1);
  lcd.print(int(Thermister(analogRead(2))));


  lcd.print((char)223);
  lcd.print ("c");

  Serial.print ("Temp2=");
  Serial.println(int(Thermister(analogRead(2))));  // display temp


  // wait 10 milliseconds before the next loop
  // for the analog-to-digital converter to settle
  // after the last reading:
  delay(1000);                     
}
495  Using Arduino / Installation & Troubleshooting / What to do next? Uno not working - won't program on: January 30, 2012, 06:41:24 am
Hi all, I have had an Uno for a few months now. During this time I have had a nightmare getting code on the board - avr not in sync, com port not found, usb device not recognised etc etc. I think it has probably worked 25% of the time which makes working with it very stressfull. I have tried multiple PC's - same issue. The uC works because I can see it running code if I manage to ever get some on there!

I recently bought a Nano clone however and that works 100% of the time on the same PC's which I'm really happy about.

What should I do / try with the Uno?
Pages: 1 ... 31 32 [33] 34 35 ... 39