Show Posts
Pages: 1 ... 36 37 [38] 39 40 ... 106
556  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.
557  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.
558  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

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.

[/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.
559  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.
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.
560  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.
561  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?
562  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.
563  Using Arduino / Programming Questions / Re: stop loop on: April 01, 2014, 09:48:26 pm

I have a problem with a code.
int n;
void setup(){
void loop(){
    for(n=0; n < 5; 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...
int n;
boolean flag =0; //Never run.
void setup(){
void loop(){
  If (flag = 0){
    for(n=0; n < 5; n++) {
    flag = 1;  // remember it has been run, so don't do it again.
564  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.
565  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.
566  Using Arduino / Project Guidance / Re: ABC - Arduino Basic Connections on: March 31, 2014, 09:18:21 pm
Does anyone have the URL of pighixxx's website? The one in his profile just has a page saying "See you soon." and a twitter account. Not much use as a reference for newbies asking "How do I connect...."
567  Using Arduino / Project Guidance / Re: 3 way switching 230v on: March 31, 2014, 09:03:31 pm
What you want to do is possible you would need 2 * 2 way 230V switches, 1 * 2 way 230 volt relay (everything rated to the load of your circuit also taking into account the power factor)
Unless he wants a 3 way arrangement (with a centre crossover) he only needs one 230V 2 way switch and a single pole double throw relay to take the place of the second switch.
Everything else you wrote, I heartily agree with.
568  Using Arduino / General Electronics / Re: FYI: Mounting your PCBS etc. to the inside of an encloser on: March 30, 2014, 09:50:58 pm
compared to my 'natural' spelling, any speal cheacker is wonderful

just load one up and Bob's your Uncle !
I have a smell chukker on my worm processor, but I can't fit won two my tripe writer.
569  Using Arduino / Programming Questions / Re: Help in while, if & else on: March 30, 2014, 09:13:50 pm
I have to say that I'm with Henry_Best on this one.
It might be because I'm coming at programming from a hardware basis, so I think that
is perfectly reasonable to test for a Logic1 on a pin, as is
to test for a Logic0.
I'm coming from an assembler/machine code basis where everything is 1 or 0.
0b0 == FALSE == LOW and 0b1 == TRUE == HIGH
Not quite, as anything !0 == true, so for example, -31429 == true.
570  Using Arduino / General Electronics / Re: potting? silicone? epoxy coating? specifics on weather proofing Arduino circuit on: March 29, 2014, 10:44:32 pm
There's also fingernail polish, if you prefer that to Type UR (urethane) conformal coat which is what industry uses.
You can get it in pretty colours, too!  smiley
Pages: 1 ... 36 37 [38] 39 40 ... 106