Tilt sensor/switch for an RC rideable vehicle

The Project:  I am building a 1/4 scale radio controlled Ford F150 pickup.  The body style was chosen for me when I was given a free 1/4 scale fiberglass body.  The drive-power was originally going to be a small 2-stroke engine, but I was also given a free Pride Mobility Scooter/wheelchair that came without a controller or batteries.  Speed and direction control will be in the form of a SyRen 1X50 from Dimension Engineering, which in turn will be controlled from a common RC transmitter and receiver.

Here is my question:  I want to be able to do a little all-terain driving with this truck.  It won't have good enough suspension for rock crawling and such, but even so, I would like to add some sort of tilt-sense.  The truck will be large enough and powerful enough to be ridden on or to pull a trailer that is being ridden on.

 

<!--break-->--

A note before we continue..

Yes, I joined this forum to ask this question.

Yes, I will very likely stick around this forum after this question is answered.

Yes, I am a beginner to 99% of this.

Yes, I am aware that my project, being radio controlled, isn't exactly a "robot" as these pages tend to define robots, however the equipment and techniques used are similar, so I am asking for help here.

Yes, I did do some searching, but, all that I found seemed irrelevant.

 --

I'm not entirely sure what I want the tilt sensor to CAUSE, either slowing down the truck or stopping it or reversing it or shutting it down completely, but I want something very simple.  I am more-than-willing to make my own sensors of the ball-in-tube style, but am worried about the ball bouncing around and causing false readings.

I understand that a potentiometer can easily be added to the SyRen to set the max speed.  Could a tilt sensor add a pre-determined voltage or resistance in place of the pot idea to simply put the truck in "half speed" if it tips too far?  If so, could a different voltage or resistance be assigned to each sensor so that more tip = slower speed or right/left tip - 1/3 speed and front/rear tip = 1/2 speed?  All this should be doable without logic, just using the sensors to switch more voltage or resistance into the max-speed input on the SyRen..

 

I'd like to know what you all think, good or bad, about all this..

 

Mike, from DieCastoms.

Welcome to LMR!

Man, a 1/4 scale! This thing is going to be huge! You got any pictures of this beast? 

I don’t think a ball and cage sensor will work for this application (due to the reason you listed). Your going to want an accelerometer. Sparkfun.com sells some, and they have a pretty good buying guide to boot (http://www.sparkfun.com/tutorials/167). 

About doing what you’re talking about without logic. I’m guessing you’re meaning you want to do it without a microcontroller (technically if an output is changing due to an input, thats called logic). What you’re wanting to do would be possible to do with discrete components, but unless you’re and electrical engineer (or just really good with circuits) using a microcontroller would be tons easier. 

Is this going to be for a little kid? You mention a person will be able to ride on it, but a 1/4 scale is pretty big and if you want any kind of speed you’re going to need to keep your gear ratio pretty close to 1:1 and I don’t know how powerful those wheel chair motors are…but then again I’ve seen some whales riding on them at the walmart, so it might not be a concern. 

 

<edit>

I forgot to tell you what I thought about it. If this is just an RC vehicle, and little kids aren’t going to be riding it, I wouldn’t bother with a speed governor. The faster the better! If you ain’t first, your last!

I agree with airuno.

a 2 axis accellerometer and a microcontroller would be your best/easiest bet. With the micro you can then make adjustments to how fast/slow the vehicle will move for a given tilt.

Questions answered, and pictures added

@airuno2l

Yeah, it’s rather large, it is 48 inches from bumper to bumper and if I remember correctly will stand roughly 20 inches from pavement to roof.  I’ll put pictures at the end of the comment.

Apparently I can make a filter of sorts out of a resistor and a capacitor wired in parallel to each other, and wired in series to the tilt sensor which will eat up short pulses from the sensor and only let sustained contact pass through…  I should have thought of that as I use the same thing in other applications, namely Digital Command Control (DCC) for model railroading.

About using a micro controller in the project, that adds a whole level of complication that I was trying to avoid.  With the RC straight to the SyRen, there is really nothing to program, just a couple DIP switches to flip.  With a micro controller added, I am going to have to get someone to write code for me as I am horribly terrible at doing so myself…  How would the RC interface with the micro controller?  It may be the easiest way for some but I am not sure if it is worth the effort for me.

The way this truck is eventually going to be built, the seat from the original wheelchair/mobility scooter will still be able to be lid into it’s place through the center of the truck bed.  Alternately, when the seat is not in place, a fifth-wheel trailer hitch will go in it’s place to A.) look accurate in scale detail, B.) hide the otherwise obvious wheelchair seat post, and C.) allow me to tow a fifth-wheel trailer behind the truck.  Either a single child or adult could sit in the seat on the truck with their feet on the ‘running boards’, or the trailer could be put on and maybe 2 or 3 children could sit on it.  Before I took the original scooter apart, I did play around on it with mostly-dead batteries and was able to go practically anywhere in my 2-acre yard with it, bumpy grass, some soft spots, inclines I would have expected to go over backwards on (if the old batteries were charged to their absolute max, the chair would pull my nearly-200-pound carcass up the ramp in our “bulkhead”, which rises 6 feet in about 12 feet of travel…  If I am thinking right, that’s a 22 degree incline!) so it shouldn’t have an trouble pulling one or two hundred punds behind it on flat ground.  In pavement, I see no reason why it couldn’t pull much more, if careful about wheel slip and current etc…

As for the speed governing, here’s where I am coming from…  I doubt I will be letting many kids ride AND control it at the same time, but I have s nephews all under the age 13, and they are going to think this thing is rather epic and want to at least be able to drive it.  These same three children are the ones who killed the batteries in the wheelchair at least 4 times “testing” it for me :stuck_out_tongue:  Mind you, they had NO speed control and just hardwired the two tired old batteries directly to the motor.  When they needed to stop they’d just turn sharp and tip up on two wheels and put their foot out to balance, with the third wheel just spinning in the air.  These kids are crazy, yes :stuck_out_tongue:  My concern is, I REALLY don’t want anyone rolling the thing over on it’s side.  I hope to have a NICE paint job on it eventually … Hot rod quality metal flake and clear-coat, etc.

 

@birdmun, sorry to take so long getting to you.  You bring up a very valid point that I hadn’t actually considered, being easily able to adjust top speeds at the microcontroller…  How easy would it be to do so ‘on the fly’ without hooking up to a PC or programing board or something?  What’s the likelyhood I could use something like the Atmel Butterfly that has the digital LCD screen and actually be able to move through a menu system and adjust things?  I can’t imagine who I might get to write me a program for that, though … though I do have a Butterfly laying around somewhere . . .  but no way to program it anyway so … square 1 again.

 

Anyways, hey really, thanks for responding to my thread!  I really need to get some conversation going about this thing to help motivate me to get it done!  I have tractor shows I want to bring it to this spring/summer!

 

Mike, at DieCastoms

 

Ten Year Old Cameron, and the truck body:

http://i3.photobucket.com/albums/y89/Valkyn/QuarterBigfoot/IMG_20110918_115101-1.jpg

Side View of Truck Body sitting on a mover’s dolly / hand truck

Note that this is just ‘for looks’ and will not be built this way.  The front wheel and tire is simply leaning against the dolly.

http://i3.photobucket.com/albums/y89/Valkyn/QuarterBigfoot/IMG_20110918_145317.jpg

3/4 view on the mover’s dolly

http://i3.photobucket.com/albums/y89/Valkyn/QuarterBigfoot/IMG_20110918_145340.jpg

 

This thing is going to be

This thing is going to be awesome. 

But, when you say “With the RC straight to the SyRen” I’m not sure what you’re talking about. RC can mean remote control and also  resistor–capacitor. 

How do you plan on governing the speed based on the analog output of the tilt sensor? At some point you have to compare two values: one value is coming from the handheld transmitter/controller, the other value is based on the output of the tilt sensor. You need some kind of logic in order to determine what you want your motors to do. If you tell the handheld to go full speed, but the tilt sensor says this isn’t a good idea, how can you do this without code? (I’m playing devil’s advocate here, I know it is possible to do without a microcontroller, but it’s complex enough to make me want to slap a sleeping baby - that is, unless you know something I don’t, which is very possible on account of I’m on my second King Cobra 40 oz this evening). 

To logic or not to logic…

Thanks again for commenting, airuno21.

By “RC” in this case I am referring to radio control.  I will try to be more careful about that in the future.

I suppose the way to answer your question about whether or not I would need to have a micro controller to handle the input is to simply say that there is one built into the motor controller…

The SyRen motor controller that I purchased has two inputs.  When set up correctly, the input referred to as “S1” uses zero to five volts analog to determine both motor direction and speed.  0 volts is full reverse, 2.5 volts is full stop, 5 volts is full forward.  Max Speed Mode allows you to connect another potentiometer to S2 and set the max speed.  If you set this potentiometer to 50%, the potentiometer on S1 will scale between 0% and 50% over the entire length of its travel.  What i was figuring was, if I supplied 2.5 volts to the tilt switch so that when the switch closed it supplied that 2.5 volts directly to the S2 input on the controller, it would put the controller in 50% max speed mode.  

 

Mike

 

Ah, I see. In that case this

Ah, I see. In that case this seems pretty straight forward. There might be a need for some kind of scaling of the tilt sensor’s output though. Nothing a voltage divider can’t solve http://en.wikipedia.org/wiki/Voltage_divider

Re: speed control

I was thinking something much simpler than LCD and whatnot. I do believe the newer PICAXE chips have i2c capability and some of the 2 axis accelerometers also have i2c for output. I would just hook one or two potentiometers up to one or two analog inputs on the PICAXE and hook the accelerometer up to your i2c and then use a pwm output through a filter to give your speed control, well, speed control.

The idea would be to read from your accelerometer and then control your output speed with either A) a single POT for pitch and roll or B) a pair of POTs, one for pitch and the other for roll.

If you are more comfortable with arduino coding then go that route with a nano or something similar. An arduino would be easier in that there are libraries available to read the accelerometer vs having to completely code for it on the PICAXE.

take a look

take a look at

http://www.ez-robot.com/

or

http://www.wirc.dension.com/

not sure if any of you care

not sure if any of you care to know or not, but…  here’s an update on my project…

I ordered the motor controller on March 29th.  It was nice of the company I ordered it from to never tell me that they were out of stock and that it wouldn’t be shipped out for at least two weeks after I ordered it…  I had to email and wait a week for a response…

 

When the controller ever gets here, I will post another update.

Mike.

At least

now you know you are dealing with a quality company. :stuck_out_tongue:

but on the other hand, the

but on the other hand, the one fact that keeps me from being pissed off is simply knowing that I am getting a BRAND NEW controller RIGHT off the assembly line.

 

Kinda neat to know, but I would rather have been informed when I ordered it, I shouldn’t have had to email them and ask where my shipment was, they should have emailed me and notified me of a delay or there should have been notices at the time of purchase … 

 

Oh well.  Spilled milk, right?

 

Mike.

**Which company is it? **

Which company is it? 

I had ordered direct from

I had ordered direct from Dimension Engineering

So my motor controller arrived…

Yes, it finally arrived (this post is very late as I’ve only gotten to mess with things this week) on April 16th.  Not terrible, really, 19 days from placing the order…

I borrowed the RC out of a plane that we’ve had laying around and connecting the SyRen really IS as simple as DimensionEngineering makes it out to be!  I cut the pigtail off a broken servo…  black to ground, red to 5v+, and white to “S1” signal input.  + and - from a car battery to the appropriate terminals on the controller, and + and - from the scooter motor to the remaining screw terminals.  No soldering, no adjusting, no programming (had to flip one DIP Switch to put it in RC mode).  Hit the stick on the transmitter and immediately ran over my sneaker :smiley:  Flip the servo-reverse on the transmitter and all was well!!!

I CAN load a video if anyone cares to see, but at this stage the scooter still has no remote steering what-so-ever, and with someone sitting on it, it is no more than a mobility scooter…

I did learn that 12 volts will NOT be enough for what I want…  it is too slow and with someone sitting on it, it struggles even in grass on flat ground …  will have to be 24 volt (as the scooter originally was) or even 30 volt if I can source an appropriate charger without killing my budget (which isn’t much).

Next BIG step will be finding a servo for the steering.  Like the motor controller, I want enough overkill that I do not need to worry about breaking the gears, but also like the motor controller, I need to be able to afford the servo >.<  I have seen many that will work, but with price tags OVER $200 for a single servo, it’s not really possible right now…  I have seen several accounts of people using modified servos for position feedback while using car window wiper or power window motors, but all seem to agree that there isn’t enough power or speed…

 

So now I look to LMR for more advice!  I need a servo to steer this thing…  I HOPE to be under $100 for the servo…  I wont terribly mind using two servos but I am a little worried about the extra complication as well as the servos fighting each other.

 

Hoping to get plenty of replies,

Mike, from DieCastoms.

My suggestion to you

now that you are asking a different question you should make it a different forum post, if you want people to look at it. The other bonus is, people looking for answers to how to steer a heavy model with a servo or servo like mechanism will be able to find it rather than find a post about a tilt sensor and wonder what it has to do with steering.

car window wiper or power

car window wiper or power window motors will be strong and fast, google rc pocket quads and look at youtube also