Another Newbie Steps into the Arena
#1
Posted 13 June 2013 - 01:38 PM
#2
Posted 14 June 2013 - 03:22 PM
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#3
Posted 14 June 2013 - 04:55 PM
It did... I actually web-searched a bit, read through his stuff, and that is how I landed here and discovered the Netduino platform. And it was a happy discovery!
I plan to attempt something a little different than what Jarrod created.
I was thinking of a configuration where space for each sensor is cut into the track, and as a car rolls over them, time is captured (via IR or pressure or sound or something (I need at minimum thousandths of a second precision, prefer ten-thousandths). I am trying to remove the need to have a paired sensor, remove the need to have hardware above/below the finish line. Just something that points "up" and can tell when something is over it.
I saw the below sensors via web searches but am not sure if Netduino driver support exists for 4 simultaneous sensors, and if they would actually "work" for that purpose and can be powered by the Netduino itself.
http://www.adafruit.com/products/164
or
http://www.amazon.co...=A10EAPE4CAYC9P
or
https://www.sparkfun.com/products/9375
or ?
The time captured would be displayed on a simple web page and also on a 4-line LCD (reason why I'm leaning towards a Netduino Plus 2).
I am also trying to think through how to start the timing (open/close start gate?). The sky is the limit there.
I have several months to get this done, so all thoughts appreciated on how to get started properly.
#4
Posted 14 June 2013 - 07:36 PM
Hi Chuckles,
I have used the sharp infra-red sensors (analogue range and digital presence versions) for a mobile robot, they are really simple to use. Internally however they are quite complex and I am not sure how reliable they will be for a fast moving target.
Personally I would start off as simple as possible, get something that works and then build it up to something that you will be proud to show off.
First I would place a magnet on the bottom of each car, and a tiny reed switch in the track. Reed switches come quite small, and so do powerful magnets.
If the room will always be lit, then I might try placing a photdiode in the track facing up, and detect the shadow cast by the cars.
A bit more complex would be to do the complete opposite - use a simple IR transmitter and receiver pair facing up, with a bit of reflective tape on the bottom of the car. This is harder to make work since the ambient light will affect the receiver.
Remember to have fun - Paul
#5
Posted 14 June 2013 - 08:51 PM
#6
Posted 16 June 2013 - 02:00 AM
Thanks for the thoughts and responses.
The cars have weight restrictions, so putting things like magnets on them is off-limits. I think that takes me back to the idea of having some kind of sensor facing "up" and detecting when a car passes over them by casting a shadow. The raceway has fluorescent lights, so I think something like embedding a mini photocell (https://www.sparkfun.com/products/9088) might be a good move; but I wonder how long the wiring can be between the cell and the Netduino, what/where resistors need to be, and also if I can read 4 at a time with a Netduino Plus 2.
What do you think of using the light-detection strategy and that particular part, which was mentioned on http://johnnycode.co...h-the-netduino/ ?
Thanks again.
#7
Posted 16 June 2013 - 07:54 AM
Hi Chuckles,
Just before you rule out magnets all together - they might stil be a fast way to acheive working hardware so you can start testing the software. It means you get a working prototype that shows you are on the right "track". Its not much fun bashing away at hardware and software when neither are working properly - been there - done that - a lot!
Last time (about 20 years ago!) I was setting up some railway signals with magnets I found some very light weight ones that would fit on a Hornby HO wagon without adding much weight at all. Looking on ebay the much stronger Neodynium ones are now availabe in many sizes, for example (not a recomendation of seller or product) http://www.ebay.co.u...=item1e7844afac might work well. This seller gives weight of magnets as 0.02g.
The light sensor you gave a link to is probably not going to be fast enough. There are some comments on the page, the first one "Remember that the response time on these is very long, somewhere in the 50-100ms range, so it’s difficult to use them for transient events (like, say, laser triplines)."
What you should be looking for is a photo-diode (fast responce time) rather than a photo-resistor (slower).
Break the beam
How big are the wheels on the cars?
Do they run in a slot - or does the whole car run in a slot?
Have you considered using the sparkfun Photo Interrupter GP1A57HRJ00F - it has a 10mm slot that the wheels might be able to pass through.
It comes with an optional break out board that has space for the reistor required to get a logic signal.
I guess the main issues here will be making sure the wheels pass through safely. If they are not already in a slot, perhaps a small island is needed to guide the wheels on one side through the slot.
Reflective / ambient
On sparkfun there is also an IR emitter and diode pair that are intended to be used with a reflective surface. This looks like it would be worth experimenting with. You might try using it as intended (reflective) or if that does not work, try the diode part on its own to see if it can detect the ambient light.
(If you go reflective and ambient is a problem, you might be able to put the gate inside a short tunnel to shade the sensors.)
The sparkfun products come with example circuits giving resistor values.
The Netduino has ample digital inputs you can use for the sensors. Each one can have be set to generate an interrupt which triggers an event where you can handle the passing of the car.
One thing I am not sure about is how fast the Netduino can handle interrupt events.
Here, the requirement is to capture and timestamp each pulse in the order they occur.
Has anyone else got experience of doing this?
Is it reliable - especially if more tracks are added?
I can't remember if events have a timestamp built in to the event data or whether the event handler has to fetch a timestamp.....
Hope this helps (don't be bullied into trying things out just because someone suggests it on a forum) - Paul
#8
Posted 17 June 2013 - 12:59 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users