Let's Make Robots!

Motor Controller Board

Well I've almost had 3 weeks offline and got a ton of thinking done.  The physical design is basically the same, going to use a PicAxe 14M to control four DC motors with two L293Ds. The picaxe will be optically isolated from the arduino, so if the motors, an IC or a wire shorts out and decides it doesn't want to go alone that it doesn't have the arduino as an option as a buddy in IC heaven or hell.

Basically, the arduino will send a message to the opto-isolated picaxe, then the picaxe will decode the message getting the data it needs to set the direction and speed of the four motors. This is a very simplified explanation of what will happen.

 So far I have 7805 portion up and running so there is power to the picaxe and to the 595, the program/input selector will be 50% complete when I finish up the picaxe programmer circuit tonight. On the 595, a resistor needs to be moved from the ground pin to Q7, the ground pin needs  to be wired to ground and then will have the comm pins to attach to the picaxe. I hope to get that portion done tonight, then I'd be about 20% done on the hardware portion. Having the programmer circuit done and the picaxe connected to the 595 would be an awesome accomplishment tonight.

So far just the 7805 portion done, so it has power, woot!!

Mech out 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Okay, I've not played around with the Picaxe series before so a bit leary about using it. I should be more concerned with my schematic reading skills though. Got the resistors wired to the wrong pins on the selector. So going to desolder and see what can be salvaged. Then will try again...gotta love da bots!  

So far I've gotten the Programmer portion and the part of the picaxe wired up. Having to work on the 595 a bit, got the resistors soldered in, but it needs power. ground and the 3 comm lines hooked up. It's a slow but sure process. I think I'm going to finish soldering up the PicAxe first so I can do some programming. Once all the connections for the Picaxe and 595 are done, the board is just about complete, except for adding power and connecting to the motors on the L293D's and the installing the opto-isolators.

Btw, I have the replacement chip for my arduino Duem.  This is primarily a place to log my mistakes, victories, ideas and rants, so feel free to comment on it all.

Tonight's goal is quite simple, connect the power wires to the 7805 circuit and connect pins 11, 12 and 14 to digital outputs on the picaxe. Sounds simple right? We shall see. If all goes well, I may connect the 595 to the L293Ds. Right now just taking things slow and making sure I do everything right.


Well got the comm pins wired on the 595 and the PicAxe 14M. Just need to get the L293Ds inputs connected to the 595 and then can get some programming and check my work so far. Hopefully, there isn't much to repair.  

All that is left physically is the optical isolation circuit and the rest of the L293Ds hooked up to the terminals.  I've started working on the programming aspect of it, which is cool.



Ok, the picaxe only has one serial data out pin and it needs to go to the 595. So to get data out of the Picaxe back to the main controller board is going to be a pain to figure out, but I will.


I'd suggest going the other way, leaving the serial data pin for comms with the main controller, and making your own serial output from one of the normal digital output pins. The 595 doesn't need anything complex - just a clock and a stream of bits to tell it what to output.
You can probably find a serial output code sample somewhere, or if not the 595 datasheet gives enough information to write your own subroutine.
I figured I was making it too complex, so put it away for the night and started fresh today. I've been going over the datasheet again and again till it did click. I got some coding done today which looks like it should work. See the update for more.

About to start some real coding. Checked out the connections on the board to make sure everything was going where it needed to do so. I got some coding done today, spent a good deal of it looking over the datasheet and had to facepalm my head when I realized I'd made it for more difficult than needed.  I may even have the SerIn timeout problem licked as well, either by using an extra pin or use an interrupt to listen on  the SerIn pin, I may try both and see which is better or use one and go with it. 

Only things left to wire is to finish up connecting the L293Ds and put in the Opto-Isolators. I'm thinking of dropping the servo routines to save space and room on the board and battery power. The logic behind that decision is that to run servos off the PicAxe doesn't require a lot of hardware, so it'd be a waste of battery power and space to run servos off of this board. o reason to power a big board for that, when a smaller less powerful board will work. I'm still keeping the stepper routines, just have to change out the H-bridge chips, which are cheaper so it's win-win. 

I was thinking about using a 8M to make a dedicated servo controller, I've looked at the different all inclusive boards and talked to a few people here and there, as well as read stuff on here about them and I think that a board that can do one or two things very well is much better than a board that can do everything average or poorly. 

Well, going to grab something to eat and get some coding done. I hope to be able to control the 595 tonight, that way I can finish up wiring up the L293Ds tomorrow and start wrapping things up. 


A last few things to check out, like my wiring since I only have one 595 that I hope I don't burn. I know it's going to be put in backwards so to speak because of which way the pins needs to go. Double checking things because this is also my first time to program a PicAxe as well. My first really complex board, first to program a picaxe and part of my first attempt at multi-processor computing, so lots of firsts and hoping for no smoke days ahead.