First Project, Asking if this will work.

Hello everyone.

I have long been interested in working with electronics but have never actually done anything outside simple circuitry. Recently I came across a need for something specific that I saw as the opportunity to finally dip my hands into working with a Arduino. So now to the project.

First off let me explain what I am attempting to achieve. I want to make a Transmitter that sends 2 signals when it is detected that the receiver is 90 degrees from parallel to the ground. Only relation to parallel t the ground matters. The signals I want to send is a mid to short range FM that can be picked up on a common radio. The Second a longer range signal that triggers a tone that grows in pitch and volume the longer it sounds.

The Transmitter I am thinking a Trinket Pro for the base.

To detect the orientation in relation to the ground I chose a gyroscope. I am trying to avoid using something like a mercury switch and I need something that will return to 0 on its own.

Once a orientation of 90 degrees to the ground is registered a signal is sent via PWM to 2 transmitters. For short and mid rang transition a FM transmitter that can be picked up on a radio. for longer range transitions and signals a RF Transmitter.

http://www.amazon.com/433Mhz-Wireless-Transmitter-Receiver-Module/dp/B00GYV0YNM/ref=redir_mobile_desktop?ie=UTF8&dpID=51QZfsrhEML&dpPl=1&keywords=rf%20transmitter%20board&pi=SY200_QL40&qid=1453868032&ref=plSrch&ref_=mp_s_a_1_1&sr=8-1

On the Receiver end we have the other half of the RF Kit connected to another Trinket Pro. Once a signal is received to broadcast it I am thinking a simple buzzer.

http://www.amazon.com/uxcell-Active-Speaker-Printer-Arduino/dp/B00KBPQMD8/ref=redir_mobile_desktop?ie=UTF8&keywords=arduino%20speaker&pi=AC_SX110_SY165_QL70&qid=1453868401&ref_=mp_s_a_1_14&sr=8-14

Each unit would be powered by a 9V battery and enclosed in its own Hobby Box. Is this a sound plan? Or am i horribly flawed somewhere.

It can work but there is a few things to consider.

Firstly the 9v battery is only capable of fairly low current. This will determine type of Arduino used and how long it runs for.

The next is what is your experience in programming and electronics? As a newbie, you have a lot to learn.

Weedpharma

parallel to the ground ?

there is nothing in a gyroscope or it's ability to allow it to determine the slope of terrain.
you would have to have ground sensors, at least two, if not three, to determine if your platform is parallel to the terrain upon which it is resting at any time.

I am no novice in programming, but nether am I a expert. As for the 9v Battery, what would you suggest? I need long battery life as the final project will be in constant use on a nightly basis with failure being unacceptable. Life will literally depend on the device working.

My experience in electronics is minimal but i have a decent understanding of them.

On note of the Gyroscope. I chose it because it seemed to be able to do what I want the easiest. That said I am positive there are other things that could do what I need. (that being sending a signal when the unite is on its side essentially.)

CybernX:
Life will literally depend on the device working.

In that case Arduino is not really an appropriate choice of platform.

CybernX:
....Life will literally depend on the device working.....

The Arduino is a beginners platform, and you shouldn't really be using it in life-dependent situations, unless you can ensure a foolproof, 'fail-safe' system and/or some sort of backup system to take over in the event of component or communications failure.
And I'd be looking at something more reliable than those cheap, crappy $2.71 433MHz RF modules. How much is your life worth?

Edit: As I see Delta_G has also just advised.

Too many things can go wrong with the system that you propose. What exactly are you trying to achieve?

I am trying to build a more modern Foal Alarm. Hence the Life.

CybernX:
... I want to make a Transmitter that sends 2 signals when it is detected that the receiver is 90 degrees from parallel to the ground. ...

So you want an alert when your mare lies down?

yes. with her head on its side.

CybernX:
I am trying to build a more modern Foal Alarm. Hence the Life.

Right - I misunderstood. Carry on. :slight_smile:

Why not a mercury switch or two? Simple is often best.

Just trying to avoid using a Mercury switch.

CybernX:
Just trying to avoid using a Mercury switch.

It's hard to beat their reliability. The more complex you make the project, the more there is to go wrong.

Anyway, working from the pitch of an MPU6050, you should be able to get what you want. (Or the roll, for that matter.)
I've only played with one once, but had no problem making a servo track it's pitch exactly, from flat, to 90 degees tilt in one direction to 90 degrees tilt in the other direction. The servo swung nicely through 180 degrees.
(If the MPU6050 passes 90 degrees, the value starts to decrease again, from memory.)

I used Jeff Rowberg's library, and based my code on his "MPU6050_DMP" example, moving the servo with changes in pitch.
I also used his "MPU6050_calibration" sketch to calibrate.

Excellent. Thank you for the information.

CybernX:
Excellent. Thank you for the information.

No worries, glad to help.
I didn't keep a link to the library and associated code, but if you Google "MPU6050 Jeff Rowberg", you'll soon find it.