Friday, December 22, 2017

XMSnakeRobot - Good news for current draw. I2C partly working

First results from the ammeter on current draw for this design.
0.5 to 1.0 A depending on servo activity which is however low at this early testing stage.
This is good news as it is less than expected.
One concern was that segments as they move would place nearby segments under load and put servos into a "stall" state where they draw 0.6 A. This is not happening like that. What I am observing is servos under load but responding with rapid "buzzing" correction attempts which average out to a much lower current draw.

In the previous post I wrote:

Searching .. From Arduio forum thread "I2C with internal pullups"
"Koepel" says: "If  an Arduino is Slave, and it has the power turned off, that will keep the SDA and SCL low via the diodes."

"Koepel" is right. Connecting the "slaves" for a complete test setup gets my servos responding to signals sent via I2C. Unfortunately the responses are not 100 percent reliable. One of my 2 "slave" sub-systems is ok on 7 servos out of 8 so I will inspect that servo. The other "slave" sub-system gives a correct response to less than half of the signals I send. These "slave" sub-systems are built to be almost identical and they run on the same I2C common wires so this is a mystery. I plan to continue with I2C by working for half a day focussing on testing servos - then if not reliable it will be plan B which is to replace I2C with Serial and SoftwareSerial.

Signals explained by example:
"A2+030" - Arduino Nano A, Servo 2, set to 30 degrees from centre position.
"B0-020" - Arduino Nano B, Servo 0, set to minus 20 degrees from centre position.
"C5+000" - Arduino Nano C, Servo 5, set to centre position.

I type these signals into an Android Cellphone running a Bluetooth Terminal app. The snake robot receives these on an HC-05 module which feeds them via Serial to "nano" microcontroller "A". If the signal starts with 'B' or 'C' that microcontroller uses I2C to pass them on to the other "slave" microcontrollers. Photos and more details in the previous post:

I have done a little speed up of testing by soldering together an adapter cable set to run the snake robot off an external battery or power supply. The internal batteries are model aircraft LiPo types which need careful charging and setup for each working session. It is faster to get into a testing session by simply "plugging it in to the extension leads" (12 V).

No comments:

Post a Comment