| Electronics > Projects, Designs, and Technical Stuff |
| Borderlands style jewelry box research thread |
| << < (4/17) > >> |
| Youkai:
Took some time off of the project but I'm thinking about it again. Specifically I was thinking about the opening/closing operation. My plan was to time how long it takes for the servo's to complete their rotation under load and then just have the lid and drawers open in sequence. But this is not ideal for two reasons. 1) It's not as cool as if they all open at the same time. 2) There is no mechanism to detect if there is a bad state and cancel operation until needed. So ideally there would be some mechanism to detect when the lid and drawers get to certain positions. For opening; once the lid opens enough to clear the drawers then the drawers can start opening. For closing I could send the lid to a partially closed position until the drawers finish closing then close it completely. So I was thinking about some kind of switch with a lever arm (e.g. https://www.adafruit.com/product/819) that the lid/drawers would work. Then I had an idea of a photo resistor (e.g. https://www.adafruit.com/product/161) where the lid/drawers operation would just cover the sensor up to trigger it. I don't have any experience with photo resistors though. Are they reliable enough to use for a scenario like this? |
| Ian.M:
A CdS photoresistor would be one of the worst possible choices of optical sensor for a position sensing application. They are slow and their resistance value is highly dependent on temperature and their previous illumination history. Also, if you plan to use ambient light, you'd have to cope with several orders of magnitude difference in illumination level (e.g. between direct sunlight on the dressing table in the morning, and in the evening, a room only lit by subdued 'mood' lighting with the dressing table in shadow). Even if you provide a light source for the sensor, strong external illumination could confuse it, and a CdS LDR isn't fast enough to make it practical to use a modulated light source to discriminate between the intended signal and interference from ambient lighting. A better choice would be an IR photosensor with an IR LED and a phototransistor. The IR LED can be modulated by pulsing it at a frequency of a few tens of KHz, and the phototransistor can be optically filtered to reject non-IR sources and AC coupled so that steady ambient illumination has no effect except to reduce its sensitivity ti the desired signal. If the circuit is arranged to reject signals other than of the modulation frequency, the result can be highly resistant to interference from other light sources. Such sensors fall in three categories: * Retro-reflective, with the IR LED and phototransistor side by side with a light-proof partition between them so that the only way for the LED to illuminate the phototransistor is for its light to bounce off a reflective surface close in front of the sensor. * photo-interrupters, The LED and phototransistor face each other either side of a slot in their housing. The light path between them can be interrupted by anything opaque entering the slot. For positioning applications that could be a metal vane attached to a shaft with its edge notched at positions you want the sensor to detect. * Beam sensors, basically the same concept as a photo-interrupter, except separate the LED and phototransistor, and add optics or shades so that the LED emits a relatively narrow beam and the phototransistor can only sense light from one direction.Also the receiver doesn't *have* to be a phototransistor - it could also be a photodiode with or without an integrated amplifier. Adafruit stock one retroreflective sensor: https://www.adafruit.com/product/2349 You can get significantly smaller ones from other suppliers. A lever arm microswitch like you linked to could work for your application but they tend to be bulky, to require an accurately made mechanism to operate them consistently, and its a PITA adjusting their mounting position to get them to operate at the exact point you want them to. |
| helius:
--- Quote from: Ian.M on September 04, 2018, 02:23:05 am ---A CdS photoresistor would be one of the worst possible choices of optical sensor for a position sensing application. They are slow and their resistance value is highly dependent on temperature and their previous illumination history. --- End quote --- Is that really a concern? CdS photocells were the standard technology in optical expression pedals used on transistor organs, where they obviously had to respond within a few milliseconds to control the sound. --- Quote ---Also, if you plan to use ambient light, you'd have to cope with several orders of magnitude difference in illumination level --- End quote --- This is a real concern. |
| Ian.M:
For anything directly controlled by a human, even a few tens of ms delay is imperceptible. We just aren't equipped to notice. However even a couple of ms delay would make them ineffective with modulated light sources, especially as one needs to keep the modulation frequency fairly high to allow spurious signals that commonly modulate modern domestic light sources, (e.g. PWM dimming, typically in the high Hz to low KHz range, and 100Hz or 120Hz from the rectified but insufficiently smoothed supply), to be rejected. There's also the issue of the relatively large area of a typical CdS photoresistor, which makes precise position detection extremely difficult, even with a lens system, a well collimated light source and a focal plane aperture well matched to the active area. |
| Youkai:
I'm not at all worried about a few MS delay in the photo resistor. My plan for the photo resistor was to have them sit in a tiny cavity which would be covered by the moving part. The moving part cover the cavity within about a MM of space. This should effectively block all outside light. Also the inside of the lid will have a RGB led strip in it. Originally I was thinking it might do cool color things while opening and then settle on white when open to illuminate the inside. But I could switch that out for some plain white LED and just have them on any time the thing is in operation. This should flood the inside of the chest with enough light to get a clear difference between dark/light regardless of the ambient light situation. I had considered "what if the room is dark"? The thing I like about the photo resistor is that it's tiny compared to my other options and there are no moving parts. So the question then is will I get a distinct enough difference between light and dark. I would think so but Iam.M noted that temperature can have an effect. Is that difference enough at standard interior room temperatures that it would throw the resistance numbers off so far as to make them unreliable? I'll have to read Ian.M's post in more detail tomorrow to try and understand the difference between his options and my current idea. Thank's everyone. |
| Navigation |
| Message Index |
| Next page |
| Previous page |