Difference between revisions of "Electronics notes/Bluetooth notes"

From Helpful
Jump to: navigation, search
m (Headphones (and speakers))
m (Audio)
Line 30: Line 30:
  
 
==Audio==
 
==Audio==
 +
 +
===Headphones (and speakers)===
 +
When looking for wireless headphones, look at the profiles.
 +
 +
 +
Headsets made for phones often use a profile that allow only phone-quality sound, apparently [http://en.wikipedia.org/wiki/Bluetooth_profile#Hands-Free_Profile_.28HFP.29 HFP] or the older [http://en.wikipedia.org/wiki/Bluetooth_profile#Headset_Profile_.28HSP.29 HSP].
 +
 +
 +
Headphones meant for music may (and bluetooth speakers and such usually will) support [http://en.wikipedia.org/wiki/A2DP#Advanced_Audio_Distribution_Profile_.28A2DP.29 A2DP] instead to get music-quality sound (not audiophile guaranteed, but good enough for the rest of us). {{comment|(Note that A2DP also supports the lower-quality modes, and the devices may also do HFP and/or HSP for compatibility, so configuration ''can'' matter)}}
 +
 +
A2DP devices tend to also support remote volume control via [http://en.wikipedia.org/wiki/A2DP#Audio.2FVideo_Remote_Control_Profile_.28AVRCP.29 AVRCP].
 +
 +
 +
 +
When considering bluetooth sound (e.g. music around the house), keep in mind that many transmitters are class 2 and so do at most 10 meters (...both ends matter, since both are transceivers), and that limited bandwidth may may degrade quality (instead of cutting out. In particular some headsets seem to do this).
 +
 +
There are some Class 1 headphones out there.
 +
They (almost per definition) use more power, so tend to have shorter battery life.
 +
 +
 +
If you like your own headphones, you can buy a battery-powered A2DP-capable receiver and plug your own favourite headphones into those.
 +
These are usually class 2 devices. Class 1 variants are regularly mains powered (their point apparently being less cable clutter).
 +
 +
 +
===Latency===
 +
 +
Some choices in bluetooth itself means that for audio, it's never going to get below 20-40ms or so.
 +
 +
In practie
 +
 +
 +
 +
 +
==Serial module notes==
 +
===BC417===
 +
<!--
 +
Can be bought for a few bucks, in modules that tend to contain just this and a Flash chip beside it
 +
 +
See also:
 +
* http://air.imag.fr/mediawiki/index.php/Wireless_Bluetooth_RS232_TTL_Transceiver_Module
 +
 +
-->
 +
===BlueSMIRF===
 +
<!--
 +
 +
====Intro/specs====
 +
 +
Bluetooth serial port modules. If you're here, you probably bought one for an Arduino-ey project.
 +
In that case, you may get it on a slightly larger board (or shield) with regulation (bluetooth is typically low-voltage, this one's 3.3V).
 +
 +
You can basically use them as a two-directional wireless serial port, at some speed between 9600 to 115200bps.
 +
 +
Its logic lines are
 +
* 3-5V, not classical 12V serial
 +
* 115200 8N1 or 9600 8N1 (by default)
 +
 +
Hardware:
 +
* BlueSMIRF Silver, RN-42 - class 2, expect 10m/30 feet, you may get 20m/60 feet
 +
* BlueSMIRF Gold,  RN-41 - class 1, up to 100m/300 (line of sight)
 +
 +
 +
====Use====
 +
 +
After powerup, it is fairly immediately usable as a bluetooth serial device (serial port profile, [http://en.wikipedia.org/wiki/Serial_Port_Profile#Serial_Port_Profile_.28SPP.29 SPP]).
 +
 +
It can be a discoverable thing that things connect to, but also connect to other modules.
 +
This means a PC need not be involved.
 +
 +
 +
 +
=====Configuration=====
 +
 +
For 60 seconds after powerup, you can switch to command mode ($$$ or +++ {{verify}}) to do configuration.
 +
You can exit it with ---.
 +
 +
Configuration is stored (though there are some things you can change temporarily)
 +
 +
 +
D displays basic settings, E displays extended setings, and there are a few more such commands.
 +
 +
You can do so remotely, unless it is in master mode{{verify}}
 +
 +
 +
Interesting things to set:
 +
* Device name - should be unique. Default may include some part of the MAC
 +
 +
* authentication - effectively whether it is required or optimal (PCs often insist on it)
 +
* passkey (default is often often 1234 or 0000)
 +
 +
* mode (Default is slave, that is, a discoverable thing)
 +
 +
 +
 +
-->
  
  
 
[[Category:Hardware]]
 
[[Category:Hardware]]

Revision as of 19:57, 10 November 2019

This is for beginners and very much by a beginner.

It's intended to get an intuitive overview for hobbyist needs. It may get you started, but to be able to do anything remotely clever, follow a proper course or read a good book.


Some basics and reference: Volts, amps, energy, power · Ground · batteries · resistors · changing voltage · transistors · fuses · diodes · varistors · capacitors · inductors · transformers · baluns · amplifier notes · frequency generation · skin effect


And some more applied stuff:

IO: Input and output pins · wired local IO wired local-ish IO · · · · Shorter-range wireless (IR, ISM RF, RFID) · bluetooth · 802.15 (including zigbee) · 802.11 (WiFi) · cell phone


Sensors: General sensor notes, voltage and current sensing · Knobs and dials · Pressure sensing · Temperature sensing · humidity sensing · Light sensing · Movement sensing · Capacitive sensing · Touch screen notes

Actuators: General actuator notes, circuit protection · Motors and servos · Solenoids

Some stuff I've messed with: Avrusb500v2 · GPS · Hilo GPRS · JY-MCU · DMX · Thermal printer ·


Audio notes: microphones · device voltage and impedance, audio and otherwise · amps and speakers · basic audio hacks · digital audio ·


Less sorted: Common terms, useful basics, soldering · Arduino and AVR notes · ESP series notes · PLL · signal reflection · pulse modulation · electricity and humans · resource metering · Microcontroller and computer platforms · SDR · Unsorted stuff

See also Category:Electronics.

Bluetooth works in 2.4 - 2.4835 GHz, in 79 separate 1Mhz channels

Bluetooth continuously hops channels, to lessen the probaility of consistent interference with other devices and other protocols (in particular 2.4GHz WiFi). Busy areas still have congestion problems, though.


This article/section is a stub — probably a pile of half-sorted notes, is not well-checked so may have incorrect bits. (Feel free to ignore, fix, or tell me)

Versions and speed

Maximum speed:

  • Bluetooth 1.1 and 1.2 versions is 1mbit in theory, ~700Kbit/s in practice
  • Bluetooth 2.2 can reach ~1 to 3Mbit,
  • Bluetooth 3 HS can do ~24mbit in theory, 3 plain is still ~3MBps
  • Bluetooth 4 didn't really change speed(verify), but changed low power details


Range

Range is primarily a function of output power, and is either:


Class 2: ~9m, which is what many portable devices do (PDAs and in particular most headsets) (...which is arguably primarily helpful, both to limit collision/congestion, and to limit power use)


Class 1: Up to ~100m, though in practice it may be more like ~30m. Dongles may well be class 1

Audio

Headphones (and speakers)

When looking for wireless headphones, look at the profiles.


Headsets made for phones often use a profile that allow only phone-quality sound, apparently HFP or the older HSP.


Headphones meant for music may (and bluetooth speakers and such usually will) support A2DP instead to get music-quality sound (not audiophile guaranteed, but good enough for the rest of us). (Note that A2DP also supports the lower-quality modes, and the devices may also do HFP and/or HSP for compatibility, so configuration can matter)

A2DP devices tend to also support remote volume control via AVRCP.


When considering bluetooth sound (e.g. music around the house), keep in mind that many transmitters are class 2 and so do at most 10 meters (...both ends matter, since both are transceivers), and that limited bandwidth may may degrade quality (instead of cutting out. In particular some headsets seem to do this).

There are some Class 1 headphones out there. They (almost per definition) use more power, so tend to have shorter battery life.


If you like your own headphones, you can buy a battery-powered A2DP-capable receiver and plug your own favourite headphones into those. These are usually class 2 devices. Class 1 variants are regularly mains powered (their point apparently being less cable clutter).


Latency

Some choices in bluetooth itself means that for audio, it's never going to get below 20-40ms or so.

In practie



Serial module notes

BC417

BlueSMIRF