Go Down

Topic: Tank Robot Sr. Design - PWM questions (Read 4 times) previous topic - next topic

jdeck004

#30
May 23, 2011, 06:18 am Last Edit: May 23, 2011, 08:07 pm by jdeck004 Reason: 1

Yes, that's fine.  The motor power would come from the 12v battery, and logic power from the 9v (at least, from what I can tell from your diagram).  

It should send the motor into full speed in one direction.


Yeah everything looked solid about that setup. Tested the connection first directly from battery to motor: wires, fuses, battery, motor all good.

Gave it a shot through the motor controller.. nothing. Could be my soldering or something really up with the motor controller. Any suggestions?

jdeck004

#31
May 26, 2011, 04:56 am Last Edit: May 26, 2011, 07:23 am by jdeck004 Reason: 1


Yes, that's fine.  The motor power would come from the 12v battery, and logic power from the 9v (at least, from what I can tell from your diagram).  

It should send the motor into full speed in one direction.


Yeah everything looked solid about that setup. Tested the connection first directly from battery to motor: wires, fuses, battery, motor all good.

Gave it a shot through the motor controller.. nothing. Could be my soldering or something really up with the motor controller. Any suggestions?


As an update, I did get the motor controller circuit to respond correctly, connecting 12V battery across +/- terminals and battery across A/B, 12V to VIN and GND to the logic ground, I can use test buttons A and B to light the LED's corresponding to CW and CCW testing enabled. Also supplying 5V to both PWM and DIR will light up B. All these results were expected.

However, the motor won't budge. I tried testing the current across the motor and battery leads at the motor controller, and blew several fuses in the the process. Am I testing that wrongly? Do I need a clamp tester instead?

*Update again: test current in series, test voltage in parallel. Solved the problem of blowing the fuses. Still can't pull a reading, going to get my hands on a clamp meter tomorrow.

jdeck004

#32
Jun 01, 2011, 04:47 am Last Edit: Jun 01, 2011, 05:37 am by jdeck004 Reason: 1
Latest update:

Identified soldering as issue. All 3 motor controllers responding properly. System nearly functional except for some programming trouble.

Basically, I am finding that my Arduino can't do math? Can someone please weigh in on this?

I am attempting to perform the following computation:

RYout = ((255/(255-RYstart))*RYin)-((255*255)/(255-RYstart))+255;  

Take RYstart to be 105.

The following table shows the expected and actual behavior:
(1 is RYin, 2 is RYout from Arduino, 3 is RYout expected)
  1  |   2  |   3  

165   423   102
176   434   120.7
182   440   130.9
185   443   136
191   449   146.2
194   452   151.3
206   464   171.7
208   466   175.1
213   471   183.6
218   476   192.1
224   482   202.3
237   495   224.4
253   511   251.6
255   513   255

What is going on?

Thanks,
John

Aeturnalus

What's RYstart supposed to be?  And, to take a guess, the issue is probably integer math.

jdeck004


What's RYstart supposed to be?  And, to take a guess, the issue is probably integer math.


RYstart = 105. Maybe I'll make that bold. A quick run of "integer math" on the arduino page doesn't bring up any solid reference. Can you explain a bit please?

Go Up