Waking up XBee with sensor - wireless

Is it possible to wake up XBee end device with input (high) from sensor? According to documentation:
"When the device asserts (high) Sleep_RQ, it finishes any transmit or
receive operations and enters a low power state."
But in my case i need inverse logic. Sensor (e.g motion sensor) setting it's control pin to high when motion detected.

It is not possible to invert the logic of the XBee itself. But of course you can connect an inverter (NOT gate) to the pin. This can be as simple as a transistor and two resistors, but if you want to save energy, have a look at the CMOS inverter type or special low power components.

Related

How can I convert the serial signal from ADC to N-bit range signal?

My project goal is to design a 'heart rate module' using zed board and ppg sensor.
I'm going to use Pmod as ADC for converting the analog signal from the ppg sensor to the digital signal so that the zedboard would be able to process it.
there is a problem at this point.
my module gets a '12-bit signal' as input,
but I found out that the Pmod provides the digital output in serial peripheral protocol.
the input of the module has 12-bit range, but the output of pmod(which will be connected the module as a module input) is only 1-bit range.
I think their bit range differs, which shouldn't
how can I solve this problem?
Assuming that I have understood your problem correctly, you need to design a Deserialiser module. The most common way of doing this is by creating a Shift Register.
The Shift Register operates by shifting serial data in, 1 bit at a time. When enough bits have been shifted in (determined by your application) you can shift the contents of the register out in a parallel shift. You now have parallel data.
But wait, it may not be that easy for you. You mentioned that the device you are using communicates via a SPI bus. Unless you have a SPI module that is helpfully outputting serial data (and telling your register when to shift) then you need also design some SPI compliant logic. Don't forget to pay attention to the timing requirements of the SPI port.

UHD B210 phase synchronisation between radios

I have two B210 radios sharing a 10MHz external master clock and 1pps time signal. I have noticed that each time I start a receive stream simultaneously on both radios they are out by a random but quantised phase variation.
For example if the internal master clock rate is set to 16MHz and the sample rate is 1Mhz then the phase difference is a random multiple of Pi/6. Note this is between different B210 radios - there is no such variation between the two RF channels of the B210.
I need the radios to be in phase lock, not just frequency lock, for the measurements I am making. My work around at the moment is to inject a calibration signal into all the radios at the start of each capture to measure this difference then compensate for it by adjusting the samples in software.
Is there something I have missed in the UHD API which allows me to lock the radios together so they do not have this variation?
There is no way of providing the phase synchronisation between radios as they have different local synthesizers.
From USRP Driver Manual:
After tuning the RF front-ends, each local oscillator may have a random phase offset due to the dividers in the VCO/PLL chains. This offset will remain constant after the device has been initialized, and will remain constant until the device is closed or re-tuned.
More here http://files.ettus.com/manual/page_sync.html

Time Signal Reception with RTL-SDR USB Dongle in Europe?

How can I receive a time signal with an unmodified RTL-SDR USB TV Dongle here in Europe?
RTL-SDR Dongles are able to receive the frequency range 52-2200MHz.
Here in Europe, radio-controlled clocks receive DCF-77, a time signal broadcast on 77KHz, but as 77KHz is a bit lower than 52MHz, that's out.
The GPS L2 signal is at 1575.42 MHz, so that's within the dongle's range, but the signal is way too weak to be received with the TV antenna. An active GPS antenna is needed, and for providing the antenna with the power, I'd need to make some modifications to the electronics which I don't really want to do.
In the old age of analog TV broadcasting, we had Teletext / Videotext here in Germany, which contained a time signal, but these times are long gone.
ADS-B reception with a dongle works like a charm, but unfortunately they did not put in time or date bits into the data packets.
So: Does anybody have any idea where in the spectrum that can be received by an unmodified RTL-SDR dongle there is a time signal that could be easily decoded?
I'm well aware that getting time over the network via NTP, or via a GPS modem via NMEA 0183 would be way easier, but I'm curious and just want to play around with that dongle a bit. Precision is not important. +/- 2 seconds is fine. And I'd like to do it the SDR-way, so using the dongle in the originally intended way (as a DVB-T receiver using the original software) defeats the purpose (i.e. learning and DIY)
The GPS L2 signal is at 1575.42 MHz, so that's within the dongle's range, but the signal is way too weak to be received with the TV antenna. An active GPS antenna is needed, and for providing the antenna with the power, I'd need to make some modifications to the electronics which I don't really want to do.
Well, first of all, GPS is really weak, but it still works under the noise floor; that's something important to realize – I've seen it more than one time that people are worried because they can't see GPS on a PSD display. You won't; you'll need signal processing to recover it from all the noise.
The modifications aren't all that complicated; basically, you need a capacitor to let through the AC component to the RTL dongle, and a voltage source to feed the active antenna; the required component is usually called a bias-T.
Nevertheless, an active antenna will be necessary – your RTL dongle probably won't have a Noise Figure low enough to receive GPS signals on its own.
In the old age of analog TV broadcasting, we had Teletext / Videotext here in Germany, which contained a time signal, but these times are long gone.
True; haven't looked at local FM stations, but RDS might be the way to go – it can contain a clock/time signal; the German Wikipedia claims that mainly publicly owned stations transmit that information field.
Have a look at gr-rds; it's a GNU Radio implementation of the Radio Data System. If you don't have a working GNU Radio installation (yet), you might try out the GNU Radio LiveSDR Image, which contains a ready-to-use gr-rds.

TSMP77000 IR Receiver Code

I'm using tsmp77000 IR Sensor module for air conditioner remote control system.
datasheet
I instructed remote controller device of the air conditioner to sensor module and i saw voltage outputs(active low) on the oscilloscope. Then, i need to transmit this signals with IR transmitter led for control air conditioner. But, there is voltage outputs, there isn't frequency graph. How to i convert to pwm output of this signal? Frequency, duty cycle?
And I saw frequency value on the ossiloscope, but it is 833Hz. Whereas,range of IR receiver sensor module is 20-60kHz.
Thank you!
Here is a good explanation of how IR remote signals work by Adafruit: https://learn.adafruit.com/ir-sensor/ir-remote-signals
The 833Hz you are seeing on the oscilloscope are most likely the "wide" bands. If you zoom in, you should see that each pulse is actually made up of many, faster, PWM pulses.
Your best bet will be determining the frequency of the fast IR pulses, setting your PWM pin to that frequency, and then manually enable/disable the PWM pin for the appropriate time intervals, as per the oscilloscope reading.

Accessing audio out in Windows

I am looking to write an Arduino script that uses whatever audio signal is going to the speakers to create a physical visualization.
The Arduino is connected to the windows machine only through USB, so I need to use USB to find out what is being sent to the speakers. How would I access this information?
As of right now, the Arduino can only communicate with the computer via serial over USB. Things have changed with the new Arduino Uno, but the examples have not yet been released to show how to have the new Arduino act as other USB devices.
You would have to write something for the Windows box that monitor's the system audio and sends the info about it over serial to the Arduino, as long as you want it to only connect via USB.
There isn't a very good way to interface an audio signal to an Arduino without some external hardware.
One way to do it though would be to connect the audio line to a biased pin with a capacitor, then you could use the ADC directly. There will be pretty terrible dynamic range, but it only takes 3 passive parts. Running that through an opamp before going to the ADC pin could significantly improve dynamic range and provide a filtering opportunity (see below). Alternatively, you could switch on an on-chip voltage reference to use (typically 1-1.5 V) instead of the main supply.
It doesn't matter that much for a straight visualization, but the sample rate will not be good enough to capture the full spectral content of the audio (in addition to the poor dynamic range resolution). The default Arduino sample rate is 10 kHz(-ish...possibly asynchronous), so you will only get valid data if your signal is below 5 kHz, otherwise aliasing will muck it up. (If you write your own analog driver for the ATmega32P you could get up to 76 kHz sample rate with 8-bit samples)
Then to actually communicate that data to a computer, you can fairly easily throw all those ADC values onto the UART for the computer to pick up and process as it sees fit. An ATmega will not have the power to compute FFTs on the fly (what you'd do almost always do for a viz anyways).
Or to skip all that, connect the audio signal to your computer's sound card (or USB sound card...they're pretty nice) and use some audio driver.
There is a Java library for processing called ESS that lets you access audio out.

Resources