Maker Pro
Maker Pro

Report a line of sensors

Hi all,
This is a 'how to go about it' question.
I need a method of sensing the width of an object on a platform, using a length of LDR's, or some other light differentiating component, sending the 'result' to serial or USB.

It is the sensor side I am concerned about (Electronics), is it best to just send every wire separately into some kind of matrix chip then into RS-232? What kind of methods get a large (50-100) sensors into a protocol that can be computer read (serial etc)? Is there a chip that does it all, or a rotating check method.. wondering what is out there to do this job, and or the methodologies that I should approach.

Kind Regards
 
The sensors will be placed 1 cm apart... so far I'm thinking of an LDR, 1 or 2 transistors and a 1k ohm resister. one resister for telling if the LDR is (significantly) getting light or not, then another transistor allowing the series link to the next sensor at 0 ohms or 1k omhs, I could then check the total resistance. Since order doesn't matter...

Please forgive my electronic skills, but I'm trying to achieve something like this: (except this looks like its in parallel which isn't what I want. - What I do want is that if any one sensor is getting no light, i can measure 1k per sensor at the end of the chain)
[[picture attached]]
 

Attachments

  • measure.gif
    measure.gif
    5.6 KB · Views: 170
Perhaps this diagram (attached) is a little closer to what I'm after, however I notice that as each transistor is turned off, the positive line will drop, so I guess there needs to be a second transistor carrying the positive line, not sure how to add this in....

Any help appreciated!

picture attached.
 

Attachments

  • series.jpg
    series.jpg
    25 KB · Views: 151
Last edited:
This is about as close as i can get to imagining how it would look
Do I need the 1meg resisters to make the transistors work?
I need to daisy chain about 100 of these LDR's, and will be testing the number of LDR's gaining enough light to turn the transistor on at 1k ohms per LDR.

Any help? most apreciated
 

Attachments

  • series2.jpg
    series2.jpg
    55.5 KB · Views: 168

KrisBlueNZ

Sadly passed away in 2015
So the object will be placed on a platform and you want to measure its approximate size in one dimension?

Will the object always be positioned squarely on the platform?

Will the object always be at least as wide at the bottom as it is at the top, with no overhanging parts?

Do you plan to put the LDRs in a strip under a transparent sheet that the object sits on, and provide light from above?

You said in your first post that you want the information to come into a PC, but recently you've said you can "measure" the number of transistors that are ON. How will you measure this?

How quickly do you need to be able to measure a result?

Do you have experience with programming microcontrollers?

As you may be able to see from the nature of my questions, it would very much help us to help you if you were to explain the overall project, rather than giving us the least information you think we need. We prefer not to operate on a need-to-know basis; get the whole project description out, and we will have a much better grounding from which to advise you.
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
We prefer not to operate on a need-to-know basis; get the whole project description out, and we will have a much better grounding from which to advise you.

Kris, this is creepy! That's exactly what I was going to post .. and I do mean exactly all of it! :D

Chris
 

KrisBlueNZ

Sadly passed away in 2015
LOL Chris :)

You know what they say about great minds... Or it could just be that we've all said the same thing so many times that we are all narrowing in on the best way to say it :)
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
LOL Chris :)

You know what they say about great minds... Or it could just be that we've all said the same thing so many times that we are all narrowing in on the best way to say it :)

That theory works for your last paragraph but this goes a bit beyond that. I'm talking about your entire post. Every sentence, question, statement .... All of it verbatim! It's like a Vulcan Mind Meld mate! :eek: :p

Chris
 

KrisBlueNZ

Sadly passed away in 2015
Wow, that's a bit weird. It's like deja vu all over again! I guess we do become more predictable as we get older, but that's too much!
 
So the object will be placed on a platform and you want to measure its approximate size in one dimension?

Yes, all in one line, not worried about overlap, it will be jammed into a perspex corner, its part of a weight and measuring process machine

Will the object always be positioned squarely on the platform?

Yes

Will the object always be at least as wide at the bottom as it is at the top, with no overhanging parts?

Yes

Do you plan to put the LDRs in a strip under a transparent sheet that the object sits on, and provide light from above?

I believe so, it was the only way I could conceive of getting a large number of sensors without having a dedicated analog physical line per sensor running back to the micro-controller... if for example I find it isn't quite accurate and I need to make it 200 sensors, that's a prohibitive number of wires.

You said in your first post that you want the information to come into a PC, but recently you've said you can "measure" the number of transistors that are ON. How will you measure this?

Yes I changed my mind on that, I found the Arduino will take resistance and voltage measurements, then I''ll feed it to a 4 digit LED displace of which if found the programming and circuit diagram.

How quickly do you need to be able to measure a result?

Within 1 second... if its just a resistance measurement the programming will just sample every half second.

Do you have experience with programming microcontrollers?

No experience, but I will have no problem picking it up, i'm a C programmer from way back and have written protocols for many devices, ive looked at the Arduino and RPi coding, its no problem, looks easier than say a PIC controller

As you may be able to see from the nature of my questions, it would very much help us to help you if you were to explain the overall project, rather than giving us the least information you think we need. We prefer not to operate on a need-to-know basis; get the whole project description out, and we will have a much better grounding from which to advise you.

Thank you for your concise questions, I don't know if the resistance way using LDR's is the way to go, however, I did figure on something like the circuit above and using the Arduino a little after I'd first posted it, so the thread looks a little different. Always open to other options such as some kind of multiplexer? or pic controller, but the Arduino looks nice and easy for sampling voltage, resistance and data.

-Chris
 

KrisBlueNZ

Sadly passed away in 2015
OK, wires will not be a problem if you include I/O expansion along with the LDRs (or whatever you end up using). A parallel-input serial-output shift register such as the 74HC165 or CD4021 will read eight input states (from eight LDRs) and send them out serially on a single line, in response to clock pulses, and they can be cascaded. So the detector assembly would only need five wires - power, ground, shift/load signal from micro, clock from micro, data to micro. You need to be careful with terminating the clock signal though, because of the physical length of the board, and personally I would send a loopback data signal that can be used to verify that the data was sent with no mis-clocking.

You might find that photodiodes or phototransistors are more compact, faster, and maybe even cheaper than LDRs.

How do you feel about making a PCB?
 

CDRIVE

Hauling 10' pipe on a Trek Shift3
Chris, thanks for posting the requested information. I think we're going to enjoy the progression of this project, as it's not our typical (run of the mill) that we see repeatedly.

Here's some random thoughts (Analog To Digital):

(1) LDR's, whether wired in a series string or in parallel, don't need an accompanied transistor. A series or parallel LDR network can be connected directly to a uC's 'ADC' input with a pullup resistor connected to Vdd. This will form a voltage divider that the ADC can read. On the other hand, Arduinos may have an 'Rx' input function as you said. Presumably, a pullup would not be required for this.

(2) The LDRs can be replaced with fixed resistors and PhotoTransistors to produce the same voltage divider effect described in (1) but you would be restricted to a parallel circuit only. Series would not work if PhotoTransistors are used. PT's are cheaper and much faster than LDRs.

(3) There are also chips available that incorporate both Photo Emitter (LED) and Photo Detector. They're intended to be used with a reflective object. A system like this would not require an overhead light source.
http://www.vishay.com/docs/81449/81449.pdf

While measuring the total resistance of an LDR circuit considerably reduces wiring, it goes against current digital trends. Whether it be LDRs, PhotoDiodes, PhotoTransistors, or Emitter/Detector chips, each device will always be either ON or OFF. This makes any of the schemes naturally digital in nature. It would be a pity to not keep it as such.

I have some thoughts regarding reducing component count and wiring considerably but it would require a motor, probably a Stepper, that would scan from one end of the object to the other. The traverse would incorporate only a single photo detector. The data would be a simple pulse count method keeping it digital and easy to interface to any uC.

Here's another weird stat. Currently, there are three members participating in this thread..

ChrisS
Kris
Chris (me) who's also a Chris S! :confused:

Chris
 
Top