Show Posts
|
|
Pages: [1] 2
|
|
1
|
Community / Products and Services / Re: Industruino - DIN-rail Leonardo compatible
|
on: April 30, 2013, 01:04:44 pm
|
Hi everyone, After two months of working on improving Industruino I am pleased to announce that we have finally released the next version (beta3) of Industruino which incorporates all the suggestions from our early beta testers. Please have a look at www.industruino.com for new pictures and more information. We will now have more time to work on Industruino Ethernet, which will be implemented on a baseboard using the Wiznet W5200 chip. The idea is to have a baseboard which can be swapped into an existing Industruino to add Ethernet functionality (same principle as shields really...). We see the urgency of Ethernet functionality so we will push to release asap. I expect early beta samples in a months time. Greetings, Loic 
|
|
|
|
|
2
|
Community / Products and Services / Re: Industruino - DIN-rail Leonardo compatible
|
on: February 12, 2013, 06:51:31 am
|
@K7-3D: Thanks for the tip on the PCF8574! I2C expanders will definitely play an important role in feature add-ons for Industruino. I can imagine that a DIN-rail extension board with say 8 relays, all driven by the Industruino's I2C bus could be very useful. In its current incarnation Industruino can already house all the options that you mention (v-reg, rs485, ethernet) on the empty prototyping base board. I'm looking now on how to integrate Ethernet as option on the base board without sacrificing too much space of prototyping area. If you're working with 24V DC please have a look at this: http://www.mornsun-power.com/cn/product_inf.aspx?typeID=62#They have the same pinout as 7805 regulators but are switching instead of linear type. So when working with >12V they are really useful because they are much more efficient and thus don't generate much heat, don't need a bulky heat-sink, and save power. I'm planning to offer them as an option on future versions of Industruino. I've used their isolated versions before and I am very happy about them. If you don't want a Chinese brand you can get the same types from XP-power.
|
|
|
|
|
3
|
Community / Products and Services / Re: Industruino - DIN-rail Leonardo compatible
|
on: February 06, 2013, 09:26:40 am
|
|
I would be interested to hear from people what they would like to see developed as baseboards for Industruino (the equivalent of shields with standard Arduino). Standard Industruino comes with an empty prototyping baseboard which allows anyone to add their own circuits, but for certain applications we intend to develop custom baseboards.
As a first board we are planning to develop a 4-20ma I/O + PT100 board, to facilitate the connection to off the shelve industrial sensors and actuators. The second item on our list is an ethernet board, but we are debating whether maybe this should be integrated in the main controller board instead (top board) as a different model altogether. Other ideas that came to mind were: 1. RFID + relay board 2. fibre-optic connection board (for long distance comms, or opto-isolated triggering of HV systems) 3. RS485/DMX board.
So please, any suggestions for baseboards would be appreciated and considered for development.
Loic
|
|
|
|
|
4
|
Community / Products and Services / Re: Industruino - DIN-rail Leonardo compatible
|
on: February 05, 2013, 11:23:44 am
|
@EVP & Chagrin: Thank you very much for the kind words! Nice to hear that you like it! @EVP: Good point on the red power LED. I will look at implementing this in next version. With more LED's I have to watch out not to occupy too many I/O pins. Maybe I could add a few extra generic LED on the front panel which could be disconnected from I/O using jumpers. D13, which on official Arduino boards has an LED usually used for simple Blink test projects, is connected to my LCD backlight LED's on Industruino. This way it has double function, also quite cool when it is running the bootloader (PWM flashing the backlight  ). Concerning extra buttons on the membrane panel: We can easily make custom membrane panels with extra buttons, as all buttons are read on a single analog pin. For very specific applications or customised product we can produce custom panels. The idea was to keep the design neutral and simple so to fit as many applications as possible. For this standard version we chose a three button layout, mainly for ergonomic reasons. The menus can quite easily be navigated using this setup, and values changed. We are thinking in the future to make an Industruino version without lcd screen and more I/O. This version could have a more extended membrane panel as there would be more space on the front face of the enclosure. Best Regards, Loic
|
|
|
|
|
5
|
Community / Products and Services / Industruino - DIN-rail Leonardo compatible
|
on: February 04, 2013, 07:28:02 am
|
Hi everyone, After one year of prototyping I am glad to announce to you 'Industruino'. It is a fully enclosed DIN-rail mountable Arduino compatible board + onboard LCD screen + membrane button panel + prototyping area. Me and my wife Ainura created Industruino for situations where you want to take your Arduino based project from the breadboard to a finished installation. Please have a look at our website for more information: www.industruino.com  We would be grateful to hear what the Arduino community thinks of it. Any constructive feedback/suggestions are welcomed. Best regards, Loic
|
|
|
|
|
6
|
Forum 2005-2010 (read only) / Syntax & Programs / Re: rfid compare tag code
|
on: September 10, 2007, 05:54:41 pm
|
Big big progress: After I filled the array with more than 60 tags I started to get problems with the 1k byte ram limit of the mega168. Random crashes and the like :'( I figured that I needed to use PROGMEM to overcome this hurdle. A few hours later in pain I found out that the equivalent of the "memcmp" function when using PROGMEM was "memcmp_P". But here comes the nice part: This function was only added to avr_libc version 1.4.6 and Arduino uses version 1.4.4, couldn't be more convenient :  I compiled the latest avr_libc and replaced parts of the Arduino lib. Guess what, it worked!!! Going rock solid with 75 tags in memory! This is my latest code, cleaned up and filled with comments. With this code you can just copy-paste tags from the serial monitor into the array: #include <avr/pgmspace.h> #include <SoftwareSerial.h>
#define rxPin 7 // unused serial pin #define txPin 2 // software-serial pin used to send the "read uid" command to the reader
#define TAG_LEN 12 // length of a single tag in bytes
SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin); // set up a new serial port
int ledPin = 13; //feedback led int ledPin2 = 6; //feedback led int checkrfid = 0; // after a scan for tags, this will become: 0 if no tag was read, 1 if tag is recognized, 2 if tag is not recognized, byte code[TAG_LEN]; // var that will hold the bytes-in read from the serialBuffer int bytes_read = 0; // number of bytes read PROGMEM prog_char target_tag[][TAG_LEN] = //dynamic multidimensional array with known tags. It's stored into flash memory to overcome the 70 tag limit. {{0x00, 0x00, 0xdd, 0x8e, 0x96, 0x0e, 0x00, 0x01, 0x04, 0xe0, 0x10, 0xc8 }, {0x00, 0x00, 0x1b, 0x4e, 0xc1, 0x0d, 0x00, 0x01, 0x04, 0xe0, 0xd5, 0x7b}};
void setup() { // define pin modes for tx, rx, led pins: pinMode(rxPin, INPUT); // setup for software-serial pinMode(txPin, OUTPUT); // setup for software-serial pinMode(ledPin, OUTPUT); // setup for feedback led pinMode(ledPin2, OUTPUT); // setup for feedback led mySerial.begin(19200); // set the data rate for the SoftwareSerial port Serial.begin(19200); // opens serial port, sets data rate to 19200 bps }
void loop () { scan(); // do a scan for tags if(checkrfid == 1) // if tag is recognized { fade(); //do function "fade" (see below) delay(100); } if(checkrfid == 2) // if tag is not recognized { blink(); //do function "blink" (see below) } delay(100); //wait before doing a new scan }
void scan () { checkrfid = 0; //set "state of recogniton" back to zero mySerial.print(0xfa, BYTE); //request Tag code if(serialAvailable()){ //if data is coming back from the reader while (serialAvailable() && bytes_read < TAG_LEN){ //while data is coming back from the reader and not all 12 bytes are read code[bytes_read] = Serial.read(); //add byte bytes_read++; // update number of bytes read } } Serial.println ("NO TAG "); //No data has come from the reader so "No Tag" is displayed if( bytes_read >= TAG_LEN) //if 12 bytes were read, print them out { Serial.print("{"); //adds syntax so you can just copy-paste the tag into your code for(int i=0; i<bytes_read; i++) //prints all 12 bytes one at a time { Serial.print("0x"); //more syntax for copy-paste Serial.print(code[i], HEX); //print out the byte in HEX Serial.print(", "); //more syntax for copy-paste } Serial.print("},"); //more syntax for copy-paste for(int i = 0; i < ((sizeof(target_tag))/12); i++) //tag is compared to array of known tags, note that the size of the array is dynamic and calculated every time, more ease for copy-paste... { if(memcmp_P(code, target_tag[i], TAG_LEN) == 0 ) //uses the PROGMEM variant of memcmp -> memcmp_P This function doesn't work with the standard Arduino 009 IDE, Needs avr-libc 1.4.6. { checkrfid = 1; //if tag matches, set "checkrfid" to 1 } } if(checkrfid == 0) //if tag doesn't match, set "checkrfid" to 2 { checkrfid = 2; } Serial.flush(); //flush serial buffer }
Serial.println(); //print linefeed bytes_read = 0; //set number of bytes read back to zero } void blink () { digitalWrite(ledPin, HIGH); // if true blink led delay(1000); digitalWrite(ledPin, LOW); delay(500); }
void fade () { int value = 0; for(value = 0 ; value <= 255; value+=5) // fade in (from min to max) { analogWrite(ledPin2, value); // sets the value (range from 0 to 255) delay(30); // waits for 30 milli seconds to see the dimming effect } delay(200); for(value = 255; value >=0; value-=5) // fade out (from max to min) { analogWrite(ledPin2, value); delay(30); } delay(500);
}
Arduino is so great, never thought this would be possible! Kind Regards, Loïc
|
|
|
|
|
7
|
Forum 2005-2010 (read only) / Syntax & Programs / Re: rfid compare tag code
|
on: September 07, 2007, 04:10:35 pm
|
Finally it works!!! This code reads the tag and compares it to a multidimensional array of known tags. If the tag matches to one in the array then an action is executed (blinking a led). Here's the code: #include <SoftwareSerial.h>
#define rxPin 7 #define txPin 2
#define TAG_LEN 12 #define ARR_LEN 2 // set up a new serial SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
int ledPin = 13; int serIn; byte code[TAG_LEN]; // var that will hold the bytes-in read from the serialBuffer int bytes_read = 0; char target_tag[ARR_LEN][TAG_LEN] = {{0x00, 0x00, 0xdd, 0x8e, 0x96, 0x0e, 0x00, 0x01, 0x04, 0xe0, 0x10, 0xc8 }, {0x00, 0x00, 0x1b, 0x4e, 0xc1, 0x0d, 0x00, 0x01, 0x04, 0xe0, 0xd5, 0x7b}};
void setup() { // define pin modes for tx, rx, led pins: pinMode(rxPin, INPUT); pinMode(txPin, OUTPUT); pinMode(ledPin, OUTPUT); mySerial.begin(19200); // set the data rate for the SoftwareSerial port Serial.begin(19200); // opens serial port, sets data rate to 19200 bps }
void loop () { mySerial.print(0xfa, BYTE); //request Tag code if(serialAvailable()){ //keep reading from serial untill there are bytes in the serial buffer while (serialAvailable() && bytes_read < TAG_LEN){ //read Serial code[bytes_read] = Serial.read(); bytes_read++; // ready to read next digit } } //do somenthing else perhaps wait for other data. Serial.println ("NO TAG "); //print out later in the loop the sentence only if it has actually been collected; if( bytes_read >= TAG_LEN){ for(int i=0; i<bytes_read; i++){ Serial.print(code[i], HEX); //print out the byte at the specified index Serial.print(","); } for(int i = 0; i < ARR_LEN; i++) { if(memcmp(code, target_tag[i], TAG_LEN) == 0 ) { digitalWrite(ledPin, HIGH); delay(500); digitalWrite(ledPin, LOW); delay(500); } } Serial.flush(); //flush serial buffer }
Serial.println(); delay(100); bytes_read = 0; }
Now I'll start cleaning up the code and post a tutorial at the Arduino Playground. Thank you everybody for the support! Kind Regards, Loïc
|
|
|
|
|
9
|
Forum 2005-2010 (read only) / Syntax & Programs / Re: rfid compare tag code
|
on: September 02, 2007, 12:39:47 pm
|
@John Ryan: I would be happy to work together to solve this! I've reworked my previous code based on the all suggestions. Still no luck This is it: #include <SoftwareSerial.h>
#define rxPin 7 #define txPin 2
#define TAG_LEN 12
// set up a new serial port SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
int ledPin = 13; int serIn; byte code[TAG_LEN]; // var that will hold the bytes-in read from the serialBuffer byte bytes_read = 0; char target_tag[] = {0x00, 0x1b, 0x4e, 0xc1, 0xd0, 0x14, 0xe0, 0xd5, 0x7b };
void setup() { // define pin modes for tx, rx, led pins: pinMode(rxPin, INPUT); pinMode(txPin, OUTPUT); pinMode(ledPin, OUTPUT); mySerial.begin(19200); // set the data rate for the SoftwareSerial port Serial.begin(19200); // opens serial port, sets data rate to 19200 bps }
void loop () { mySerial.print(0xfa, BYTE); //request Tag code // only if there are bytes in the serial buffer execute the following code if(serialAvailable()) { //keep reading from serial untill there are bytes in the serial buffer while (serialAvailable() && bytes_read < TAG_LEN){ //read Serial code[bytes_read] = serialRead(); //insert the byte you just read into the array at the specified index bytes_read++; //update the new index } //feedback that something was received Serial.println ("Processing Tag"); } //do somenthing else perhaps wait for other data. Serial.println ("NO TAG "); //print out later in the loop the sentence only if it has actually been collected; if( bytes_read >= TAG_LEN) { Serial.print("Tag ID= "); //loop through all bytes in the array and print them out for(bytes_read=0; bytes_read < TAG_LEN; bytes_read++) { Serial.print((code[bytes_read]), HEX); //print out the byte at the specified index //serInString[serOutIndx] = ""; //optional: flush out the content } if (memcmp(code, target_tag, TAG_LEN) > 0) { //if received tag code == to listed tag code digitalWrite(ledPin, HIGH); //do something (blink a led) delay(500); digitalWrite(ledPin, LOW); delay(500); } //reset all the functions to be able to fill the string back with content bytes_read = 0; } //slows down the visualization in the terminal Serial.flush(); //flush serial buffer Serial.println(); delay(200); }
I really can't think of anything else to do. Any help is appreciated. Regards, Loïc
|
|
|
|
|
10
|
Forum 2005-2010 (read only) / Syntax & Programs / Re: rfid compare tag code
|
on: August 30, 2007, 12:18:01 pm
|
@John Ryan: In the past I've tried to modify the parallax rfid code for weeks in a row without any succes (see my other forum post: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1186246253/15). After this I finally succeeded in printing the the tag codes to serial monitor by modifying some other code I found on the web. But with this last code (the code I posted at the beginning of this topic) I noticed that by changing the variable "serInString" from char to byte the output was always smaller and more equal in length rather than being always different from tag to tag. This is the output for 3 tags using a "char" variable: 00FFFFFFDDFFFFFF8EFFFFFF96E014FFFFFFE010FFFFFFC8 00FFFFFF989FFFFFF96E014FFFFFFE0FFFFFF857B 001B4EFFFFFFC1D014FFFFFFE0FFFFFFD57B This is the output for the same 3 tags using a "byte" variable: 00DD8E96E014E010C8 0098996E014E0857B 001B4EC1D014E0D57B These are all printed with the command "Serial.print((serInString[serOutIndx]), HEX );" I mention all this because maybe the whole problem of comparing the tags to a list is related to this. I've also spotted in the basic stamp code that the tags are in this format 'Valid tags
Tag1 DATA $00, $00, $7B, $7D, $90, $F2, $36, $07, $07, $F2, $03, $7D
Tag2 DATA $00, $00, $7D, $7D, $1E, $1F, $E0, $E6, $EF, $6E, $04, $04 Thus being 12 hex numbers while I only have 9 in two tags and even one tag (0098996E014E0857B) with 17 character that I even can't split into HEX (if you know what I mean) @brianbr: I've tried the "strcmp" command but with no succes, the led flashes, but only when wrong tags a presented. Maybe it's related to the problems described above. Does anyone see any light in this mess? :-/ Any help is really appreciated. Kind Regards, Loic
|
|
|
|
|
11
|
Forum 2005-2010 (read only) / Syntax & Programs / Re: rfid compare tag code
|
on: August 29, 2007, 09:10:58 am
|
Thank you kg4wsv, I've been trying your suggestions for the last 24hours but with no success. The code that prints the tag code back to the serial monitor was modified from code I found on the web, I'm not such good coder to be able to rewrite it with a new approach to getting the tag codes reported. But as far as printing nice unique tag codes to the serial monitor this code works perfectly, so I'm not sure the "compare tag code to list" problem I'm having is to find in the way this original code works. But being a "C" noob I could be totally wrong. Next thing I tried was using the <string.h> library, trying memcmp and strcmp. No succes  , but again could be my semi-noobness  The last weeks I've been looking at this basic stamp code that does exactly what I want to do http://www.digitaldawgpound.org/wp-content/uploads/2007/03/rw210_rfid_reader.bse (from this project http://www.digitaldawgpound.org/nick84/post=189) trying to understand the data types and sizes to work with (bytes vs chars etc). Could someone who understands the basic stamp code please help me on the right way? I really appreciate your help. Regards, Loïc
|
|
|
|
|
12
|
Forum 2005-2010 (read only) / Syntax & Programs / rfid compare tag code
|
on: August 27, 2007, 12:46:16 pm
|
Hello everybody, After weeks of intense testing I succeeded in reading tag codes from the 13.56Mhz APSX RW-210 rfid reader! This is the code: http://www.technicum.net/rfid/rfid_read.pdeIt sends the read command via software serial to the rfid reader. Next it reads in the Tag code via hardware serial. Finally it prints a nice tag code to the computer! Now the problematic part; As a next step I wanted to compare the tag code to a list of known tags and then do a certain action (for example blink a led). I've been struggling with this for a week now so I decided to ask for some help. This is one of my numerous attempts :-[ #include <SoftwareSerial.h>
#define rxPin 7 #define txPin 2
// set up a new serial port SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin); int serIn; // var that will hold the bytes-in read from the serialBuffer byte serInString[12]; // array that will hold the different bytes int serInIndx = 0; // index of serInString[] in which to inser the next incoming byte int serOutIndx = 0; // index of the outgoing serInString[] array; int ledPin = 13; // LED connected to digital pin 13 char Tag1[] = "001B4EC1D014E0D57B"; //known tag code, should become a list of 50+ tags
void setup() { // define pin modes for tx, rx, led pins: pinMode(rxPin, INPUT); pinMode(txPin, OUTPUT); pinMode(ledPin, OUTPUT); // sets the digital pin as output mySerial.begin(19200); // set the data rate for the SoftwareSerial port Serial.begin(19200); // opens serial port, sets data rate to 19200 bps }
void loop () { mySerial.print(0xfa, BYTE); // request tag code // only if there are bytes in the serial buffer execute the following code if(serialAvailable()) { //keep reading from serial untill there are bytes in the serial buffer while (serialAvailable()){ serIn = serialRead(); //read Serial serInString[serInIndx] = serIn; //insert the byte you just read into the array at the specified index serInIndx++; //update the new index } //feedback that something was received Serial.println ("Processing Tag"); } //do somenthing else perhaps wait for other data. Serial.println ("NO TAG "); //print out later in the loop the sentence only if it has actually been collected; if( serInIndx > 0) { Serial.print("Tag ID="); //loop through all bytes in the array and print them out for(serOutIndx=0; serOutIndx < serInIndx; serOutIndx++) { Serial.print((serInString[serOutIndx]), HEX ); //print out the byte at the specified index if((serInString[12], HEX) == Tag1[19]) { //compare received tag code to known tag code digitalWrite(ledPin, HIGH); // if true blink led delay(500); digitalWrite(ledPin, LOW); delay(500); digitalWrite(ledPin, HIGH); delay(500); digitalWrite(ledPin, LOW); delay(500); } //serInString[serOutIndx] = ""; //optional: flush out the content } //reset all the functions to be able to fill the string back with content Serial.flush(); //flush serial buffer serOutIndx = 0; serInIndx = 0; } //slows down the visualization in the terminal Serial.println(); delay(200); }
The tag code "001B4EC1D014E0D57B" is the code that I have copied from serial monitor after reading a tag. All my attempts won't make the led blink  Can someone please help me, I would like to put 50+ tags in the memory that trigger a certain action. Kind Regards, Loïc
|
|
|
|
|
13
|
Forum 2005-2010 (read only) / Development / avr_libc 1.4.6?
|
on: September 10, 2007, 06:14:11 pm
|
Hello, The past months I've been very busy trying to get the APSX RW-210 rfid reader to work with Arduino. I can now say it has been a total success! The last piece of the puzzle was trying to compare tags to an array of tags living in PROGMEM. To do this I had to use the command "memcmp_P" which was only added to avr_libc version 1.4.6. I was able to replace parts of the Arduino avr lib by the new lib. It works perfectly and has enabled me to compare rfid tags to a list of more than 75 tags in flash memory! See my post for code and details: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1188236776/15I was wondering if there are plans to add avr_libc 1.4.6 to Arduino 010 ? Regards, Loïc
|
|
|
|
|