Arduino and Servos - Help!

Hey guys,

I am building a stabilization for a motorcycle that looks like this:

I know the servo I need and plan on using, andI know a little bit about arduino boards. However, I need to be able to program the arduino to connect to two buttons which will turn this set of wheels down 90 degrees so they touch the ground and then 90 degrees back up so they are parallel with the bottom of the bike. I could really use some help understanding this stuff. If anyone is willing to help me fill in the gaps I would really appreciate it.

thanks!

Josh

1 Like

Be very careful with an application like this where a bug in the firmware could cause a potentially fatal accident. The Arduino website has some great resources for the standard libraries like buttons and servos.

https://www.arduino.cc/en/Tutorial/Button
https://www.arduino.cc/en/Tutorial/Sweep

I’m at the space frequently and would be happy to help, but I wouldn’t ever ride on a bike with it!

1 Like

Well that’s good to know!!! These wheels that are coming down are merely meant to stabilize when the bike is almost at a stop. I’m not really worried about them causing a fatal injury since they are only going to be used when the bike is moving under 5mph. However, I would like something that is reliable day after day. Might you have any suggestions? Or is there anyone at the space including yourself that might have an electrical engineering background that would be willing to help? Thanks for your reply!

Please take my response with a caveat: I am in no way trying to make light of any physical disability or handicap.

Have you thought about a trike configuration? Might be far less risk of the aforementioned fatal accident.

Lookit, people. The guy asked for help with specific functions. He did not ask you how you would accomplish whatever goal he is working toward. (Which I presume we’re guessing about his end goal) So if you fear liability or have some reason you think helping is a problem, maybe taking a page from the lawyers and engineers is the way to go and keep mum. Or flatly state that you can teach what he is asking but can’t be a part of the project for liability reasons, or whatever is accurate for you … Forgive my rant but i grow weary of inquiries being met with naysaying instead of addressing the request. Most of us prefer to figure out for ourselves if our project is headed for disaster, and even if it is we can enjoy the ride, so let’s actually address the request or just keep mum…

I’d help but i know nothing about arduino.

Will they be on the bike when traveling faster?

I ask because most servos only hold position when powered. With a loose connection or power supply problem gravity will determine the position of the stabilizer. I believe there are servos with a worm-gear
drive that presumably eliminate the problem.

I would just use a simple DC gear motor and limit switches instead of a normal servo. That way you remove any complication of sending a signal to servo’s, you just tell the motor to turn until limit switch is reached, and vise versa (it’s the same idea with a gate opener for a house) It would be cheaper and simpler to interface with IMO.

BTW I’m curious about this as well because I’m a short rider and if there was a way to make me feel more confident on a tall bike it would be great.

While that is the intent, it is possible for a software bug to deploy them at much higher speeds. It is best to have either some kind of physical (non-software based) mechanical restraint to prevent that, or to ensure that if it does happen it will not cause a problem regardless of speed.

1 Like

I’m guessing you don’t ride. This is what happens when something contacts the road like a kick stand. The point here isn’t what happens at 5 MPH it’s what happens at 75 MPH when something malfunctions.

I posted links covering what the original poster asked for. They can do whatever dumb shit they want but I figured the kind thing would be to warn them of the very real danger in what they’re wanting to do.

Edit: Josh, no offense meant. Walter informed me that you use a wheelchair and you’re looking to figure out a way to ride. I still think this is a bad idea. Consider letting professionals do the R&D on something like this because you might not get a second chance if you make a mistake.

https://rideapart.com/articles/the-legup-system

1 Like

There is going to be a safety spring and latch system to keep them from deploying by themselves.

@lukeiamyourfather- Just so we are clear I am glad you are worried about my safety… Not trying to die. But riding a motorcycle is already obvious decision that puts your life in danger. I want something that is reliable and works and thus i figured I’s ask for some help in areas wear I’m not well based.

@Brian - yes they will be on the bike at higher speeds just not deployed like they are in the picture. They will be parallel with the bottom of the bike being held by a spring and latch system.

1 Like

No need to take this personal. My riding or not has nothing to do with this discussion.

Great work!

That’s the spirit!

meh. I found your statement that you would not ride it more enlightening and pertinent than any warnings that the project should not be undertaken. As Josh has stated elsewhere, we all makes our decisions and takes our chances…

I’m totally up for you riding. I’ve got a Suzuki DL650 that I just enjoyed riding about 300 miles yesterday!

Just pointing out that a fancy electronic system might be more headache than you want to deal with, and that a trike configuration, while it suffers a bit in the twisties, is still a lot of fun.

True, but I think we are all free to express our opinions here on talk. Mine were well-intentioned to save him some work dealing with a potentially unworkable or unsafe solution. Had he prefaced his post with “I just want to control some servos. No other advice is requested”, I would have said “Servos are usually controlled with PWM signals generated by digital logic. You can easily do this with Arduino or other setups with the PWM driver.” :slight_smile:

2 Likes

@Josh_Kostreva,

I’m pretty sure we met on Sunday at MicroCenter talking about your project. I still think you may want to find a more mechanical/electrical solution rather than trying to use an Arduino w/ programming.

In an ultracool version, the Arduino could be programmed to deploy or enable lowering the arms at a certain speed measured by an accelerometer.

All in all it is definitely a sketchy experiment as there could be many normal and bad situations that resemble each other (bike leaning vs falling, moving at low speed and needing to turn vs moving slow to come to a stop). The trick will be in identifying the differences.

Have you seen this?

Obviously it’s easier to fit a set of wheel pods to a big cruiser than a crotch rocket, but there might be some crossover into what you appear to be trying to do. I have no idea how they accomplish the speed lockout, but then they’re relying on the rider to deploy instead of a computer algorithm. As with everything, if a human can do it, a computer can too, but the bugs can be a b!tch.

Here’s another take:

anyway, I don’t know if you can figure out what they’re using for processing, but if someone already did some of the work, maybe they’ll talk to you…

@TheControlsFreak I almost asked you if you belonged to makerspace the other day… Small world. I really appreciate your input.

Here is a video for everyone to get a more clear concept of how and why this thing does work

Thanks again for all the input and please keep it coming as I’m open for suggestions.

2 Likes

Not seeing the video…
It might just be me…

1 Like

No idea how to successfully get his link to embed properly etc, but here’s a Google shortened URL that MIGHT work?: http://goo.gl/4XrsTB

2 Likes

Thank you for the hookup Kent.
I gotta say, @Josh_Kostreva that video IS inspiring!
My only thought was “needs bigger wheels/tires for rough ground”, but he seems to be doing just fine. Shows what I know!
I wish you the best of luck with your project. I wish I could actually help.

1 Like

@ke5bud was working on making wheels for a scooter at the space recently, maybe he has some input on this.