Show Posts
Pages: 1 2 [3] 4 5 ... 114
31  Using Arduino / Project Guidance / Re: Autonomous railway scanning robot, general guidance required. on: October 14, 2014, 09:43:34 pm
If this is going to operate on a working railway it will need some sophisticated interaction with the signalling system and the signallers
Yes. It would, at least, have to reliably operate the track circuiting and folding stub axles wouldn't do that. It would need some method of informing the signallers that it was going to fold up and when safely clear of the running track. If the signaller was not aware of these and saw the track circuit clear unexpectedly, their immediate reaction would be to stop all trains in the area, as it would look as if there had been a derailment.
unless it is so small that a train could destroy it with absolutely no damage to the train or to any other railway infrastructure.
I can't see Network Rail even agreeing to that.
If it is being designed for use on the UK rail network I reckon you need to talk to Network Rail before you spend more than a few hours scoping out the project.
If it was able to activate a track circuit, imagine what would happen at an automatic level crossing. It would enter the section, the lights would flash, the barriers would close and 30 minutes later this thing comes trundling along at 2 MPH! Another 10 minutes later, the gates will open to allow the traffic on the road to cross. If it's not destroyed by an irate motorist in the first few weeks of operation, I'd be most surprised.
32  Using Arduino / Project Guidance / Re: Model Railway on: October 14, 2014, 12:57:23 am
No. It means set a route from the position of button 1 on the track diagram to the position of button 5 on the track diagram.
Much easier than remembering the route number of, perhaps, 239 different possible routes.
That's the way it's done in full size modern electronic signal boxes.

You are probably right, but it would have been useful for the OP to explain that and save us all some work.

I wasn't proposing that one would have to remember the correct number out of 239 - perish the thought. There would need to be some visual means of selecting a route. Maybe that is just by pressing all the buttons along the route. However the program will need to know all 239 legitimate route options so it can determine that the button sequence is valid before it can do anything else.

33  Using Arduino / Project Guidance / Re: How to override an if statement condition with another on: October 14, 2014, 12:51:42 am
But will you immediately remember what it does and why after a 6-month absence?
Personally I much prefer to set things out line by line - clarity raather than compression.

I disagree.,
If you're looking at it again 6 months later, chances are it's because CHANNEL1 is having something written to it unexpectedly.  As soon as you look at this line you KNOW that something is being written to CHANNEL1,  then it only takes a moment to see what are the conditions that decide exactly WHAT is being written.

I find this far easier to spot than trying to navigate through a maze of curly braces and nested IF statements.  Until you've traced every route through the nests you can't even be sure that it always writes something.
I agree with you, Ken. And a relevant comment will also help you remember what it does.
34  Using Arduino / Project Guidance / Re: Need help in this case on: October 14, 2014, 12:45:18 am
Everything you've been told so far is correct, but there's another way to think of the problem. Imagine that you're blind and out walking. Your white stick detects an obstacle in front of you. You turn left and keep walking, all the time checking with the stick on your right to see if you've reached the end of the obstacle. If you've reached the end of the obstacle, you can turn right and continue in your original direction. That's what your Robot should be doing.
35  Using Arduino / Project Guidance / Re: Getting data from a rapidly rotating device. on: October 14, 2014, 12:19:41 am
My thought would be to wind a coil around the shaft and feed your data into that. Another nearby stationary coil (best would be a concentric one) can then be used as a pick-up. If you make your baud rate slow enough (say 100 baud to start with) to avoid hysteresis problems, it shouldn't matter what speed the shaft is turning at. This transformer-like arrangement will only work on the rising and falling edges of the signal, but it should be easy enough to turn that back into a square wave. And it should work in both directions, if feedback is needed.
You could try uploading a sketch to the Arduino while it's turning at 10,000 RPM. That would be a first! smiley smiley
36  Using Arduino / Project Guidance / Re: Electromagnets controlled by arduino - please help! on: October 13, 2014, 11:16:54 pm
The electromagnets will not be touching the spheres. They will be below a sheet material which would carry the spheres.
Is this sheet material specified in the project description given by your teacher?
Is it specified that the movement of the balls has to be by magnetism?
If these haven't been explicitly specified, I guess the teacher is trying to get you think laterally.
And I can probably guess that the answer he is looking for is based on Relativity.
37  Using Arduino / Programming Questions / Re: Sharing 5V pin on: October 12, 2014, 11:12:01 pm
You need rubber stoppers in the unused pins to prevent the current getting out smiley
Where do you get yours from? I can't find the correct size ones anywhere. smiley
38  Using Arduino / Project Guidance / Re: Automated motor - Programming a motor speed - Automated speed variations on: October 12, 2014, 10:49:01 pm
The Appolo missions were controlled by computers with a fraction of the processing power of an arduino.  I'm sure it'll cope with your very basic washing machine cycle.
But will it cope with this one?
39  Using Arduino / Project Guidance / Re: Model Railway on: October 12, 2014, 10:20:08 pm
button 1 to 5 

Is this puedo code for a FOR LOOP ? (check buttons 1 through 5 ?)
No. It means set a route from the position of button 1 on the track diagram to the position of button 5 on the track diagram.
Much easier than remembering the route number of, perhaps, 239 different possible routes.
That's the way it's done in full size modern electronic signal boxes.
40  Using Arduino / Project Guidance / Re: Model Railway on: October 12, 2014, 10:09:28 pm
you need the 1st button to say where you want the route to Start and the second button where you wanna go.
If you want to keep it very simple maybe you could program it so that a press of button 1 or 4 means "train is here" and a press of button 2 or 3 means "wants to go there"
Isn't that exactly what he asked for, in different words?
"train is here" == Start of route and  "wants to go there" == End of route. A button press for each end of each possible route. Much easier than having to remember a route number for each of several possible routes. Let the program sort that out. Once the route is clear and set, the direction of travel is irrelevant, except for signalling.
41  Using Arduino / Project Guidance / Re: Creating 30+ Arduino gloves that communicate interchangeably on: October 12, 2014, 09:08:04 pm
My suggestion would be:
1) a switch in the thumb part of the glove, on the ball of the thumb, so that when the two shake hands the switches close to signal a transfer of data is in progress.
2) An infra red LED in the tip of the middle finger to transmit the data.
3) An infra red receiver (diode or transistor) on the sleeve of the glove (near to where the middle finger of the opposing hand will be, you'll have to experiment to find the correct location that will work for all hand sizes) to receive the data.
4) An indicator led or piezo sounder to signal data transfer has been successful.
5) A temperature or capacitive sensor to tell when the glove is on a hand.
6) An indicator LED to show that the glove is 'active'. Maybe flash this when data transfer has been successful, instead of No.4
7) All these connected via an umbilical to an Arduino with a Bluetooth shield, perhaps in a pocket, with a battery pack. I'd rule out XBee, as it would only be able to talk to one signal at a time, but see below.
Now the problem will be to get the receiving end to talk to more than one Arduino at a time. If I remember correctly, Bluetooth can connect to a maximum of 7 devices at the same time. If your handshakes are not simultaneous then only two Arduinos need to connect at any one time, but if there can be more than one handshake at any one time, then you've got problems. Maybe, store the data in the Arduino and only pass it back to the receiver when the glove is removed, assuming that no two gloves are removed at the same time.
With 30 gloves, there are 29 other people to shake hands with. You can't shake hands with yourself!  smiley
There are (Sigma 29 =) 439 possible handshakes, each involving 2 gloves, a total of 878 pieces of data.
Where are you going to store it and in what format? A spreadsheet would probably be your best option.
How will you use that data?

Sorry, I missed your mention of Wifi. That would probably be the easiest to accomplish what you want. Forget Bluetooth and Xbee.
42  Using Arduino / Project Guidance / Re: Should I Learn Arduino First or Buy a Starter Kit on: October 12, 2014, 07:59:59 pm
but I already have C and C++ training. I want to learn hardware part and use arduino with shields like Ethernet shield and XBEE shields for my projects.


Look over or & the Internet for projects you want to construct.  Start simple, buy the parts, program and learn.  Modify and add stuff... Make them your own.

UNO is a good start.  The uC is replaceable.  Also, Adafruit sells nice (supported clones) as does Sparkfun and others... That is, they both have active forums and guarantees you will not get from most Chinese vendors of clones.
Where do you suppose they get their clones from?
Is this forum not active enough?
43  Using Arduino / Project Guidance / Re: Microphone controlled gamepad emulator on: October 12, 2014, 07:13:37 pm
Hi everyone, I wonder if you can help me?

I would like to sample the amplitude from a microphone and use it to emulate a gamepad joystick to move you forward in a standard PC game (and consoles if poss).

I think it may require a Leanardo board and possibly another to accept either a mic input or USB soundcard.
I have some programming experience but am new to Arduino so would really appreciate some guidance.

What if someone sneezes loudly when you're at a critical point in the game?  smiley-confuse
44  Using Arduino / Project Guidance / Re: Is it possible to capture an electrical signal as input? on: October 12, 2014, 06:57:21 pm

I have an arduino uno and basically want to capture everytime a circuit is run with a push button (connecting battery with another component), logging both that instance and the duration it's running. Nothing so complicated that I would need any type of sensor. Question is.. how would I exactly go about capturing that in the controller? I'm afraid I'll fry the board if I mess around with it.

My crystal ball has crashed, so I cannot see any details of this 'other component' and battery or how you would like to connect it (wireless, Bluetooth or with a cable). Also, the mind reading course I'm taking doesn't start until next year, sorry.
45  Using Arduino / Programming Questions / Re: Model Railroad Xing Gates on: October 09, 2014, 09:18:26 pm
Im slowly trying to develope a program to take ir inputs and based on those inputs make the xing lights flash and then wait 5 seconds and then the gates will come down. So far i have the lights flashing at the rate i want them. Ive tried making the servos move but havent had any luck.

I will have 4 ir sensors like this:
                                                                    |                                                     |
                                                                    |                 RR                               |
                                                                    |                                                     |
                                                                    |           XING                               |

Another thing im trying to do  is have the gates timeout (go back up)if the conditions require.
Meaning if the train trips IR1 the lights will flash then wait the 5 seconds and then the gates go down. If the train doesnt hit the IR2 sensor within 15 seconds, the gates will go back up and the lights will shut off. Im not quite sure if i should try the millis() or the while function since i havent used that function before.  And the same goes for the other directions starting with IR4.
I didnt make any arrays figuring there wasnt that many reasons to use it. Also trying to work the speaker and make it DING DING but have never done anything like that before. Any help would be appreciated. Thanx in Advance.
Post your code and the schematic. Don't use while(), as it's blocking code. Your Arduino won't do anything else while it's running.
Pages: 1 2 [3] 4 5 ... 114