Show Posts
Pages: 1 ... 3 4 [5] 6 7 ... 74
61  Using Arduino / Project Guidance / Re: Feasibility of using ATmini85 to produce IR signal on: April 03, 2014, 08:59:47 pm
Quote
I was thinking of trying mirror tape but it's difficult to find in the UK.

kitchen alu-foil + sticky tape or glue!    smiley
You watched too much 'Blue Peter'.   smiley-grin
Quote
.....sounds like you have lots of options.

BTW: lots of good value RFID readers available on ebay...eg  < 6 pounds incl post based on search (rfid Arduino)
But will they detect the pet microchips? And at what range?
62  Using Arduino / Project Guidance / Re: decrementing the delay value on: April 03, 2014, 08:28:09 pm
OK, Im still getting error messages. Here is my code. Please excuse my ignorance of what the error messages mean:

Code:
int led1 = 1;  //avoid the use of pins 0 and 1.
   //They are used by USB when uploading code.
int led2 = 2;
int led3 = 3;
int led4 = 4;
int led5 = 5;
int led6 = 6;
int led7 = 7;
int led8 = 8;
int led9 = 9;
int led10 = 10;
int led11 = 11;
int led12 = 12;

// the setup routine runs once when you press reset:
void setup() {               
  // initialize the digital pin as an output.
  pinMode(led1, OUTPUT); 
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(led4, OUTPUT);
  pinMode(led5, OUTPUT);
  pinMode(led6, OUTPUT);
  pinMode(led7, OUTPUT);
  pinMode(led8, OUTPUT);
  pinMode(led9, OUTPUT);
  pinMode(led10, OUTPUT);
  pinMode(led11, OUTPUT);
  pinMode(led12, OUTPUT);
  long delayValue = 1000;
}
   
void loop(){
   while(delayValue >=30){
        delay(delayValue);
        digitalWrite(led1, HIGH);
        delay(delayValue);
        digitalWrite(led1, LOW);
        delayValue-=10;
   }
}
63  Using Arduino / Programming Questions / Re: stop loop on: April 02, 2014, 11:52:40 pm
Helps to code it correctly:

if (flag == 0){ // 1 = is assignment, two == is comparison

also upper case/lower case sensitive

Oooooppps!
64  Using Arduino / Programming Questions / Re: Dali Master on: April 02, 2014, 11:47:27 pm
I wonder why I get the feeling that it would make more sense to ask those questions of the people who make/sell the DALI click board (whatever that is)?

...R
By Dali Master, I imagined a painting of a melting clock... smiley-confuse
65  Using Arduino / Project Guidance / Re: Feasibility of using ATmini85 to produce IR signal on: April 02, 2014, 10:23:17 pm
Too bad you don't have a little more room - maybe an RFID tag in each car,
You can get some very small RFID tags, the sort they inject in pets are very small.
Very nice, but £50 for the reader is too much to destroy, hacking it to an Arduino.
66  Using Arduino / Project Guidance / Re: Feasibility of using ATmini85 to produce IR signal on: April 02, 2014, 10:05:56 pm
+ 1 on the bar code approach, but slightly modified.

Just put some silver foil on the underneath of each carriage. Then set up a 'reflectance' sensor pointing up from the track.
Tried that with some 'shiny' card and a laser printer (black bars for the 'spaces'). Not enough reflectivity, difficult to accurately 'aim' an IR beam and a separate IR detector and there's not much flat space under the 4 wheel wagons I want to use. I was thinking of trying mirror tape but it's difficult to find in the UK.
67  Using Arduino / Project Guidance / Re: Feasibility of using ATmini85 to produce IR signal on: April 02, 2014, 09:54:21 pm
Too bad you don't have a little more room - maybe an RFID tag in each car, no power required - and a reader whereever  you needed it.
Will RFID work at the range of about 3/4", through the plastic body of the wagon? All the tags I've looked at won't fit into an OO/HO gauge 4 wheel wagon.
68  Using Arduino / Project Guidance / Re: Feasibility of using ATmini85 to produce IR signal on: April 02, 2014, 09:47:45 pm
This is an interesting project. Do you mean an Attiny85?
Yes. That's what I meant.  smiley-eek

Quote
I squeezed an Attiny45, an IR detector, an 85mAh Lipo cell and a home made electromagnet into an N Gauge wagon to operate as an uncoupler. I didn't use any PCB, just soldered things to the pins. The Attiny runs at 1 MHz to minimize power consumption.

This is sort-of the opposite of what you want.

A couple of thoughts come to mind ...

If you have a device to switch on the transmitter when the wagon passes a certain point then the receiver for the IR signal doesn't also need to be position-sensitive.
The IR receiver will be mostly buried between the rails, the transmitter will be pointing downwards. The idea is for an automatic hump shunt, so the receiver will be placed near the top of the hump, just before the 'release' point.

If you use a larger battery sufficient to give a few hours continuous operation of the Attiny you may have other options. With my system the IR decoder is the big energy hog so I have things programmed so it is only on for about 20% of the time. It didn't seem necessary to bother with the complexity of putting the Attiny to sleep.

...R
[/quote]I couldn't find how much current the ATtiny uses. I guess it depends on what it's doing. I only need it to provide an IR signal to an IR LED. On time will only be when the wagon is near the top of the hump, 30 seconds at most. My idea is to use the hall effect device, via a transistor, to power up the tiny85.
69  Using Arduino / Project Guidance / Re: Feasibility of using ATmini85 to produce IR signal on: April 02, 2014, 09:23:02 pm
1) yes it should work.
Thanks GM.
Quote
2) no you will need a transistor. Be aware there are latching hall sensors that are more common than the non latching ones you want.
I have one latching one, bought in error, and several non-latching ones.
70  Using Arduino / Project Guidance / Feasibility of using ATmini85 to produce IR signal on: April 02, 2014, 12:03:01 am
I would like to be able to identify up to 36 different model railway wagons as they pass over a detector. I've thought about various methods and the most likely one is to use an IR signal from each wagon. Due to space limitations, the mini85 looks a likely candidate, but I don't know if it's possible to use one to produce an IR 34KHz signal. Only one code is needed for each wagon, which will be preprogrammed. The power source will be a CA2032 3V button cell and, to save battery, I want only to switch it on when it's above the detector, so I'm thinking of using a hall effect device to control the power to the mini85.

1) Is this feasible? And if so...

2) Would a hall effect device be able to supply enough current from its signal line or will I need a transistor?
 I couldn't find the current requirement of the mini85 in the data sheet.
71  Topics / Product Design / Re: "Arduino skeleton shield" on: April 01, 2014, 10:50:18 pm
How many times you spend hours building, each pin on the arduino all going to different sensors, you get it working... you move it to another room, power it up... then you notice you meant "25.1" or some small error etc etc, you need to take the entire project sensors back to a different room...

How about a breakout for every pin, take the riser pins like an ethernet shield,  you plug in all the pins on the extension pieces, and that just sockets in and out... when you bring it back you lower the pin shield back down in one piece and continue the project, a blank shield which does nothing more than allowing you to simply pull it apart as 2 pieces...

Normally I'd reprogram another chip and swap them than pull out 16 cables to have to painfully reconnect them all between two places...

So when's the skeleton shield ready to be ordered? smiley
Not certain what you want here, but a protoshield with through pins (male on the bottom and female on the top) seems like the answer. Or have I got it completely wrong?
72  Using Arduino / General Electronics / Re: 9pin D sub to 7 pin DIN on: April 01, 2014, 10:35:28 pm
7-pin DIN sounds unlikely - what was this connected to ?
I've a 7 pin DIN plug and socket, bought from Farnell/Element14 (order code 1321479 for the plug) about 2 months ago. There are two types. One with 6 pins @ 30o and a central 7th pin, the other with 7 pins in an arc around the edge like the 5 pin audio DIN plugs. NB, these are full size (about 1/2" dia), not mini DIN plugs.
73  Using Arduino / Programming Questions / Re: stop loop on: April 01, 2014, 09:48:26 pm
Hello!

I have a problem with a code.
Code:
int n;
void setup(){
   Serial.begin(9600);
}
void loop(){
    for(n=0; n < 5; n++){
        Serial.println(n);
    }
}

how I do him in order that the iteration ends and does not return to begin
2 ways
1) Put the code you only want to run once in setup(), or
2) Use a flag to remember if it has already been run...
Code:
int n;
boolean flag =0; //Never run.
void setup(){
   Serial.begin(9600);
}
void loop(){
  If (flag = 0){
    for(n=0; n < 5; n++) {
        Serial.println(n);
    }
    flag = 1;  // remember it has been run, so don't do it again.
  }
}
74  Using Arduino / Project Guidance / Re: 3 way switching 230v on: April 01, 2014, 09:11:01 pm
Don't use a transformer to detect if the light is on, use a 5V light sensor, they are cheaper, safer and easier.

Read this, all of it
Electrical regulations Singapore

Really now, if you can't follow the diagrams you have posted, you have no idea how to wire a transformer, You have absolutely no idea how your project will alter the fuse operation thus protection from indirect contact could be compromised also there could be a risk from fire.

STOP seriously, Electricians earn their money not from wiring stuff together, (because anyone can do that after a few hours instruction) they earn their money by knowing what they are doing is safe, please find another project that doesn't involve mains voltage
"A little knowledge is a dangerous thing" and he has shown how little he knows.
75  Using Arduino / Programming Questions / Re: Help in while, if & else on: March 31, 2014, 11:32:11 pm

You have me there, but only because the accumulator (and various other registers on any uP used on Arduinos) can't hold anything shorter than 8bits, where a single connection (from my hardware basis/bias) can only represent 1 bit at a time. (I was going to say a "wire", but it is conceivable to have a transmission line long enough with a signal fast enough that one could have several bits propagating down the line as AC...) Granted, at the opcode level of the HC908's that I've written assembler for (and I would presume other uPs) one can perform a conditional test on a single bit in only 1-2 clock cycles, which makes that type of bit investigation very attractive for optimized coding (both in clock cycles and memory usage).
I've no experience of the HC908. I programmed the Z80 in a Sinclair Spectrum.
The flag register is what I miss most, and yes "one can perform a conditional test on a single bit in only 1-2 clock cycles" on most uPs.
The disadvantage with Assembler/Machine Code is the time factor. Writing in C/C++ is much quicker and only slightly less flexible.
Pages: 1 ... 3 4 [5] 6 7 ... 74