Help with a simple project

Hello Everyone,

Hopefully I have come to the right place and perhaps this topic has already been discussed (my apologies if it has).

My project is pretty straight forward. Keep in mind I'm new to Arduino and know nothing about programing it.

I'd like to trigger a standard RC servo to move 90 degrees(per say) by way of an accelerometer or gyro, when any axis is tilted more then 80 degrees.

I also need to have a way of resetting the unit by perhaps a push button once this has happened.

My only requirements is that it must be compact. Ebay sells the ADXL335 3-axis Analog Output Accelerometer and I've heard of the Digispark development board.

The project I'm working on a parachute system for RC aircraft. when the vehicle has a loss of power and comes tumbling down the accelerometer will trigger the servo arm to move which unlocks a spring loaded door to a can with a parachute inside.

I would love peoples input of what parts you would advise to use and how the code would look like.

Any time you point the nose down under light power, you are likely to trip
the parachute.
Dwight

alexfagundes:
90 degrees(per say)

What do you think per se (note the correct spelling) means?

Not picking, just trying to figure out what you mean here. The real meaning makes no sense here, so I wonder what you think it means.

Delta_G:
What do you think per se (note the correct spelling) means?

Not picking, just trying to figure out what you mean here. The real meaning makes no sense here, so I wonder what you think it means.

Really? your that cocky? read my actual request and reply with some knowledge or go troll somewhere else (per say)

Not cocky, just wondering what you meant there. Do you mean approximately 90? Exactly 90? There's obviously some qualifier there and I wondered what it meant. Get the chip off your shoulder. I told you in that post I wasn't picking, just wondering what you meant.

By the way, I don't think using words properly or spelling them right equals cocky. Just intelligent.

the servo arm does not need to rotate a full 90 degrees. it's sole purpose is to be used as a latch to hold a lid in place that is spring loaded. the coding and hardware is what's important.

My project is pretty straight forward.

Actually, this is quite a challenging project.

Neither a gyro nor an accelerometer alone can be used to measure the absolute orientation of a moving object for any significant length of time, especially if it is undergoing accelerations (as in an RC aircraft).

However, if properly calibrated, a good quality IMU with modern firmware, e.g. the BNO055, can give a reasonably reliable estimation of the absolute orientation.

Interesting that you say that. My original thought was that as long as I could receive a trigger signal once the unit detected an angle past 80 degrees, that the coding could be done in such a way to allow a clean simple trigger of the servo.

I decided to buy a pro mini because of its small footprint, and also because another member on instructables used it on his rocket parachute project which looks really promising.

It makes me wonder if the Naze32 board we already use on FPV racers having a wealth of sensors already on it could be used to trigger a servo based on tilt angle.

But it would be nice to have a stand alone system. And would also let me mess around with the Arduino platform as I have many uses for it.

Is there any sample coding I can look at to see what the logic is between a tilt sensor/gyro/accelerometer and the Arduino board?

Is there any sample coding I can look at to see what the logic is between a tilt sensor/gyro/accelerometer and the Arduino board?

RTIMULib for Arduino works quite well.

I'm not all that sure an RC plane will necessarily do anything that
an accelerometer will detect when the battery voltage fails.
I would think a battery monitor would be good enough.
What would you expect to happen if you wanted to do
inverted flight? or a roll?
Also, a properly build plane that still has servo control and
only loses motor power should still be controlled.
A transmitter signal to release the parachute should be
enough.
Dwight

Interesting that you say that. My original thought was that as long as I could receive a trigger signal once the unit detected an angle past 80 degrees, that the coding could be done in such a way to allow a clean simple trigger of the servo.

You meed to start with your sensor and develop code for it that will output something that is unique for the condition requiring the servo to operate. Once that is accomplished then adding a servo should be easy.

dwightthinker:
I'm not all that sure an RC plane will necessarily do anything that
an accelerometer will detect when the battery voltage fails.
I would think a battery monitor would be good enough.
What would you expect to happen if you wanted to do
inverted flight? or a roll?
Also, a properly build plane that still has servo control and
only loses motor power should still be controlled.
A transmitter signal to release the parachute should be
enough.
Dwight

It's not for a plane, although some winged aircraft should have uses for it. It's for multirotors. Specifically for craft carrying photographic equipment or specialized payloads. These types of drones are not often required to bank very hard or fly in such a manner that they exhibit very large g-forces. They are mellow flyers capable of shooting extremely steady jitter free video.

I have full telemetry equipment in most of my craft including voltage monitors. In the case of my hexacopter, even if one motor fails, the other five can compensate to a degree.

The parachute is, for lack of a better phrase, a murphy's law prevention. If a flight controller fails or perhaps a catastrophic shortage of electrical components occurs, a battery monitor does little good.

regardless of how many failsafe's there are or how confident we are of our solder jobs' or connection points, the risks are still present.

In the case of a $10K unit carrying payload you would rather not see damaged, A parachute system can arguably prevent or even minimize damage to our equipment or damage to any property it's about to impact.

Now, having said that, I build and fly FPV racing machines that are subject to high g-forces and perform acrobatic maneuvers. They are write offs and a parachute system is irrelevant/useless to that application.

My intent is to hopefully design or add to someone's existing design a system that can be easily built and programed, 3D printed or constructed by other means, openly shared and open to improvements or customization, and also cost effective for all to enjoy much like the open source RepRap 3D printers and such.

The values/parameters for deployment do not need to be absolute. I would imagine that you do not want the parachute to deploy if the craft banks(any axis) at a 45 degree angle, but once it has exceeded 80 degrees for a filming platform it is to be considered unstable and out of operator control to the parachute system.

Oh, and yes I could trigger parachute deployment via a spare channel. That would certainly work but my reaction time vs. a processors' is somewhat slow when you consider a pilot concentrating on moving the craft, looking down at a screen to frame video and monitor telemetry...bla bla bla..and there is also the shock factor when a pilot is caught off guard in the case of catastrophic failure. Maybe at 30,000ft an actual airplane pilot has some time to deal with certain issues but at 400ft and below in a craft with no wings, it's a matter of split seconds. Is it doable? yes. would I rather a system to do it for me....absolutely.

I'm not afraid of this project failing, my fear is not trying it in the first place which prevents it from succeeding.

One wonder why you didn't tell us that to start with.
It does sound like a practical project.
The only issue I see is deploying the parachute with
a lot of rotating blades near it.
A tangled parachute is not worth much.
You'd most likely want some way to brake the
props.
Dwight

dwightthinker:
One wonder why you didn't tell us that to start with.

He was probably distracted from having his panties all in a bunch cause someone asked what he meant by a phrase that didn't make sense. Sent me some shitty PMs about it. Never seen someone get so bent out of shape over a clarification request before. Kids got some anger issues to work on first.

I guess he is upset that we are not mind readers and can
make sense out of vague postings.
If he'd take a deep breath, and tried to put himself in our shoes
for a minute or two, he could read what he'd posted and
try to make sense out of it.
It was obvious by my first post that I had no idea what he
had in mind.
I still don't know what it is that he wants from us, other than
it looks to have some promise as a project, as I've stated.
Dwight

Hi,
As a suggestion, you might be worth first building this project as a datalogger so you can see what accel figures you get under normal operating conditions.
Then putting the project in a frame and "tumble it" in all its axies to see what a control failure might be like.

Just a suggestion... Tom.... :slight_smile:

dwightthinker:
One wonder why you didn’t tell us that to start with.
It does sound like a practical project.
The only issue I see is deploying the parachute with
a lot of rotating blades near it.
A tangled parachute is not worth much.
You’d most likely want some way to brake the
props.
Dwight

It wasn’t mentioned only because my request was focused on two things to keep it simple:

a) what hardware would you use that is small and accomplishes the tasks mentioned?

b) Has anyone coded a similar project and what does that look like?

The mechanics, concept, theory, and feasibility was already established. It’s not a new idea. What’s new is making one that everyone can afford and build themselves.

The parachute container faces downwards. The parachute would fire opposite of the propellers. Most copters tend not to fall straight down.

The function would look something like this I suppose:

  1. manual switch turns entire parachute unit on/off
  2. Once turned on, unit initializes and records current angle of xy axis, and if it has to, sets/records/assumes the current servo position at zero (position a). (servo only needs to have two positions in this project. I’ll call them a & b)
  3. During flight unit samples axis angle every 200ms or whatever is appropriate. Once an approximate angle of 80 degrees or more is reached, unit activates servo arm to move to position b.
  4. Once unit is on the ground and you repacked the parachute, a momentary switch is pushed that manually rotates servo arm back into position a.

Unit only needs to record axis angle upon being turned on. Servo arm only needs to be triggered to move once after being turned on. It would be beneficial if the momentary switch could manually move the servo arm in either position every time it is pushed much like a two position channel switch on a RC transmitter. The accelerometer/tilt sensor/gyro then becomes a bypass override.

I’m pretty confident that the Pro Mini board is a good choice unless there is something smaller and simpler with integrated micro USB interface that has even less inputs/outputs.

I’m curious if a tilt sensor is the right choice. It’s small and simple but is it too simple? Or is an ADXL335 better for this application? Or is a BN0055 necessary. I want to keep any programing to be done strictly on the Arduino.

Delta_G:
He was probably distracted from having his panties all in a bunch cause someone asked what he meant by a phrase that didn't make sense. Sent me some shitty PMs about it. Never seen someone get so bent out of shape over a clarification request before. Kids got some anger issues to work on first.

If I lived in a warmer climate, and wearing panties was my thing (not judging), perhaps an apology would help sort this all out. Maybe my fuzzy onesie is making me snappy :wink: In most forums, myself and others can look a bit passed grammar errors and stuff that doesn't make sense to us and answer what we can first. Then maybe ask "what did you mean by that btw?". It keeps the topic focused and does not come off as arrogant. I don't mind if you have nothing to contribute that focuses on the logic or hardware portion of this project. But it was the point of me posting it to begin with. "Per Say" As I wrote was meant to imply it was imprecise or off the mark and usually would have been followed by a negative comment but in this case it wasn't. It is impractical to go through this extreme of clarification when what was being questioned had far less importance than the other 90 percent of what I wrote.

The servo position I wrote is arbitrary until I become familiar with the programing logic. I don't particularly know how Arduino goes about to move a servo, if it cares about its position and knows where it is, if it's capable of moving in a given increment/speed, or if it acts as purely an on/off switch and can either fully open or closes it only. I can work around any of those parameters.

A tilt sensor or ADXL335 will work as good or as bad.
Both are based on acceleration.
If I assume a drone is on its side with props running, it
will be accelerating in the direction of travel for some
time. By the time the copter gets up to the limit of the
prop speed, the acceleration may not have been reduced
enough to allow gravity to dominate.
Remember, when the copter is flying is does so by applying
1G of down force.
You vector that in a different direction it is still 1G for some
time until it reaches the speed of the airflow through
the props.
By that time, the copter may be on the ground.
You need a gyroscope.
Dwight