Android Bluetooth joystick

kas:
The relay is LOW level input isn't it ??

So far so good :slight_smile:

Although not mandatory, I would personally add
digitalWrite(Relay, LOW);
after
pinMode(Relay, OUTPUT);

I am not sure I know enough to answer this correctly. I don't know how to turn on pins in the uno except by high/low . I checked this with my multimeter and it seems to work? I am all up for a better suggestion , I will make that change you depicted also, thank you.

@Woody Can I not just use my switch to power the uno? 12 volts coming to a switch, then switch to Vin on the uno? This would power my uno and then I connect via bluetooth to turn on my relay with button 3 from digital pin 12? The arduino program has deadman cut that works perfectly (thanks kas) and the sabertooth also has fail safe built in that works great also as i've tested both.

What EXACTLY is your relay turning ON?
A previous post

the motors will be hooked in line with the relay .

..seems to suggest the motor POWER wires.

woodygb:
What EXACTLY is your relay turning ON?
A previous post ..seems to suggest the motor POWER wires.

The relay will allow current to flow to the motors . I have a switch that turns on the uno.

OK...So how much current?

We are going somewhere with these questions....

woodygb:
OK...So how much current?

We are going somewhere with these questions....

I would assume 100 amps as I stalled these out around 120 amps and I know I want be pulling that much current as I don't want to damage my esc .

OK.... you need a solenoid rated @ 100 amps.
You will not find a 5v relay capable of 100 amps...so you'll need to use a 5v relay to work a second solenoid with 2 contacts ( both rated for 100 amps ) one for each motor.

YES?

Hence my statement ..

I think that your going to need 2 relays.
A 5V and a second... worked by the 5v relay ...rated @24v & 60 -100 Amp

woodygb:
OK.... you need a solenoid rated @ 100 amps.
You will not find a 5v relay capable of 100 amps...so you'll need to use a 5v relay to work a second solenoid with 2 contacts ( both rated for 100 amps ) one for each motor.

YES?

Hence my statement ..

Ahhh I see where you're going with this , do you have any recommendations?

I am using a solid state relay now but it's only good for 25 amps.

Edit:

I've done some searching on ebay for cheap relays and I think I can make it work . Here is my diagram let me know if you can think of a cheaper or better alternative ?

ebay link :

http://www.ebay.com/itm/Car-Auto-DC-12V-100A-Relay-4-Pin-RL180-Heavy-Duty-Install-Amp-Style-Split-/291693322253?hash=item43ea46e00d:g:wS4AAOSwll1WzqzQ

YUCK!..... To your Diagram!

Personally I'd ALWAYS go with disconnecting the power at the battery supply to the ESC...( the ESC can then be be disconnected in the case of catastrophic failure ) ...I'd use a UBEC connected straight to the 24v battery to power the Arduino.

Cheap DC/DC 100A SSR's are available.

http://www.ebay.com/itm/100A-Solid-State-Relay-SSR-DC-In-DC-Out-/351040791984?hash=item51bba965b0:g:dO0AAOSwDk5UB2l~

I've heard mixed reviews on SSR , so I don't know if it's the best route ?

Do you use a 5v relay to turn on a 24v 100 amp solenoid? I'm having trouble finding a suitable solenoid.

I have some BEC / ubec here at the house from some uav projects I can use .

http://www.ebay.com/itm/White-Rodgers-WR-124-114111-DC-Power-Solenoid-24V-Isolated-Coil-100Amp-/191837256339?hash=item2caa643a93:g:5XgAAOSwpDdVX3gv&vxp=mtr

Your SSR should be more than capable of operating a solenoid...I just use a RC switch.

woodygb:
http://www.ebay.com/itm/White-Rodgers-WR-124-114111-DC-Power-Solenoid-24V-Isolated-Coil-100Amp-/191837256339?hash=item2caa643a93:g:5XgAAOSwpDdVX3gv&vxp=mtr

Your SSR should be more than capable of operating a solenoid...I just use a RC switch.

Okay, I found this one . It seems to be similar but cheaper . I talked to him and I can get it for 25 shipped . If not I will order what you posted.

http://pages.ebay.com/link/?nav=item.view&id=191068307775&alt=web

Fine ...just replace the two 12v motor relays in my drawing with the one 24v solenoid and use it to connect/disconnect the battery feed to the ESC.

woodygb:
Fine ...just replace the two 12v motor relays in my drawing with the one 24v solenoid and use it to connect/disconnect the battery feed to the ESC.

I found a good deal on a 100 amp SSR , I added a heat sink and it worked great for 20 mins but I think it's toast as it no longer allows current to flow through and it appear to bottle neck the power to the motors as it wasn't as powerful as before . I'm ordering the solonoid and going to trigger it with a 5v relay. Thanks for the help.

kas:
No!! please do the math, a (rather) easy task
Hint: the +-100A sensor sensitivity is 20mV/amp

@ Kas, can you check my formulas?

void checkAmp() {
// int mV = (analogRead(Apin) / 1024.0) * 5000;
// milliAmp = ((mV - VSoffset) / MVperAMP) * 1000;

milliAmp = 73.982 * analogRead(Apin) - 124755.859; // (analogRead(Apin) * 4882.8125)/20 - 2500000/20

using a 40k and 6k resistor for voltage divider :

voltage = analogRead(Vpin) * 0.00976525;
// battery voltage:(5.0/1024.0)*((40+6)/23)=0.00976525 V per ADC count

@ Kas, can you check my formulas?
milliAmp = 73.982 * analogRead(Apin) - 124755.859;

Not quite :wink:
for 512 ADC counts, you get 73.982 * 512 -124755.859 = 86877 milliAmps
should be zero

The formula should give:
0 Amp: (2500mV) 1024/2 = 512 ADC counts
100 Amps: (2500 + (10020) = 4500mV) 1024(4500/5000) = 922 ADC counts
-100 Amps : (2500 - (10020) = 500mV) 1024(500/5000) = 102 ADC counts

kas:
Not quite :wink:
for 512 ADC counts, you get 73.982 * 512 -124755.859 = 86877 milliAmps
should be zero

The formula should give:
0 Amp: (2500mV) 1024/2 = 512 ADC counts
100 Amps: (2500 + (10020) = 4500mV) 1024(4500/5000) = 922 ADC counts
-100 Amps : (2500 - (10020) = 500mV) 1024(500/5000) = 102 ADC counts

Im not sure I fully understand on what the actual equation shall be. At 512 ADC my formula should read
milliAmp = 243.664 * analogRead(Apin) - 124755.859; // (analogRead(Apin) * 4882.8125)/20 - 2500000/2

Then as amps increase (or decreases) it multiplies it by that variable ? Is this correct ?

what about my voltage telemetry formula? Did it appear to be correct? I can't test it until my resistors get here to confirm so I am only speculating.

Im not sure I fully understand on what the actual equation shall be. At 512 ADC my formula should read
milliAmp = 243.664 * analogRead(Apin) - 124755.859; // (analogRead(Apin) * 4882.8125)/20 - 2500000/2

Then as amps increase (or decreases) it multiplies it by that variable ? Is this correct ?

what about my voltage telemetry formula? Did it appear to be correct? I can't test it until my resistors get here to confirm so I am only speculating.

Here are the formulae

Amp:
// int mV = (analogRead(Apin) / 1024.0) * 5000;
// milliAmp = ((mV - VSoffset) / MVperAMP) * 1000;
milliAmp = 244.14062 * analogRead(Apin) - 125000.0; // (analogRead(Apin) * 4882.8125)/20 - 2500000/20

Volts:
using a 40k and 6k resistor for voltage divider :
voltage = analogRead(Vpin) * 0.037434895833; // (5.0/1024.0)*((40+6)/6) = 0.037434895833 V per ADC count

Before connecting sensors to your Analog Inputs pins, check with your DVM
-Amp sensor should supply 2500 mV when no current
-voltage divider should output 3130mV for a 24.0V input

kas:
Here are the formulae

Amp:
// int mV = (analogRead(Apin) / 1024.0) * 5000;
// milliAmp = ((mV - VSoffset) / MVperAMP) * 1000;
milliAmp = 244.14062 * analogRead(Apin) - 125000.0; // (analogRead(Apin) * 4882.8125)/20 - 2500000/20

Volts:
using a 40k and 6k resistor for voltage divider :
voltage = analogRead(Vpin) * 0.037434895833; // (5.0/1024.0)*((40+6)/6) = 0.037434895833 V per ADC count

Before connecting sensors to your Analog Inputs pins, check with your DVM
-Amp sensor should supply 2500 mV when no current
-voltage divider should output 3130mV for a 24.0V input

I'm not sure where I messed up , let me study this more . Thank you for the help and I will test it further with my dmm.

kas:
Before connecting sensors to your Analog Inputs pins, check with your DVM
-Amp sensor should supply 2500 mV when no current
-voltage divider should output 3130mV for a 24.0V input

Kas, for the amp sensor I am getting 1600mv with no current passing through the sensor.

The voltage.... as measured by your DVM .... that is being supplied to the Amp sensor is ?