Let's Make Robots!

Code help for Robot arm - High current motor

My project is a 5 motor robot arm.  I have a megamoto  plus mega2560. I got the test program running (megamoto test code) ramp up/down and modified enough to show that the high amp 9 vdc drill motor motors I am using can be handled by the megamotoplus.  I am currently zeroing in on the 2nd 8 inch arm and one motor for now.  I need help with  code that will run one loop  when a switch or button is pushed.  (and act as a one shot-(switch on or button pushed for short or long time))  I am using a 50/1 worm gear and 3.3/1 belt pulley ratio so about 2.2 motor  revs per degree. I have run with a direct toggle switch to show it will run.   I want the loop to ramp up and travel 180 degrees  then ramp down , delay stop and repeat back to home.  I want to use a pot on the output shaft or an encoder on the motor. ( I have both, but 1st want to see if the accuracy of a pot will be good enough.)
Eventually I will add the other arms etc
I can pay some so am interested if someone could help me.  I have some knowledge with PLCs, but my background is Mechanical.

Comment viewing options

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

So, it seems we as a group would like to have more information.  If you could tell us more, like exactly what motors, what are you trying to do, post the code you have so far, what you have tried, what did and didn't work, what your plans are.  That sort of thing.  And datasheets.  The more information you can provide up front the better we can help you.  And as I mentioned above, if you provide us that information it also shows you aren't here just looking for someone to do everything for you: that happens a LOT, so we generally try to avoid that by getting you to do some upfront work before we spend much time.

I do hope you stick around and we can help.  We really do try to help everyone.  These things happen from time to time, but it really is a great community.  We are very tight-knit and protective of our own.  I hope you will join us!

I answered his question to the best of my abilities because he had put in the work. Jlhoffa probably has the docs because he knows how to use the sample code. Yes, there are more bits of data i would like were I to accept this contract, but for giving him advice they aren't necessary.

As to why I don't think that rhis was a bad request for help, well, when I was a proffesional working for Penn State, I got worse requests from faculty..

And, to be perfectly frank, I signed up for this site believing that it helped beginners of all stripes. You have given me cause to rethink this assumption. Perhaps I will find someplace else.

BTW: Mocking somebody is always rude. And if this was there first question, maybe they'll never come back.

We do help begginers at all levels but they still need to ask their questions better and provide the basic information necessary to answer their question.

We cannot read minds.

If you want help then you should start by posting a link to the megamotoplus instruction manual. Most people will have never heard of it before.

Make sure you have read the manual from front to back because I guarantee that anyone who can help you will also have to read the manual.

If it turns out that you didn't then Max's little tease will be very kind in comparrison to the abuse you will receive for not reading the manual.

Do we expect beginners to have read and understood every bit of documentation they can get their hands on? Do we expect beginners to know which bits of data are important and which aren't? Yes, it would have been nice to have put in links to the documentation. Perhaps he was thinking that this would be more of a dialog, rather than a public pillorying. I started robotics late in life, around 40+. I had always been extremely shy. Had somebody did to me what Maxhirez did to jlhoffa, I doubt I'd have asked for help with that group (comp.misc.robotics?). It would have been much kinder and more useful to point him to a posting or FAQ that explains what is needed.
This community has existed longer than you've been a member, DangerousThing, and it has its established social order, rules and morés. We can be very rude, yes, but as I pointed out, my mockery is by comparison mollycodling . I myself have been a campaigner for kindness to newbs, which is why I tried to diffuse this help-bomb with humor before someone smacked Him with a RTFM or a LMGTFY.com.

If you don't like this group (of which I think you're starting to get a sense of the social order) you aren't obligated to play in the sandbox with us, though you are more than welcome too if you don't try to come in and boss us around. If you just don't like mockery, attitude, jokes, rudeness or basic human snideness then perhaps you really have no business being connected to the Internet though.
Operator:911, what is the nature of your emergency?
Caller: My thing hurts!
Operator: Your...thing?
Caller: Yeah, I put it in the place and the guy stepped on it.
Operator: Where are you calling from sir?
Caller: I... Don't know.
Operator: Are you in traffic?
Caller: No, I'm in my car.
Operator: Okay, what can you see when you look out the window?
Caller: I see the sky. Please, help me! My thing really hurts!
Operator: Now when you say your "thing..."
Caller: You know, that body part...
and so on... Okay, now that we've had a little laugh: If you really want help, think ahead to what kinds of information people will need to help you. In your case, photos and a wiring diagram would be a good starting point. Without knowing how the hardware is set up the programmer is helpless to help you. Just knowing what he hardware is is useless-the program doesn't care how big of a motor you're using.

Maxhires, why do you feel the need for rudeness?

Please don't be chased away by comments like this, jlhoffa.

As for information, we have plenty. With a simple google search I got the information on the motor driver he's using. He gave use the encoder to degrees translation. If he was using a RasPi or a BBB I might have had a program written for him last night. I'm not familiar enough with the Arduino to do any coding that fast.

The information we don't have, I would have suggested.

Heck, I have to write similar code, so I might as well show it here. I just got my batteries for Groucho and Zeppo today so when I have time, I'm going to write motor code. Unfortunately I promised Lee I'd get a few things done first, so I can't work on robots until Monday or so. However, I see nothing wrong with giving a newbie some hints on how to get started.

Actually Max's response was more polite than your question.

If you want help then you should be considerate enough to post links to the product, instruction manual etc. Don't expect someone else to waste their time doing a Google search if you cannot be bothered to do it yourself.

I have to agree with Max.  LMR is by far the best robotics website there is, and one of the best community websites period.  Part of the reason is because we have a very reasonable set of rules and we enforce them.  We also have some unwritten expectations.  We expect people who ask for help to get help, not everything done for them. That puts the person asking for "help" in a better position to get help.  It also puts the people trying to help in a better position to actually help.  People who ask for help but either can't or won't do "a simple google search" (your words) for themselves, probably aren't willing to do much else, either.  If I ask someone for help, no matter the subject, I try to provide them as much relevant information as I can.  Why should the person helping have to do that?  Or, worse, every person trying to help do it?  You claim as part of the reason you don't help him is time.  We all have time constraints.  If we take time to look up relevant documents for him, that time has to come from somewhere: either our own project time, time with our families, or time we could have spent helping him actually do something.  In addition, a person who doesn't do their homework prior to asking, or even after being asked, historically is likely to not do anything for themselves later.  Experience has proven this time and time again, here on LMR and other places.

LMR is a very helpful community.  But as a general rule, we help, not do it for them.  If you want to do that, by all means go ahead.  You will quickly be overwhelmed with people asking for your "help."  I can't speak for anyone else, but I personally will not bother to try to help someone until they show they are willing to do some of the work themselves.  Teach a man to fish...

And for the record, I found absolutely nothing rude in Max's response.  I think he made his point quite well without being rude.  I, on the other hand, probably would have been very rude.  I'm quite good at it.