Go Down

Topic: Android Bluetooth joystick (Read 379055 times) previous topic - next topic

woodygb

#690
Mar 25, 2016, 12:17 pm Last Edit: Mar 25, 2016, 12:25 pm by woodygb
Have you perhaps still got the Sabertooth in mix mode?

The SLOW problem that you previously encountered was simply the result of the change to myservo.
 
Quote
myservoX.attach(pinServo_X, 1000, 2000); 
  myservoY.attach(pinServo_Y, 1000, 2000);
and retaining 
Quote
#define    LIMIT_ANGLE    50                            // Max range
Making it ZERO would have given back the full speed range.

fullspool

Have you perhaps still got the Sabertooth in mix mode?

The SLOW problem that you previously encountered was simply the result of the change to myservo.
   


and retaining   


Making it ZERO would have given back the full speed range.
I was using 1 off, 2/3  on, 4 off, 5 on, 6 off >????

kas

#692
Mar 25, 2016, 02:08 pm Last Edit: Mar 25, 2016, 02:17 pm by kas
I checked your V1.8, it should work as before  ::)

- double check bot for wrong or loose connections
- make sure all grounds are connected
- disconnect battery(ies) for 5 minutes and try again


Quote
I was using 1 off, 2/3  on, 4 off, 5 on, 6 off
What is the purpose of switch 3 ??
If not used, keep it OFF just in case


EDIT
from your message #677:
Quote
Edit :
I do have an update though and finally getting some where . I reset the board,  loaded 1.7 code with limit at 50 , check all connections and now it's kinda working .
What was the problem at that time ??



woodygb

To muddy the waters even more ...
You tried at least once with dip switch 6 ON.
Which should have been ..... according to the instruction pdf ...Autocalibration mode.
I wonder if the Sabertooth did actually Autocalibrate and if it has possibly RETAINED the now erroneous  setting ?

fullspool

Woody and kas first off I want to apologize for the time you guys wasted to help me chase a problem that didn't need to exist .  Somehow I manage to place a lead from  the 5V pin from uno into my breadboard positive bus bar . I suppose the 5V from uno and the 6v battery both being tied into the positive bus bar was causing my hc05 to freak out ?

@Woody,  I set the limit angle to 0 and now I have full range and with the wiring correction it's working great .

@kas do you have a suggestion for amp sensor for these wheel chair motors ?

kas

#695
Mar 26, 2016, 07:55 am Last Edit: Mar 26, 2016, 07:56 am by kas
Quote
Somehow I manage to place a lead from  the 5V pin from uno into my breadboard positive bus bar . I suppose the 5V from uno and the 6v battery both being tied into the positive bus bar was causing my hc05 to freak out ?
:o  :o
Happy guy, you didn't fry your BT card



Quote
@kas do you have a suggestion for amp sensor for these wheel chair motors ?
It's now time for you to describe your electrical setup, a drawing or a photo will help.
Woody is the expert for wheel chairs, most of them appear to be powered by two 12Volts batteries, please confirm

Remember you don't need a specific battery for the Arduino supply, as it can be powered from 12 volts  (NOT 24V  :smiley-evil: ).

Any need for battery Voltage monitoring ??



woodygb

#696
Mar 26, 2016, 10:14 am Last Edit: Mar 26, 2016, 11:25 am by woodygb
Wheelchairs are indeed 24v .

I use these sensors on my Robot Wars bot and use them in conjunction with a Roboteq and some script.
https://www.facebook.com/TeamKaPow/



http://www.ebay.co.uk/itm/111689533182?_trksid=p2060353.m1438.l2649&var=410695568918&ssPageName=STRK%3AMEBIDX%3AIT

Pick the 100 amp bi-directional.

NOTE:- The analog voltage output from the sensor is a nice 0-5v and a standard R/C servo plug fits straight on the pins ... the Arduino headers will solder on directly ...  BUT the POS & NEG pins of the sensors are reversed compared to a Futaba R/C servo plug so you'll need to lift the tags and swap wires to get a colour polarity match.

.

fullspool

:o  :o
Happy guy, you didn't fry your BT card


It's now time for you to describe your electrical setup, a drawing or a photo will help.
Woody is the expert for wheel chairs, most of them appear to be powered by two 12Volts batteries, please confirm

Remember you don't need a specific battery for the Arduino supply, as it can be powered from 12 volts  (NOT 24V  :smiley-evil: ).

Any need for battery Voltage monitoring ??



Yes it is a 24 v system ,  I am power over a 6v battery for simply sake for now as I have everything mounted to a tray so it makes it easier to run back and forth from the garage to the computer . The sabertooth also has a BEC but I haven't used it yet .

The larger bot will need voltage monitoring and amps,  I am building this one as a TUG so it can help me move things around the house easier.

Will a simply voltage divider work like on the smaller BOT ?

@woody , thank you for the link . I will order that now.  Do you have a gear reduction drive on your BOTS?

Thanks guys

kas

Quote
Will a simply voltage divider work like on the smaller BOT ?
Yes, let me have a proposal for the resistors values and the checkBat() formula   ;)


woodygb

#699
Mar 26, 2016, 09:50 pm Last Edit: Mar 26, 2016, 09:54 pm by woodygb
The bot has a single stage gear reduction of 6-1 ...the most that can be obtained in one stage...two stages would be better to give 15 or 20-1 ratio....but I haven't got the space with this design.

I'd not use the built in BEC  .... instead I recommend a UBEC or SBEC.

E.G.

http://www.ebay.co.uk/itm/Turnigy-5A-8-40v-switching-BEC-SBEC-UBEC-Plane-Heli-UK-Seller-Fast-Dispatch-/131194157989?hash=item1e8bc7fba5:g:0AMAAOxyOlhS-7Ri

fullspool

That is awesome , I am trying to source a good 20mm sprocket for the jack shaft . I was thinking about going 6 to 1 when I build my new frame . Have you measured the pulling force of your bot at 6 to 1 ?  How bad did your top speed suffer ?

I used the BEC on the sabertooth and it worked awesome on the radio control gear but on the uno the starboard wheel spins for 1 second then stops and when bluetooth connects it works.  So I need to figure out away to fix that issue or power the uno first then power the motors .

woodygb

#701
Mar 27, 2016, 12:15 pm Last Edit: Mar 27, 2016, 12:22 pm by woodygb
Quote
I am trying to source a good 20mm sprocket for the jack shaft . I was thinking about going 6 to 1 when I build my new frame . Have you measured the pulling force of your bot at 6 to 1 ?  How bad did your top speed suffer ?
I have in the distant past attempted to measure the pulling force ..but the math approach gives good approx results.

Note that getting an exact answer to your needs requires a fair bit of math and much more info on your setup....e.g.  motor specs .

MUCH SIMPLIFIED EXAMPLE.

Pulling power.

MASS in Kg's bearing down on each drive wheel x the Friction Coefficient of the tire.

On asphalt you get a Friction Coefficient of around 0.9 .

So ignoring other factors like rolling resistance etc ....50kg mass bearing down on each wheel  50 x 0.9 x 2 drive wheels.

A possible 90 kg of pulling force before breaking traction...assuming that your drive setup can supply sufficient torque & determining that requires motor and controller specs plus more math.

MASS that you could pull.

If your loading a trolley or trailer to go behind the bot then you could probably pull a fair bit of mass as you only need to contend with a Rolling Resistance Coefficient of around 0.1 ..so you could ...in this very simplified example ...pull 900 kg on the flat.

My advice ...just go with the standard wheelchair base and existing gearbox ratio unless you have hills/slopes to overcome.



fullspool

Thank you Woody, I went out and tested how much mass I could move on a level surface and the wheel chair base moved 1856lbs . I was quite impressed but I am going to design a new frame in inventor , lower the CG, and add a drive reduction to see what I can really get out of it (hope I don't stall the motors.) I ordered the AMP sensor you posted from ebay, it's on the slow boat so im sure I will get it next month. How are you turning on your  BOT ? I am thinking about a Pin /FLAG switch with a relay as I need a safer and better way to turn this thing on.


@kas, do you think the coding you did for the AMP sensor I currently have will be the same for the 100 amp bi-directional ? I was also testing some fail safe measures on the current code and when I disconnect the battery powering the  Uno , 1 wheel will continue to spin and the other one will stop?  However if I turn off Bluetooth on my mobile both wheels will stop like its suppose to , is there a way to fix this? Or just hope I never have a dead battery or failed connector ? :)

woodygb

#703
Mar 28, 2016, 10:03 am Last Edit: Mar 28, 2016, 10:16 am by woodygb
My math calc wasn't far out ...I did base it on my existing knowledge of wheelchairs ... 900kg=  1984.158lbs

Note that you cannot do anything about Friction Coefficient of your tires ...so to get increased pulling power you WILL need to increase the mass of the base as well as changing the gear ratio.


I'd suggest a 20mm taperlock for your gear ratio conversion.
http://www.bearingboys.co.uk/1008-20_Taper_Bush__Dunlop_-2203-p
http://www.bearingboys.co.uk/41-15_Roller_Chain_Sprocket-6144-p

My bot uses a removable link for powering up and the R/C receiver I use outputs NULL or nothing on signal loss from the transmitter.

kas

#704
Mar 28, 2016, 05:36 pm Last Edit: Mar 28, 2016, 05:36 pm by kas
Quote
I was also testing some fail safe measures on the current code and when I disconnect the battery powering the  Uno , 1 wheel will continue to spin and the other one will stop?  However if I turn off Bluetooth on my mobile both wheels will stop like its suppose to , is there a way to fix this? Or just hope I never have a dead battery or failed connector ?
- the hard way: control a relay from an Arduino output
 - the easy way: power the Arduino from one motor battery, as suggested.
   A depleted battery will still have enough juice for the micro controller

In both ways, a failed connection will still lead to unpredicable results  ;)

EDIT: Also seems there is a Failsafe feature within the Sabertooth device



Quote
do you think the coding you did for the AMP sensor I currently have will be the same for the 100 amp bi-directional ?
No!! please do the math, a (rather) easy task
Hint: the +-100A sensor sensitivity is 20mV/amp


Go Up