I have recently attempted to build a new CNC machine, using TinyG and this 12v 2-Channel relay driver off eBay:
http://i.imgur.com/IIxAJz3.jpg
The schematic of this device is located here:
http://i.imgur.com/PHnokkS.jpg
I have wired it up in the following manner:
Vcc = 3.3v
Vjd-cc = 12v
IN1 = Spindle OUT
IN2 = Coolant OUT
GND = GND
(NO jumper between Vcc and Vjd-cc)
When I have hooked it up, the Spindle and Coolant seem to be ON when they should be OFF. They are also OFF when they should be ON.
For example, M7 is supposed to turn the coolant off, however, the relay turns ON.
M3 turns the relay OFF, and M9 turns the relay ON. Exactly the opposite of what I need.
- My understanding of the problem -
When you issue a coolant ON (M7) command or a spindle ON (M3) command, it raises the Coolant out to high 3.3v and the Spindle out to high 3.3v respectively.
Unfortunately, in the schematic of the relay above, it seems the relay works differently than what is expected to happen.
Turning M7 on turns Coolant out to high 3.3v. In the schematic, Vcc = 3.3v and IN1 == 3.3v, so the voltage difference is 0. No current flows. Therefore, it registers a ON command as OFF.
When you issue a M9 command to turn Coolant off, it turns the Coolant out to low 0v. To ground. In the schematic, Vcc = 3.3 and IN1 = 0 at that point. So current flows. That current flow is picked up on by the optocoupler and turns the circuit ON. Exactly the opposite of what is desired.
- My Proposal -
I submit to you the following request:
Add two additional commands to configure this behavior. One, to negate Coolant OUT, and the other to negate Spindle OUT.
In the same syntax as the motor polarity, a command of something like $con=0 and $con=1 for Coolant Output Negation and, say, a command of something like $son=0 and $son=1 for Spindle Output Negation.
That way it would be up to the user to define.. so that a user can use this relay with no additional TTL negation hardware.
Thank you for your consideration.
- Nexea