Thin String of circuits - Page 1
Forum section: electronics / beginners

author: thefloridian
author_rank: Newbie
timestamp: May 21, 2020, 06:10:05 pm
content: Hello all. I am new to electronics and would love some help. I should probably "stay in my lane" but I'm trying to build a prototype and am hoping someone can point me in the right direction.I need to report an absolute position to a numerical display (2 digit LCD). I have to report positions along a straight line from position number "30" descending down to position number "0", in full number increments. Each number has to be spaced 4.75 mm apart with a total length of roughly 150mm. One of the catches is that the string of positions can only be a max of 7mm wide.Also, it must be somewhat low cost as well to make this feasible.So my thought was to approach this one of two ways. Either some kind of sensor head that is on a track that runs back and forth along the 150mm length and reports the numerical position as it moves. Or, a series of contact circuits where as a device moves along the 150mm strip, a metal contact touches a - & + terminal and closes a circuit to indicate which position it is at.The device must be able to report the numerical position upon receiving power. So if the unit is at position 20 when it receives power, then "20" must report up to the LCD readout.I hope this makes some sense. I attached a rough diagram that might help as well. If anyone has suggestions I would be appreciative. I'm dealing in a very confined space so it is challenging me for sure.Thanks!

author: themadhippy
author_rank: Super Contributor
timestamp: May 21, 2020, 07:11:24 pm
content: Quoteput a resistor at each position,1k at pos 1 ,2k at pos 2 etc and read the value with a multimeter

author: Syntax Error
author_rank: Frequent Contributor
timestamp: May 21, 2020, 08:33:10 pm
content: A contactless method could be to visually encode the track with a 'gray code' of parallel black and white lines. You'll need a read head containing five led-photo sensors which convert the code into a digital output, which you can then display.In your case the code needs to be 5 bit or 5 lines wide as you're encoding from 00 to 30 (31 could be a locked or parking position). And it will read on power up.This may not be the cheapest or best approach for your project, resistors will do fine, but this method is worth knowing about as reflected binary code (RBC), to use the technical name, is the basis of position encoding across engineering. Good luck with your project.About Gray Code :https://en.m.wikipedia.org/wiki/Gray_code

author: ebastler
author_rank: Super Contributor
timestamp: May 21, 2020, 08:52:31 pm
content: We might be jumping to solutions a bit too quickly here. Could you give a few more details about your requirements please?You didn't mention any speed requirement. Does the display need to keep up with a fast-moving actuator? (How fast, or how slow, are the required changes?)Also, is there a durability requirement? Electro-mechanical contacts may wear out -- again, depending on how often and how fast the actuator position changes.Are dropouts critical? Two different flavors here: Depending on the chosen design, there might be "dead" positions between each of the contact positions, which would cause "stationary" dropouts. Or there can be contact bounce, which would only show up "dynamically", as the slider is moving. Are one or both of these acceptable?

author: thefloridian
author_rank: Newbie
timestamp: May 21, 2020, 09:05:50 pm
content: Ebastler, good questions.1.There will be rapid jumps from one position to the next in sequential order. This speed will very depending on the user.2.Durability is important so i do like contactless methods if possible.3.Dropouts between positions should not be an issue because the change from one position to the next will be rapid and should not be noticed by the user. The change in position will be near instant, but will linger on each position for variable amounts of time depending on the user.Thanks

author: wizard69
author_rank: Super Contributor
timestamp: May 21, 2020, 09:59:45 pm
content: Quote from: jonathanelrod@gmail.com on May 21, 2020, 06:10:05 pmWe can point you in any imaginable directionQuoteThis is where your communications starts to break down.QuoteI hope you mean that the positions are 4.75mm apartQuoteI have no idea what you mean by this. I could take it to mean that you only have 7mm of usable physical width for the detector.[quoteAlso, it must be somewhat low cost as well to make this feasible.Well yeah that is what they all say. One off devices/solutions by their nature are expensive. Further you have no indications of the environmental conditions.QuoteThe best solution depends upon many factors that you have offered no information on.For example my background is more industrial and in a rough positioning system like this we might use a relatively cheap linear sensor. Linear resistors can be had in all sorts of lengths with very easy connection to a microprocessor (you basically have a voltage divider):https://www.megatron.de/en/category/linear-sensors.html.If that doesn't float your boat Temposonics has an interesting series of sensors:http://www.mtssensors.com/products/industrial/index.htmlThese are the sorts of things that come to mind first as most of the engineering is done for you.Other things that are often used are prox switches set up to provide a binary position value. How useful this would be in your application is unknown. You would need 5 bits of data to cover 30 positions so this is a lot of prox switches. You also need a series of "cams" to actuate them.While a bit far from industrial practice you could use Electronic circuitry methods to fabricate a PCB with holes optimally spaced and use through hole optical detection. You still need 5 bits of data. You seem to have thought about something similar that uses physical contact detection. Without specifics it is hard to say which would be better. In a dust free environment I'd go for an optical solution. Unless you put a lot of engineering into it, contact detection will be a pain to make reliable and long lasting. Actually for optical detection you might be able to do reflective of a gold plate and dark solder mask.QuoteThat leaves out a lot of incremental solutions.QuoteConfined space can be an issue but you need to look for free space that might not be obvious. EDIT:Right after posting this I realized I forgot one way that might be better for this application. You can buy these days laser sensors that allow for an analog output and that output can represent distance to target. I've actually have forgotten which ones we use at work but there are many suppliers including Baumer, Wenglor, Banner Engineering, Keyence, Rockwell and a whole bunch of others. I've seen such sensors used to count stacks of trays 3/4" thick very reliably. The trick is finding one that fits your application with minimal distance requirements. Sensors like this ae not universally cheap but they can solve problems that can't be solved quickly any other way.

author: senso
author_rank: Frequent Contributor
timestamp: May 21, 2020, 10:04:13 pm
content: Just hack a cheapo ebay caliper, read current position from the caliper, done.

author: wizard69
author_rank: Super Contributor
timestamp: May 21, 2020, 10:34:24 pm
content: Quote from: senso on May 21, 2020, 10:04:13 pmThis is a good idea if he can fit one in. For most of these calipers or linear scales the data ports are well understood so creating a remote display is fairly easy.One could also go the cheap Chinese linear scale route such as :https://www.dropros.com/DRO_PROS_Digital_Readout_Magnetic_Scale.htm.but I don't believe these are absolute. He wants the position data to remain after a power cycle, so maybe not a good choice.

author: ebastler
author_rank: Super Contributor
timestamp: May 22, 2020, 08:49:39 am
content: Quote from: Syntax Error on May 21, 2020, 08:33:10 pmIf it needs to be a linear geometry and contact-less, that's probably the way to go. The digital calipers suggested elsewhere might be an alternative, if you can get some with absolute readout which also meet the "max. 7mm wide" requirement.In principle, what you are looking for is an "absolute linear encoder". These are commercially available of course, in many different lengths and most commonly with optical readout. But they are probably too expensive (a few $100), and are much more precise than what you need.If you could reduce the travel range to 100mm, a linear potentiometer and a microcontroller with built-in A/D converter would be a very simple solution which doesn't require any mechanical tinkering. Or could you convert the linear motion into a rotary one (e.g. via a dial cord or a lever), and then either read a rotary potentiometer or a rotary optical encoder?

author: Syntax Error
author_rank: Frequent Contributor
timestamp: May 22, 2020, 09:26:16 am
content: As @eblaster says, if you can reduce the travel range then you can read a static potentimeter - using the ADC on an Arduino. Connect the slide to the pot using a taut string in the same way an old radio dial works. Some reduction gearing is needed to convert 150mm of linear travel into 270 to 300 degrees of turn on the pot.This would be contactless, slim, cheap and always read true on power on. The potentiometer output may need to be buffered through an opamp to ensure the voltage range is stable and predictable.Lots of ways of achieving the same outcome

author: mikerj
author_rank: Super Contributor
timestamp: May 22, 2020, 11:10:59 am
content: Is there a possibility of using a rotary sensor (e.g. multiturn potentiometer) coupled to the sliding part e.g. by a tensioned string system as used on old radio tuning dials or a small toothed belt? A rotary encoder is bulky compared to the dimensions of the system described in the OP, but if it could be mounted remotely that might not matter.

author: Syntax Error
author_rank: Frequent Contributor
timestamp: May 22, 2020, 12:02:19 pm
content: Another way?Place 30 LEDs on the track and illuminate them in sequence (multiplex) faster than the eye can see. The slide has a photosensor that detects the LED blink. The microcontroller software knows which LED blinked, and there's your number. You'll just need plenty of GPIO pins to multiplex 30 LEDs. You could make this look really cool if you included RGB leds into the design.

author: ebastler
author_rank: Super Contributor
timestamp: May 22, 2020, 03:47:55 pm
content: Quote from: mikerj on May 22, 2020, 11:10:59 amYou mean, different from the possibility discussed in reply #8 ("convert the linear motion into a rotary one, e.g. via a dial cord") or in reply #9 ("connect the slide to the pot using a taut string in the same way an old radio dial works")?Geez, does anybody actually read the replies before posting?

author: ebastler
author_rank: Super Contributor
timestamp: May 22, 2020, 03:59:20 pm
content: Quote from: Syntax Error on May 22, 2020, 12:02:19 pmThat's a nice one! No contacts or potentionmeter surfaces that could wear down over time, and it doesn't require any optical resolution to speak of (unlike the 5-bit-per-position binary code).5+6 pins to drive a matrix of 30 LEDs, plus one input for the photosensor, sounds quite reasonable. Or, of course, you could use external shift registers to drive the LEDs, or WS2812-style LEDs which can be cascaded.

author: Syntax Error
author_rank: Frequent Contributor
timestamp: May 22, 2020, 04:16:04 pm
content: @eblaster - neopixels would be perfect as they only need one GPIO pin and, their color could change to indicate the pointer position. The only challenge is how to get the photosensor coupled to the leds without the need for flying leads or copper contacts? Some kind of refractive light pipe?

author: thefloridian
author_rank: Newbie
timestamp: May 22, 2020, 05:24:11 pm
content: Quote from: themadhippy on May 21, 2020, 07:11:24 pmI appreciate your suggestion. This seems to be the simplest option. Question for you. If the goal with this method is to use a multimeter to measure the volt readout on each descending position and have each voltage correlate with a position number, do multimeter's read voltage nearly instantaneous? I am concerned with a delay in readout with this method.

author: themadhippy
author_rank: Super Contributor
timestamp: May 22, 2020, 05:31:12 pm
content: Quoteno need to read volts and convert,use 1k steps and read the output directly from an ohmeter (multimeter set to ohms) .The speed depends on how quick your meter can take and display the readingQuoteor just 6 if you charlieplex them.

author: thefloridian
author_rank: Newbie
timestamp: May 22, 2020, 05:51:28 pm
content: Quote from: Syntax Error on May 21, 2020, 08:33:10 pmIs this what you are referring too?https://www.components.omron.com/product-detail?partNumber=B5W-LB&gclid=CjwKCAjw8J32BRBCEiwApQEKgXFvB-YbIb7bgijePBkyF1pA-YAW-SXLR6w1JGtKxVnDxb8PB38yahoC2YYQAvD_BwE

author: mikerj
author_rank: Super Contributor
timestamp: May 23, 2020, 03:55:43 pm
content: Quote from: ebastler on May 22, 2020, 03:47:55 pmI tend to miss stuff when it's buried at the end of a load of other stuff talking about a different solution. Geez, does no one here bother to lay out solutions clearly?

author: thefloridian
author_rank: Newbie
timestamp: June 05, 2020, 06:44:17 pm
content: Thanks again for all of you that have posted suggestions.I believe i have settled on a direction.IF anyone has experience diagraming circuit boards (flex specifically) in a format that I can submit to a manufacturer for quote and production, and wants to do some side work please message me. I need to get a prototype manufactured but am out of my element.thanks,