Let's Make Robots!

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.

Comment viewing options

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

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

@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 :P  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 :P  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

 

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.

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). 

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.

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!