0
\$\begingroup\$

I am making a simple motorised blind controller, which I want to have a "safety cut out" when it gets to its fully closed/fully open state. (So the user doesn't strain the motor keeping their finger on the button when it is open/closed.)

I'm a bit of a noob, but it seemed fairly straightforward in terms of logic.

Basically there will be a reflective IR sensor at the top, and at the bottom (level with the fully closed position of the blind). The logic is that when the user presses the up button, if the top sensor is high (i.e. the blind is in front of it) the motor will run until either they let go of the button or the sensor goes low (because the blind has passed it).

Similarly, if they press the down button, the motor will run in the opposite direction (controlled by an L293D chip) if the bottom sensor is low (i.e. not covered by the blind). Again this continues until the sensor goes low (blind has reached the bottom) or they let go of the button.

I've drawn up a schematic, and I think the logic is right, but I wanted to check if I need to protect the chips with resistors. I'll power it with a 5V 700mA mobile phone charger for the 5V supply, and I'll also need a separate 12V supply for the motor. (Will join the grounds from both).

Is there anything else I am missing, or any noob gotchas I need to be aware of?enter image description here

Also - if I have made any howlers on the schematic layout / broken any major conventions, please feel free to put me straight! (Can't figure out how to attach a clearer version as it looks like it has been scaled down to fit.)

\$\endgroup\$
  • \$\begingroup\$ Please tell us what reflective sensors you intend to use. As it stands, that circuit has a lot of issues to be resolved if those sensors are the 'standard' analogue type. \$\endgroup\$ – gbulmer Aug 14 '14 at 13:06
  • \$\begingroup\$ These are called limit switches or sensors. \$\endgroup\$ – Passerby Aug 14 '14 at 23:13
1
\$\begingroup\$

Are the reflective sensors the only components missing from this schematic?

What are the reflective sensors? Do they provide a digital output, or are they ordinary analogue parts? If they are analogue, and there are no other parts, then there are some issues.

I assume this is for window blinds, in which case, it needs to deal with the possibility of the sensors being blinded or confused by sun-light.

I'd expect to see something controlling the emitter current, to modulate the reflective sensors light source to avoid 'sun' problems. Some sensors might do that internally, but it would help us t see the part number for that sensor.

How is the reflective sensor signal derived? For an analogue sensor, I'd expect to see a resistor, or something so that the sensor can provide a voltage dependent on the intensity of light.

I'd concerned about switching logic gates with an analogue signal. I'd have expected Schmitt triggers to convert the analogue voltage to a logic level.

Edit: I would expect to see pull-up or pull-down resistors connected to the switches.

When switches are open-circuit, they have no defined voltage on one of the pins. That voltage could be set by static, or radio reception. The inputs for many modern CMOS chips requires a very, very small current. So they could be switched by that 'stray' current.

Normally, the connection to the switch which is going to change (when the switch is pressed) has a pull-up resistor connecting it to V+, or pull-down resistor connecting it to ground. That resistor pulls the state of that connection to a known 'default' value, and hence prevents 'stray' electricity accidentally triggering the circuit. When the switch is pressed, the short circuit 'beats' the resistor and defines the voltage on that connection.

Edit: This issue is not about debouncing. The circuit might work okay even if the switches did 'bounce'. The issue is having connections from open switches with no defined voltage value. Every single throw switch must have a pull-up or pull-down resistor, to reliably define the voltage on the open-circuit wire. I might debounce the switch too.

I'd expect to see some decoupling capacitors across all of the ICs. When an IC switches, it will require a 'pulse' of current. That pulse could cause a glitch in other chips using the same power supply. To ensure stability across the whole circuit, that pulse is supplied by a small capacitor connected very close to each chip.

Edit: What is a decoupling capacitor and how do I know if I need one? looks like it covers all the bases.

I'd like to see some capacitance across the power supply input.

I'd be tempted to use one power source (e.g. 12V) for the entire circuit, and use a voltage regulator to step down to 5V. The chips only under a few 10's of mA on the logic 5V supply, so using an appropriate linear regulator should be okay.

\$\endgroup\$
  • \$\begingroup\$ Thanks - really useful feedback! The IR sensors are these: ebay.eu/VmMwjs so it's a digital signal. \$\endgroup\$ – Ben Aug 14 '14 at 14:20
  • \$\begingroup\$ Sunlight should be OK as the blind is for a basement window, with no direct sunlight coming in. \$\endgroup\$ – Ben Aug 14 '14 at 14:21
  • \$\begingroup\$ The pull-up / pull down resistor across the switch makes sense. Will look into this! \$\endgroup\$ – Ben Aug 14 '14 at 14:24
  • \$\begingroup\$ Voltage regulator also makes sense here. Will add that... \$\endgroup\$ – Ben Aug 14 '14 at 14:26
  • \$\begingroup\$ The only thing I'm not sure on is the capacitance. Can you point me in the right direction for more info / best practice on this? Do I just need a capacitor on the 5V pin on each chip, or is it more complex than that? Similarly for the input power supply? \$\endgroup\$ – Ben Aug 14 '14 at 14:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.