02 June 2010

robot update

Despite not having posted in about a month, there is some progress with the rolling robot:
  • the opto-isolators on the L298 solder-board all have all necessary pull-up resistors
  • the gearmotors and the caster wheel are mounted to the deck giving a close-enough approximation to level
  • i've co-opted my 7A-Hr SLB from r/c aircraft starting duties and strapped that to the chassis
  • the L298 board is mechanically affixed onto the chassis

    Now what remains to do is get the arduino physically mounted and do some wiring. I don't want to mount the arduino too permanently, as this is only a temporary controller just to prove out the motor driver board. To my way of thinking, the arduino is to control logic, as the breadboard is to circuit verification; a flexible, re-usable, temporary measure. Anyway, since it doesn't weight anything and there shouldn't be any strenuous accelerations, it's probably going to find itself tethered in place by the wiring.

    Also the 'duino needs a power supply. Originally, the entire point of creating the opto-isolated L298 board was to have the logic and the motors run off separate batteries. I'm thinking, since I have a pile of 'C' cells, and some battery holders for same, I might just rig a 6-cell, 9V source for the arduino, just so I can say the opto-isolated dual battery thing works. Then I fully intend to dispense with the logic battery and try running the 'duino from the same 12V battery as the motors. Ok, I'll put a serious filter in there, but if the AVR can run from the same battery, then in future, I can eliminate the bulky opto-isolator-and-extra battery setup.

    Now there's a little bit of design to deal with, even in this throw-away prototype configuration. The L298 has three control lines per H-bridge; each half of the H-bridge has a high/low drive and there's an over-all enable. I intend to apply the PWM to the overall enable, and drive the other controls Low/High or High/Low to make the H-bridge function like a big old DPDT switch. Then there need to be some pin assignments.

    Then there's a pinch of software necessary. For this round of tests, I intend to read control input from those paddle potentiometers. The AVR chip on the arduino reads these with 10 bits of precision, for a range of values of 0 to 1023. So the quick-n-dirty 'design' I have in mind is to cut this range in half (bit shift right 1), and treat it like a 9-bit 2's complement number. Input from 0 to +255 will translate to PWM values 0 to 255, with the other controls at Low/High. Input from 0 to -255 will also translate to PWM values 0 to 255, but with the other controls at High/Low. So I should get 255 speeds in both directions.

  • 0 Comments:

    Post a Comment

    << Home