It’s always a good idea to protect your expensive electronics with regulators. But I never worked with these voltage regulators. All I can do is read the docs I would find on internet. I’d rather let a more experienced LMR member answer this question.
Is that correct? I am making a lot of assumptions here. Please check all of them:
V2 has power? V2 has 5 Volt? or 9 Volt? Can you confirm this with a meter? Your micro controller is connected to its own power V1? That is 5 Volt? Did you measure it? Your motor works when you connect it directly to your power source? Which way is it turning? write down how you connected it!
Alright, you checked it all, now let's examine that circuit you built. Your micro controller is behaving like a very expensive, but very little switch. Sometimes your output pin is connected to Vcc (V1= 5 Volt). This is called high in your program. Sometimes it is connected to ground. That is low.
Can you see how the current flows through your switch and motor when you tell it to go high or low? Remember, electricity always goes from the higher to the lower voltage. Just like the water flows from your Swiss mountains to my Dutch basement.
For your first question: It is never a good idea to hook up your motors directly to output pins. But since I think I’m seeing a tiny corner of a picaxe 28 starter board in your picture, i asume you hooked it up with the darlington chip in place. In that case it sounds like the motors are connected right. Show us pictures of the setup otherwise we have to guess how things are connected.
In answer to your second question: The way to tell if you connect the voltage regulator correct, is to test it. You should get a multimeter and measure the voltage between the middle leg and the right leg (in the picture). Be sure to disconnect it from the picaxe first before you hook up the 9V.
pin 1 input pin 2 gnd pin 3 output for up to 1.5 Amps
When interfacing electronics to motors I “should” always use optocouplers, but I dont… I don’t ever allow digital inputs or output sink or source motor current.
From small to large motors you can wire it this way. - it accepts TTL voltages (TTL is transistor to transistor logic) , which in a nutshell means 0 to .8 V is off and 2.2 to 5 Volts is on.
its not the volts that’s the issue, it’s the amperage. The digital outs on an MCU are only going to supply maybe 100ma I think(don’t know exact figure), you need to use a transistor, relay, or h-bridge as a switch, then the MCU just flips the switch, rather than actually supplying power directly to the motor. regular hobby motors like you have pictured will need as much as 1A perhaps at stall. plus, the feedback from the motors could possibly fry your MCU…
also, your motors need gearboxes, it doesn’t look like they have any…
good luck!
BTW: since you mention you are using a PICAXE 28x1, the picaxe first robot tutorial above will show you how to use a L293 chip with that board specifically, the chip itself should be cheap, sparkfun has them for <$3
First of all you need a L293D Motor Driver --There is a space for it on the 28 board and you will also notice 2 connections A and B that will go to your motors. Second, it seems that you glued the motor shafts directly to your wheels. This is a no-go as well. Mind you, the motor driver will run these motors quite well, but they will never make any kind of chassis go -You need some gearing. It seems a lot of your questions could be answered by going through the “Start Here” post including some great little motor/ gearbox motors and wheels you could use to get yourself started.
If nothing else, I would say to knock it off with the motor straight to the Picaxe business --This could easily release the magic blue smoke (not a good thing).
My advice, grab a beer (I recommend Pabst Blue Ribbon) and just take an hour or so to cruise the forums. --There is a ton of posts from people who have had the same problems you are having.
One more… When you go to code your stuff using the picaxe programming editor, take a sec to check under the "help" menu. All the picaxe manuals are there in PDF form as well as the manuals that go with all the picaxe boards. These are a goldmine of info and I find myself using them everytime I write code.
The motors aren’t geared so The motors aren’t geared so they will spin fast, but when you put it on the ground they likely won’t move or will take a while to get up to any sort of speed. This is because torque is low very low. Check out the post Fritz did on gearing. It will give you a lot more info that you ever wanted!
easy to test the need for gears Just build a little vehicle with these motors and these wheels and the same battery. See if it will run. See if it will run if you put some more weight on it. Could be just a plank with 2 wheels.
I didn’t notice the profile… Wow, '96 --That’s after I graduated! Man, I’m old.
Allright Nick, everything ELSE (except the beer) still stands. I really can’t stress it enough, the picaxe manuals are gold. The BASIC one has great snippits of code to study and the ones for the picaxe boards are great when you need to double check a pin arrangement or whatever.
And for the record, I was about 12 when I first played around with BASIC. Of course then it was on a TRS-80. --Do a google search for that if you want a laugh at us old folks.
I was 8 when I wrote my first program on an Apple IIe. Then it was on to basic using an IBM clone running Win 3.1. Man those were the days. PCs were stupid and that’s the way we liked it!
Anyway to keep this mildly on topic. Don’t try to start big. If you scan the forums people who tried to start big got frustrated and never made a robot. Those that started making an LED light up using a PICAXE then made it blink, then added a motor, then… went on to make some nice bots. ALWAYS start small. You have a lot to learn and trying to skip past the beginner stuff will only make it take 10 times longer to make something it will also frustrate you to no end.
There are a few tutorials about how to make a LED blink or even light up using a breadboard on this website. I highly recommend you look through the tutorials and start small.
For reference I made a motor control component node. It might be too much information for you at this point, but use it as a reference. In turn, I need your help to point out parts you do not understand, need more explanation, or areas where I have made general assumptions which beginners might not get. I would like it to be useful from absolute beginners to EE majors, so any input, questions, or suggestions you might have would be greatly appreciated.
Yes, No, and Maybe. It depends on the RPM of the motors, the required speed of the bot, and the required torque of the bot. If you have a heavy robot you need more torque than speed. If your bot is light and you want it to mvoe fast, you want a motor with faster RPM and a gear ratio that keeps the RPM high. If you look at a car the lower gears may have a 200-1 ratio. In other words while you are moving slower the engine turns at 2000 RPM but the tires rotate only 10 times per minute. At a higher gear the gear may be a 1-1 ratio (every time the motor turns the tires turn at the same rate so at 2000RPM the tires are turning at 2000RPM).
Why would you do this? Well when the car is stopped a 1-1 ratio would put a LOT of force on the engine to try to turn the tired from a stopped state. With little torque the engine wouldn’t be able to budge the car and your transmission goes BOOM! When travelling at high speeds you need a smaller gear ratio or you engine would over heat from turning too fast. When moving quickly you don’t need the torue (unless you are going up a steep hill).
Long story short this gear box may or may not work. It depends on the RPM of the motors and the ratio of the gears that are attached.