Going Both Ways

Hi all!

I am having trouble wrapping my head around an issue with a 5 and 12 volt concurrent system. I have a breadboard with 5v and ground on one side and 12v and ground to the other. I have the Uno controlling the 8 relay module with the 12 volt powering 4 separate motors on 4 of the relays. No problems there. However, I am trying to make this as easy as possible for people to use. I am looking for a way to sense (5v analog pin?) if the compressor plugs are actually connected to the relay that will power the motors. I don't know if I have to attach another set of wires to the voltage plug and then back to the analog pin to see if there is voltage. If I do it with a 5v regulator to step down the voltage to the analog pin it fries the wires back to the relay.

Any ideas are greatly appreciated,

Thanks!

You are way head of us, slow down a bit.

Draw a schematic and show us your setup.

.

Sorry for the ramblings. I have attached an actual pic of the setup. I used a relay as a place holder for the connection to the motor. Is it possible to actually test if there is a “motor” connected prior to blinking relay #1 on the module?

Thanks again!

setup2.jpg

setup2.jpg

Why wouldn't the motor always be connected? If I am understanding you, an opto isolator might work.

.

You can't power the Arduino from 12volt AND power the relay module from Arduino's 5volt pin. That might work with only ONE relay activated. Any more than that, and Arduino's 5volt regulator will eventually overheat and shutdown (or release the magic smoke). Leo..

I am actually developing a DC air compressor testing unit. The idea is to have the ability to test 4 compressor motors one by one. The compressor has only 2 wires, one for power and one for ground. I am trying to have it automatically know when each compressor is plugged into the testing unit. After one or all compressors are connected to female plugs attached to each relay, I would like the UNO to then call the testing functions for the compressors connected. This way if one of our technicians are using it, they can test one or all of them without any setup other than plugging the test amount and starting the testing unit.

The compressors pull 32amps when running. I am having issue with figuring out how to have the UNO "sense" the connection using the analog inputs. If the relay has 12v running through it when switched on. I would be afraid that the 12v power would travel through the "sensing" lines back to the UNO and releasing the smoke.

Also, doesn't the relay module have opto's on it already? Can I join two lines each to the power and ground to the compressor plug, one set of lines to the relay that switches the 12v to the plug and the other two lines to another relay powered by 5v and then back to A0? Before the switched 12v relay is activated, the other relay is switched causing 5v to the compressor and seen by the analog pin to confirm that a compressor is connected. Then the code will know there is continuity at the plug?

I really appreciate your thoughts!

So the compressors are 12volt/32Amp when running. What is the startup current, and where are you getting that (100-200Amp?) from.

The relays can only handle 10 Chinese Amps...

Seems your first problem is having to look for bigger relays, and big kickback diodes across the load. Or four beefy mosfets with mosfet drivers and kickback diodes.

Sensing if a compressor is connected is the easy part. Leave that for last. Leo..

My first plan is to use either the relay module to switch an automotive relay connected to a dedicated power supply that can push up to 40 amps with no issue. Since each compressor will be tested separately, I did not think it would push any harder than the current per one compressor being tested at a single time. After the first compressor test, the second set of relays would connect and power compressor #2. At the same time a central valve block with pressure sensor will be used to log the pressure and pressure hold to verify the compressor being tested passes test and hold pressure for 5 seconds before the last relay operates a pressure release valve on the compressor. There would be 4 relays per each compressor. One with 5v to "sense" a compressor plug is connected. The if true begin the relay to open valve with pressure sensor and start the compressor. After pressure and hold test for leaks, the last relay opens the release of pressure. The A1 would see the pressure back at 0 and all trials would be tested. Last part is a serial thermal printer would print the results to show proof of quality assurance.

Fingers crossed

rosskap:
My first plan is to use either the relay module to switch an automotive relay connected to a dedicated power supply that can push up to 40 amps with no issue. Since each compressor will be tested separately, I did not think it would push any harder than the current per one compressor being tested at a single time. After the first compressor test, the second set of relays would connect and power compressor #2. At the same time a central valve block with pressure sensor will be used to log the pressure and pressure hold to verify the compressor being tested passes test and hold pressure for 5 seconds before the last relay operates a pressure release valve on the compressor. There would be 4 relays per each compressor. One with 5v to “sense” a compressor plug is connected. The if true begin the relay to open valve with pressure sensor and start the compressor. After pressure and hold test for leaks, the last relay opens the release of pressure. The A1 would see the pressure back at 0 and all trials would be tested. Last part is a serial thermal printer would print the results to show proof of quality assurance.

I am using the compressor relay that the actual car uses to operate the compressor to switch on via the suspension control module in the car.

Fingers crossed

rosskap: My first plan is to use either the relay module to switch an automotive relay connected to a dedicated power supply that can push up to 40 amps with no issue. Since each compressor will be tested separately, I did not think it would push any harder than the current per one compressor being tested at a single time. After the first compressor test, the second set of relays would connect and power compressor #2. At the same time a central valve block with pressure sensor will be used to log the pressure and pressure hold to verify the compressor being tested passes test and hold pressure for 5 seconds before the last relay operates a pressure release valve on the compressor. There would be 4 relays per each compressor. One with 5v to "sense" a compressor plug is connected. The if true begin the relay to open valve with pressure sensor and start the compressor. After pressure and hold test for leaks, the last relay opens the release of pressure. The A1 would see the pressure back at 0 and all trials would be tested. Last part is a serial thermal printer would print the results to show proof of quality assurance.

I am using the compressor relay that the actual car uses to operate the compressor to switch on via the suspension control module in the car.

Fingers crossed

There's solid-state devices which can do what you want. I use the BTS716G a lot and I'm sure it's got bigger brothers with the current capacity you need. Or search Google for "high side switch with open load detection".

If you must keep relays, feed 5V to each relay output with two large resistors in series on each one. Like 10K or 1M. Then connect the mid point of those resistors to an Arduino input. When nothing's connected it will be at 5V and will read high. When you plug in the compressor, it will drag the voltage down. You may need to experiment with the resistors available to you to find a combination that works. (This can also be calculated using the Atmel datasheet which shows you the digital high and low levels.)

I will do that. Thank you. Why do i need a divider? If i plug ot directly into a0 wont it just see 0v when not connected and 5v when it is. Then just monitor a0 to see if it reads >1 to know it is connected?

Because you don't want to feed 12V into the Arduino pin when the device is on.