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.

I'm afraid you would need a different picaxe chip to generate 2 seperate PWM outputs. Even then the frequencies are too high for good torque at low RPM.

In short, as much as I like the picaxe chips I do not think they are suitable for your project.

Well, finally figured out what I was doing wrong with the programming circuit. For some oddball reason, I kept putting the 22kresistor before the 10k resistor, so I was sinking the signal to ground basicly. Ah well, will find out later once the batteries are charged up if it will program or not.  If you're lucky I'll do a walkthrough on setting up the primary circuit for the PICAxe, I may do it anyways, just so that I have the reference *chuckles*.

 Ah well, back to basics for me...again. I'm gonna post on ignoble's post of ignoble deeds so that everybody can learn from this misadventure.


Mech Out 

Got the picaxe going strong , now just have to figure out what I'm doing wrong with the 595. I've started building a freeduiono type board with terminal blocks.  I think it will be a cool addition to my bot toolbox, getting the motor board in it as well. Once I get the arduino clone done, and the motor board done, I can work on the bot power supply. I'll still be working on building Leo up, even though he can't be fully autonomous, yet. My definition of autonomous is being able to operate(move about), perform tasks and recharge without human contact.



Well, got the homemade development board made for the picaxe 14m, woot! Just have to replace a bad resistor, because the signal and continuity stops at that resistor. Should be able to program the 14m from that board. I went ahead with the dev board idea because I have a few other projects I need the 14M for, such as the robot power supply unit and I hate taking chips out of the socket. Yes, the PicAxes are cheap enough to leave in circuit, but part of the idea of the Motor Control Board is program the chip once and let it do it's job.  



The good news is that I have more pins to play with, the bad news is that the 14M only has two probably PWM channels(I want 4), the blah is that I still can't get the cable to work.

More pins is always a good thing, just have to decide what to do with them now. Less PWMs than I expected is not good, and means I will have to do some creative programming. A bit upset that the cable doesn't work though.

Ah well, back to the proverbial drawing board LOL 

Well at a standstill for now till I can either get the sparkfun usb picaxe programmer working or get an actual picaxe programmer cable. Any advice or information about this would be most welcome. Yes I've RTFM, so that step is already done and did everything it said to do, but if somebody is willing to walk me through it, you are more than welcome to.



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.


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. 


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.