Let's Make Robots!

LMRbot WS2 Edition - Applying Murphy's Law

Dismay. Chagrin. I'm bummed out, man. Failure to meet three deadlines. Well, two really, because the one got postponed. Regardless, this bot has run out of time again. I was making good progress, totally on my way to having a submission for the Make character bot contest. Most of the hardcore fabrication of the bot itself had gone by with only a few mad hatter moments. All subsystems had passed the proof-of-concept tests. I was making progress at an unprecidented rate. That was up until late, late, late last night.

Finally getting the complete circuit breadboarded (yes, finally!) it failed to cut the mustard. The servo jitter is out of control and I think it has something to do with my almost constant I2C communication between the 20X2 servo driver PICAXE and the 18M2 "main brain." I think I need to do a LOW SERVOPIN command after each SERVOPOS (and change SERVOPOS to SERVO)  to stave off the jitter... but there is zero time left to redesign/recode/retroubleshoot. Plus the angel eye circuit failed to activate for some reason and I can't tell ya why. :sigh: Out of time. Like tears in rain. I knew it would come down to the wire and it was going to be all or nothing. Damn you, nothing.

I think I might try to rework the thing into a 28X2 now after some deep thinking. I haven't done the pin count yet, I just devised the idea and potential program structure in the darkness of my mind this morning. :grimace: Failure sucks. Fortunately working in R&D has taught me good and well that life in general is mostly failure en route to glory. \o/ glory!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I am sure you'll figure it all out sooner than you think.  Divide and Conquer !

I have read that breadboards can add a touch of capacitance to circuits. I am really just shooting in the dark here.

On cabling, I have read that CAT5 cable is a good source of breadboarding wire.

I was indeed dealing with that. It will be considered more now that I have another voice chiming in on the topic. I read it can become an unsolvable bug sometimes. There's so much going on with that circuit I can't be sure if it was the bandit but It certainly didn't help at all. Hopefully things will clean up immensely and we won't see such a spaghetti board again. Let a man dream.

I'm impressed by your project.  How are you powering your servos?  It's a little odd that your I2C routine would screw with timing updates for the servos.  Have you considered a dedicated controller for the servos to offload the overhead from your main controller? 

Servos are powered off a 7806 regulator. That sucker was gettin hot with all that action.

I suspect the I2C routine/servo/timer conflict from some comments on the PICAXE forum and my servo jitter experiences with my IR seeking code from Crumbot. When constantly looping my IRIN sub it does that funky little servo dance too. It's sort of what I was doing with the I2C...

Long story:

20X2 (what I hastily labeled "Servo Driver"): Reads sensors PW measurements and operates servos according to PWs. Slave to 18M2.

18M2 ("Main Brain"): Uses all four tasks. Task 0) Continuous I2C loop with 20X2, transferring PW and other variables for other tasks to use. Pauses while... Task 1) Controls PCF857xxx I2C I/O Expander. Occasionally changes PCF pin values. Will wait for 20X2 I2C communication as well. Task 2) Controls MP3 player. Task 3) Motor control.

May I just say my ADD/impulsive nature read "parallel processing" with "M2" and I was sold. I imagined a Simpleton's half-sized Propellor of sorts. Shame on them and that overstuffed, disconnected literature Rev-Ed puts out. They should have properly named it "semi-sequential processing." The essense of the parallel nature is misleading. It still goes one line of code at a time, bah.

That being said, I'd chucked the idea of two chips and folded it into one 20X2. Now that I'm not under the gun to finish at a certain time I can rethink/retool a few things that will simplify and glorify :)

I was reading about the parallel processing on PICAXE chips. I believe it was in one of the manuals. After reading through their example, they say that it is not meant for complex tasks, only easily offloaded tasks that can stand to be run a little bit at a time. I too was interested when I first saw the mention of parallel processing, but, the truth of the matter came through and showed it to be more of a gimmick rather than something extremely useful.

I should have considered the "M" designation and its tendency to infer the chip is a less-desireable education model versus the same size chip with an "X2" designation. I was really sold on the parallel thing. Really was.

Holy, I dono how you wire that up. How can you not get confused with same color wires?

I count on my superman eyesight to see me through the crimson spaghetti. I don't have many complications with it after dealing with such setups since, oh, day one :)  I have almost sprung for the big-spender $10 jumper pack several times but all those colors... too many lol

Hey, even if you don't 'make the Make', you still have an awesome project.