Show Posts
|
|
Pages: 1 ... 7 8 [9] 10
|
|
123
|
Forum 2005-2010 (read only) / Interfacing / Re: Switching H7/ H1 automotive bulbs with Mosfets?
|
on: November 29, 2009, 09:39:07 am
|
|
This is not VAG only doing it. There's MB as well- even if the fog lamps look a little out of order when only one is switched on.
But look to Ford Mondeo Xenon lights. They have a static bending light in the headlamp (an not in the bumper) which is much more effective. I drove that 3 weeks ago and compared it to my girl friends VW cornering light- the Ford solution was so much better!
Reading the ECE carefully you are allowed to do the that with Turn indicator as well. A steering wheel input is not a must.
But what MOSFET to use?
|
|
|
|
|
124
|
Forum 2005-2010 (read only) / Interfacing / Switching H7/ H1 automotive bulbs with Mosfets?
|
on: November 29, 2009, 06:27:17 am
|
|
Hi, I want to switch automotive lamps with an arduino and mosfets (cornering lamps function) . I want to have the lamp voltage controlled by PWM with 100Hz ish. So far the software is not an issue, but the hardware is.
Can someone help me with the Mosfet selection and how to connect the arduino to the FET?
|
|
|
|
|
125
|
Forum 2005-2010 (read only) / Interfacing / Re: Vinculum chip
|
on: July 14, 2009, 04:39:32 am
|
|
Dear Igor R, I am currently thinking about a datalogger which would need to have an external datalogger. So your code with some comments would be highly appreciated to understand how to apply this to my specific application.
Unfortunately my spanish is too bad to read and understand the post you have linked... :-[
|
|
|
|
|
126
|
Forum 2005-2010 (read only) / Interfacing / Re: Vinculum VDRIVE2
|
on: October 20, 2009, 01:50:53 pm
|
Hi, I am still druggeling with the VDRIVE2. I cannot get ANY reaction from that &%§**?) piece of hardware >  Can someone lead me to a simple piece os sample code simply writing a useless number onto the stick? This would help as a starting point. I appreciate any help!
|
|
|
|
|
128
|
Forum 2005-2010 (read only) / Interfacing / Re: Vinculum VDRIVE2
|
on: September 26, 2009, 12:54:46 am
|
|
I just tied another code to get the data transfer LED to show activity..
int incomingByte=0; int fileNumber=1; int noOfChars; long int valToWrite; char activityToLog; long int x; long int startLogTime = 0;
void setup() { Serial.begin(9600); // opens serial port, sets data rate to 9600 bps Serial.print("IPA"); // sets the vdip to use ascii numbers //(so I can read them in the code easily!) Serial.print(13, BYTE); // return character to tell vdip its end of message }
void loop() { Serial.print("OPW LOG"); // open to write creates a file - named Serial.print(".TXT"); // I have used the % sign in the name so I can //search the disk for log files that it has created //so as not to overwrite any that may be on already Serial.print(13, BYTE); // return character activityToLog='P'; // I will be using different letters to label my time stamps valToWrite=millis() - startLogTime; // time since we started logging noOfChars=1; x=valToWrite; // need to copy valToWrite as getting no of characters will consume it while (x>= 10){ // counts the characters in the number noOfChars++; // thanks to D Mellis for this bit x/=10; } noOfChars +=2; //add 2 to the num as will also write the letter P and a return character
Serial.print("WRF "); //write to file (file needs to have been opened to write first) Serial.print(noOfChars); //needs to then be told how many characters will be written Serial.print(13, BYTE); //return to say command is finished Serial.print(activityToLog); //followed by the info to write Serial.print(valToWrite); Serial.print(13, BYTE); //write a return to the contents of the file (so each entry appears on a new line) }
Honestly speaking- my TX LED on my arduino went crazyand I saw something happening on my serial monitor...but the vdrive still sleeps... :-/
|
|
|
|
|
129
|
Forum 2005-2010 (read only) / Interfacing / Vinculum VDRIVE2
|
on: September 25, 2009, 03:08:24 pm
|
Hello, I have issues in order to setup the vdrive2 to my arduino. Ths is what I have done: -Pin1 (black) to minus -Pin2 connected to Pin6 -Pin3 (red) to 5V -Pin4(RX) to Arduino Pin1 (TX) -Pin5 (TX) to Arduino Pin0 (RX) -Set the jumper connecting UART to GND Connecting the system to USB gives a red/green/red/green flicker of the vdrive. I plugged in my 1GB memory stick (formatted with FAT -not FAT32- under Windows XP). I uploaded the following script (from playground) expecting VDRive something to do with the memory stick- but nothing happens... int incomingByte=0; int fileNumber=1; int noOfChars; long int valToWrite; char activityToLog; long int x; long int startLogTime = 0;
void setup() { Serial.begin(9600); // opens serial port, sets data rate to 9600 bps Serial.print("IPA"); // sets the vdip to use ascii numbers //(so I can read them in the code easily!) Serial.print(13, BYTE); // return character to tell vdip its end of message }
void loop() { if (Serial.available() > 0) { // read the incoming byte incomingByte = Serial.read();
if (incomingByte=='1'){ // if it receives a 1 Serial.print("OPW LOG%"); // open to write creates a file - named Serial.print(fileNumber); // LOG%1.TXT first time round - .TXT is for the computer Serial.print(".TXT"); // I have used the % sign in the name so I can //search the disk for log files that it has created //so as not to overwrite any that may be on already Serial.print(13, BYTE); // return character
}
if (incomingByte=='2'){ // if it receives a 2 Serial.print("CLF LOG%"); // it closes the file Serial.print(fileNumber); // LOG%1.TXT Serial.print(".TXT"); Serial.print(13, BYTE); // return character
}
if (incomingByte=='3'){ // if it receives 3 Serial.print("DIR"); // lists the directory on the memory stick Serial.print(13, BYTE); // which will now include the file LOG%1.TXT }
if (incomingByte=='5'){ activityToLog='P'; // I will be using different letters to label my time stamps valToWrite=millis() - startLogTime; // time since we started logging noOfChars=1; x=valToWrite; // need to copy valToWrite as getting no of characters will consume it while (x>= 10){ // counts the characters in the number noOfChars++; // thanks to D Mellis for this bit x/=10; } noOfChars +=2; //add 2 to the num as will also write the letter P and a return character
Serial.print("WRF "); //write to file (file needs to have been opened to write first) Serial.print(noOfChars); //needs to then be told how many characters will be written Serial.print(13, BYTE); //return to say command is finished Serial.print(activityToLog); //followed by the info to write Serial.print(valToWrite); Serial.print(13, BYTE); //write a return to the contents of the file (so each entry appears on a new line) }
if (incomingByte=='6'){ fileNumber++; //so we can create other files }
if (incomingByte=='7'){ if (fileNumber>0){ //and look at previous ones fileNumber--; } }
if (incomingByte=='8'){ Serial.print("RD LOG%"); //reads the contents of named file Serial.print(fileNumber); Serial.print(".TXT"); Serial.print(13, BYTE); }}
if (incomingByte=='9'){ startLogTime=millis(); // reset timing }
}
I searched the Internet for something to give me a hint, but failed. :-[ Can someone help me?
|
|
|
|
|
130
|
Forum 2005-2010 (read only) / Interfacing / Get temps from a specific DS1820
|
on: August 04, 2009, 02:59:01 am
|
Hi, I read a lot of threads and tutorials how to connect DS1820 to the arduino. Most of them show how to read the temperatures and some explain how to read out the 64 bit unique coding. I tried to modify the code to my needs and it works fine. I would like to use up to 5 sensors in my project. I am not a professional in coding so I needs some help. So here is my question: Is there a sample code to get data from a specific sensor using the unique 64-Bit Serial Code sensor? I tried to google for it but I failed

|
|
|
|
|
132
|
Forum 2005-2010 (read only) / Interfacing / DS1820 with onewire libray doesn't work
|
on: August 01, 2009, 03:07:29 am
|
Hi, currently I am trying to get an DS1820 to work in order to measure temperatures between -30 and plus 40°C. I tried the "Dallas Temperature Control Library" from Miles Burton and everything works fine- but the library can't show the "-" sign even if the values are shown... So I tried the latest version of onewire library with Arduino (rev16) with the following code: #include <OneWire.h>
/* DS18S20 Temperature chip i/o */
OneWire ds(10); // on pin 10
void setup(void) { // initialize inputs/outputs // start serial port Serial.begin(9600); }
void loop(void) { byte i; byte present = 0; byte data[12]; byte addr[8]; if ( !ds.search(addr)) { Serial.print("No more addresses.\n"); ds.reset_search(); return; } Serial.print("R="); for( i = 0; i < 8; i++) { Serial.print(addr[i], HEX); Serial.print(" "); }
if ( OneWire::crc8( addr, 7) != addr[7]) { Serial.print("CRC is not valid!\n"); return; } if ( addr[0] != 0x10) { Serial.print("Device is not a DS18S20 family device.\n"); return; }
ds.reset(); ds.select(addr); ds.write(0x44,1); // start conversion, with parasite power on at the end delay(1000); // maybe 750ms is enough, maybe not // we might do a ds.depower() here, but the reset will take care of it. present = ds.reset(); ds.select(addr); ds.write(0xBE); // Read Scratchpad
Serial.print("P="); Serial.print(present,HEX); Serial.print(" "); for ( i = 0; i < 9; i++) { // we need 9 bytes data[i] = ds.read(); Serial.print(data[i], HEX); Serial.print(" "); } Serial.print(" CRC="); Serial.print( OneWire::crc8( data, 8), HEX); Serial.println(); } Then I wanted to compile and got the following error messages: hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::OneWire(unsigned char)'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:72: first defined here
hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::OneWire(unsigned char)'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:72: first defined here
hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::reset_search()'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:212: first defined here
hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::crc8(unsigned char*, unsigned char)'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:328: first defined here
hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::depower()'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:201: first defined here
hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::read_bit()'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:135: first defined here
hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::read()'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:171: first defined here
hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::write_bit(unsigned char)'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:117: first defined here
hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::write(unsigned char, unsigned char)'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:156: first defined here
hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::skip()'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:196: first defined here
hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::select(unsigned char*)'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:184: first defined here
hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::reset()'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:92: first defined here
hardware/libraries/OneWire/OneWire.o: In function `OneWire::search(unsigned char*)':
/home/frank/arduino-0016/hardware/libraries/OneWire/OneWire.cpp:233: multiple definition of `OneWire::search(unsigned char*)'
hardware/libraries/DallasTemperature/OneWire.o:F:\arduino-0015/hardware\libraries\DallasTemperature/OneWire.cpp:233: first defined here
Couldn't determine program size: avr-size: '/tmp/build68195452875932336.tmp/onewire_DS1820.hex': No such file
What did I do wrong? Ahh- before I forget: I am using Ubuntu and a Arduino board with the ATMEGA 328
|
|
|
|
|
133
|
Forum 2005-2010 (read only) / Interfacing / VDRIVE2 interfacing
|
on: July 14, 2009, 01:30:42 am
|
Hi, I am working on my first project which will be a datalogger. So far so good I have now the Temperature signals up and running :  . But I'm searching for an easy method to save the data over a long period in time. Finally I came to the VDRIVE2. Unfortunately I am not that of an expert to read the datasheet how to send data to the drive and I couldn't find something on the web (may I am not smart enough to use it properly) . Is it a simple "Serial.print("send data")" command? How to define the filename? May someone can explain me or give me a hint where to find sample code to get a start... Regards soulid
|
|
|
|
|
134
|
Forum 2005-2010 (read only) / Exhibition / Re: Power LED shield
|
on: January 15, 2010, 08:15:54 am
|
|
Brilliant shield idea! I would take one shield as well for that price! Do you ship to Europe/ Germany? I prefer the Duemilanove shield and not the discussed Mega shield...
One idea for the shield you may include: 1) In case of using two boards the control pins needs to be changed. Is a jumper solution in the shield the right way on a way to a more flexible solution?
|
|
|
|
|
135
|
Forum 2005-2010 (read only) / Exhibition / Re: FileLogger
|
on: December 22, 2009, 03:35:27 pm
|
First of all thank you very much for doing that code. After some trials with other codes (SDuFAT, FAT16lib...) I could get my libelium MicroSD Module running on the ICSP port  (see my thread for the issues I had http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1261141357! I have a simple question: Is there a way of reading out the data without removing the card? There are some libs I saw throwing out the data via serial port. Furthemore a simple data deletion would be appreciated too. :-? Sorry for simply asking for code but I am not that experienced making that by my own but modifying existing stuff only :-[
|
|
|
|
|