Interface an ultrasonic sensor with Z-Wave - sensors

The task at hand is to integrate/interface an already existing ultrasonic sensor like this one to a Z-wave transceiver.
Here are the questions related to it:
Is it possible?
What all do I need for it? (Hardware + Software)
Are there any examples that i can follow?

If this sensor is Arduino compatible, you can have a look ar the Z-Uno project.
Their product is an Arduino compatible Z-Wave board, which you can program from Arduino IDE and use as a Z-Wave sensor/actor.

Related

Play audio files in microcontroller (Arduino)

I try to make a Bluetooth speaker with a microcontroller (Arduino, teensy... I don't have a defined model, because I'm considering the frequency)
My question is if I want to put a SD, for reading music stored, the problem is there are library only for ".wav" files, but I want to extend for ".mp3", ".m4a", ".aac" and other.
Exist any library for this? and if is not, How I can do it?
I need to decode an audio files, convert the data in bytes and send it to the DAC.
An example code in C++ will help me a lot, I can created a new library for this.
I don't want use modules, I want to try to do my own circuit.
Edit:
I gonna use a third party microcontroller compatible with Arduino, because I need more capacity for audio.
PDT: I don't know if I had to post this in Arduino o electrict defined, so I put in general.
The Arduino does not have sufficient resources to do this. An MP3 decoder needs plenty of memory and floating point support. The AVR processors used for Arduinos have neither of these.
The only way you are going to do this with a Arduino is if you use a module.
Teensy base on ARM microcontroller (Cortex-M3 & M4) come with FPU, have capacity for play videos. Teensy is a board compatible with arduino. With DAC and SD slot. Adafruit have a library for play .mp3 on this board.
Well .mp3 is enough for me, but in the future I want to learn how to decode other audio file formats.

Calculate Distance between Arduino BLE shield and Phone

Is it possible to calculate the distance between an arduino bluetooth shield (BLE Shield 2.1) and cell phone? More specifically, when the cell phone is within <5 feet of the shield, I want it to perform an action. I know BLE Beacon technology is able to do this in a general sense (immediate, near, far) so I'm wondering if it is possible?
Looking through stack overflow, I've found the following answers but they are all dated:
Answer 1
Answer 2
I know that ultrasonic frequency and laser sight are both options but I am trying to keep costs low so I would prefer a way in which the distance is calculated without the use of an additional tool.
Yes you can use it for distance calculation based on RSSI (received signal strength). You should implement iBeacon on Arduino side as stated in Eirik M answer. The most important thing in my opinion is that you have to be aware of BLE/iBeacon precision.
Please read carefully the following articles to determine if iBeacon technology fits to your needs. If so, implementation should be straight forward.
Broadcasting power and RSSI
The Beacon Experiments: Low-Energy Bluetooth Devices in Action
If BLE beacons are good enough for you, it should be fairly easy to implement a beacon for the Arduino shield. There are a few things you need to be aware of, such as output power and antenna characteristics. I recommend to read up on beacon technology to understand how it works.

Sending iBeacon signal strength(for distance) to arduino board

I have a project using quadcopter(ARDrone).
And i want to controlled it unmanned indoor, using arduino board and iBeacons.
iBeacons send signal strength and floor info to arduino board(inside ARDrone connected main board) and iphone for searching location in building. Project is just controlling drone to go to iphone's location by itself. All calculation parts are managed in server.(triangulation etc.)
Here are the questions.
How can arduino board receive bluetooth 4.0 signal and send it to
server? 4.0 signal can be received by bluetooth 2.0 module?
Do i need to build bluetooth 4.0 receiver module? Or are there any other ways?
In server, complicated calculation will be managed by programs in c++ language but simple things are handled by web language. php? jsp? or other lang which one is better?
and some hints for this project.
I really need your help. thanks;)
3. The calculations to identify the location from the received signal strength and location of the Beacons are fairly straightforward, so should be fine in which ever language you prefer. You will need to use Trilateration, once you have converted RSSI (received signal strength) into a distance.
4. The major challenge you will have is getting accurate distances, iBeacons as you know use Bluetooth LE, what you may not know is that this operates on a Microwave wavelength and so is easily disrupted by humidity in the air, as well as other objects like people. This means that the RSSI readings will jump about a bit, a basic way to overcome this is to take an average over several readings, even so the distances found will be rather inaccurate in many circumstances. To get an idea of the kind of readings that you will get for distance without compensating for environmental factors have a look at my presentation: "Factors effecting positional accuracy of iBeacons", that is based on Estimote iBeacons, but should be relevant for other brands as well, but you will need to do your own experiments to work out the relative errors. I was seeing distance readings that were +-2M away from the real location.
My name is Wojtek Borowicz, I'm a community evangelist at Estimote.
To add to what Chris Thomson (BTW, cool slide deck!) - your first two question can basically be reduced to a single answer: you need your receiver to support Bluetooth Smart on both the hardware and software side. So yes, you need a Bluetooth 4.0 module to receive Bluetooth 4.0 signal and you also need a Bluetooth 4.0 stack for your receiver to be able to 'interpret' that signal.

How to change sound using distance sensor

I'm trying a project to simulate a brass trombone. The materials I'm using are a Seeed Studio Ultrasonic distance sensor, Raspberry Pi, and an Arduino. I'm going to connect the sensor to the Arduino, and the Arduino to the Raspberry Pi.
I'm looking to have the Raspberry Pi play one steady sound out of the audio jack. As the distance between my hand and the sensor get larger, the pitch of the emitted sound should get lower.
I'm not too familiar with using audio in programming, or too much of programming for that fact. Could someone help me write up some code (preferably in java or C#)? I'm very anxious to do this as I play trombone in school. Any help or suggestions are appreciated.
As not to recreate the brass trombone from scratch, use a Midi Synth on the Pi, such as TiMidity (apt-get install timidity) or alike. With this you can bridge between the Arduino's output and the note(s) sent to TiMidity to play out the Pi's speaker.

Arduino Piezo Knock Sensor Play Tones

I would like to hook up several piezos to an arduino so that, when they are activated each piezo plays/triggers a separate tone. For instance, I'll have five piezos connected to the arduino - when I apply pressure to each one they play a separate note, either through a software interface on a computer or from the piezos themselves. Basically an Arduino synth using piezos as keys.
I'm just not quite sure how to go about doing this. I'm sure its possible but just need a push in the right direction. Any ideas? Thanks!
The practical difficulty of using one device as both an input sensor and output device, is that once activated to output (a sound) you would have to disable using it as input for some fixed time. Something more responsive would be to use separate sensors for the keys, and just one speaker for all sounds. The good folks who came up the Arduino tutorials have a 3 key sensor player example here:
http://arduino.cc/en/Tutorial/Tone3
and another example of using a piezo as a sound sensor here:
http://www.arduino.cc/en/Tutorial/KnockSensor
I can Help you with the Software interface , You can use your smart phone to play sounds for each Piezo Sensor.
See this app : https://play.google.com/store/apps/details?id=ram.mere.DoDuino
You can connect arduino using Serial ( Android 3.1 and higher ) or Bluetooth to this app.
And to use the Sound Action follow this tutorial :
https://www.youtube.com/watch?v=RQhx6qBElVk
. So you specify what sound to be played on your android phone , and when you detect which piezo you send data to the android and then the Sound Specified will be played .
So for example if android App Received : #p1; then it will played the sound related to Piezo one
and when you send #s1; then it will stop playing that sound ..etc.
Hope this help someone :D .

Resources