Thank you
Wouldn't those connections cause damage???
Like to your power supply, regulator and or tip120???
Or is vin not powered when connected to gnd?
Why not a npn transistor for your left diagram?
Relay may be better here because you prevent shoot through (connecting all three together for a very short moment of time).
If the circuit gets worked out, this could be spectacular (in the bad way):
digitalWrite(4,HIGH);
digitalWrite(5,HIGH);
@DaveX I need to be careful here.
@build_1971 going with the relay.
The nice thing about a single relay is that they can prevent connecting both terminals to ground. If you have two separate switches/relays/SSRs, you need worry about something in the software going wrong. Such as what happens when the device boots up, or what happens if you remove power/partially remove power from the device/drive the device from a laptop, etc.
The schematic needs more details about the load and the biasing before you hook anything valuable up to it.
@DaveX Sure I understand that I need to be careful. Unfortunately, I need to use two relays since Vin needs to be NO.
If you use two relays, you still have the possibility of software programming a hardware short.
Why not use one relay and connect VIN to COM, NC to GND, and NO to 12V?
How many amps are you switching?
Then I can have either State 1 or 2. I want to have State 0 as well where Vin is not connected to anyone of them.
Amp draw is less than 2A.
Put the second relay in series then...
With two relays configured like this, you can protect against software shorting GND to VCC and still get a state 0 with VIN unconnected:
@DaveX @build_1971 that's a good idea! Really appreciate.
With 12V and 2A, you could Thevininize the unseen load into a 6 Ohm 25W resistor for schematic or testing purposes.
That's possible. I will try to find out the resistor in a local store.
You could also look up "H Bridge" for this such as is used in a motor driver chip. You need only one half of it. Older ones such as the L293 have a voltage drop penalty.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
