Category Archives: News Tecnology

News Tecnology Info Update

Smartphone Controlled Your Light Switch

ABOUT THIS PROJECT

We’ve created a way for you to connect and configure Bluetooth control of a lamp or any AC-powered device in your home using an Arduino as the brain. Let’s get started!

Blinking an LED is the “Hello, World” of hardware — an easy test to ensure that your Arduino is set up correctly. Grab your Arduino board, a breadboard, an LED, a 220Ω resistor, and some jumper wires, and follow Massimo Banzi’s tutorial. The example code will set the Arduino’s pin 13 as HIGH for 1 second (switching the LED on) and then LOW for 1 second (off), and so on.

2. Add a pushbutton switch

Now connect the little tactile pushbutton and a 10kΩ resistor as shown in Figure A.

Download this project’s Arduino code. In the Arduino IDE, open the Library Manager and type BLEPeripheral into the search window, then select the library BLEPeripheral.h and click Install.

Next open the sketch ble-smart-switch.ino in the Arduino IDE, and upload it to your Arduino. Now your LED should turn on when you push the button, and off when you push the button again.

3. Add the Bluetooth module

Now that you have a working pushbutton light switch, let’s add Bluetooth LE. The Bluetooth board we’re using is the Adafruit Bluefruit LE board based around the Nordic Semiconductor nRF8001 chipset. Wire the board to the Arduino as shown in Figure B, using pin 2 for RDY and pins 9 and 10 for RST and REQ, respectively.

S

4. Program your smart switch

Open the Arduino sketch ble-light-with-powertail.ino and read along with the comments to see how your Smart Light Switch code will establish the service:

» Create a peripheral instance using the BLEPeripheral library. » Create a lightswitch service with UUID of 0×FF10. » Create the Switch and State characteristics and descriptors.

BLEPeripheral blePeripheral = BLEPeripheral (BLE_REQ, BLE_RDY, BLE_RST); BLEService lightswitch = BLEService("FF10"); BLECharCharacteristic switchCharacteristic = BLECharCharacteristic("FF11", BLERead | BLEWrite); BLEDescriptor switchDescriptor = BLEDescrip tor("2901", "Switch"); BLECharCharacteristic stateCharacteristic = BLECharCharacteristic("FF12", BLENotify); BLEDescriptor stateDescriptor = BLEDescrip tor("2901", "State");

And then configure it: » Set the Local Name (for generic Bluetooth access) and Device Name (for broadcast in the peripheral’s advertising packet). » Add your service characteristics and descriptors as Attributes of your peripherals instance. » Advertise the Bluetooth LE service, and poll for Bluetooth LE messages. » Set both the switch and state to be on if the button is pushed, off if it’s released.

pinMode(LED_PIN, OUTPUT); pinMode(BUTTON_PIN, INPUT); blePeripheral.setLocalName("Light Switch"); blePeripheral.setDeviceName("Smart Light Switch"); blePeripheral.setAdvertisedServiceUuid(lightswitch.uuid()); blePeripheral.addAttribute(lightswitch); blePeripheral.addAttribute(switchCharacteristic); blePeripheral.addAttribute(switchDescrip tor); blePeripheral.addAttribute(stateCharacteristic); blePeripheral.addAttribute(stateDescriptor); blePeripheral.begin();

Save and upload the sketch to the board. Now you can turn the LED on and off as normal using the button, and if you open the Serial Console you’ll see the string Smart Light Switch appear, with further messages every time you push the button to turn the LED on or off.

In addition, now you can “throw” the switch using Bluetooth LE, because we’ve assigned an event handler to be called when a write command is made on the peripheral:

switchCharacteristic.setEventHandler(BLEWritten, switchCharacteristicWritten);

And at the bottom of the sketch, after the loop( ) function, we’ve added the handler function itself. Now you can control the LED via Bluetooth LE!

5. Test your Bluetooth service

All you need now is a generic Bluetooth LE explorer app so you can examine and trigger your service. Go to your preferred app store and install LightBlue (iOS) or nRF Master Control Panel (Android) on your smartphone or tablet. The two apps present the same information in slightly different ways.

Opening either app will start it scanning for Bluetooth LE devices. You can choose a peripheral from a list of nearby devices and explore information about that connected peripheral, its services, and characteristics.

Now take a look at your Smart Light Switch in LightBlue (Figure C). Tapping through from the Smart Light Switch in the peripherals list, you can see the advertisement data for the service showing our two characteristics: Switch, which is Read/Write, and State, which is Notify. You can register the LightBlue app for notifications when the LED state changes by tapping on “Listen for notifications” in the State characteristic screen.

The Switch characteristic screen shows the current value of this characteristic, which should be 0x00, meaning the LED is off. Tap on “Write new value” to open the editor. Enter 01 and hit Done; the LED should turn on and the screen should show the new value as 0x01. If you registered for notifications, you should also see a drop-down to tell you the value has changed (Figure D).

If you have the Serial Console open you should also see the message Characteristic event: light on printed in the console. Finally, if you push the tactile button, you should see a further notification in LightBlue that the LED state has changed back to 0x00.

That’s it — you’ve created a working smart light switch!F

6. Connect a real light bulb

Now connect your smart switch to an actual lamp. The PowerSwitch Tail (Figure E) simplifies our lives by hiding all that nasty AC electricity and letting us use a relay and our Arduino board to switch real mains-powered devices on and off. Nice.

Connect 3 wires to the PowerSwitch Tail’s screw terminals: the left terminal (labeled +in) is for +5V; the middle (labeled -in) is the signal wire; and the right is Ground. Then wire up the Arduino, switch, and PowerSwitch Tail as shown in Figure F.

Plug the PowerSwitch Tail into the wall, and then plug a mains-powered lamp or other electrical device (maximum draw 15A at 120V) into the PowerSwitch Tail socket.

The PowerSwitch Tail can be wired either as “normally open” or “normally closed.” From a safety perspective, it makes sense to use the normally open configuration here: Power will only flow while the signal wire from the Arduino is pulled LOW, otherwise the lamp remains “off.”

Since pulling the signal wire LOW rather than HIGH is what triggers the relay, we have to flip the logic for the LED_PIN. Go back into the code and you’ll see that everywhere there was a

digitalWrite(LED_PIN, HIGH);

we have changed it to

digitalWrite(LED_PIN, LOW);

and vice versa.

Now, instead of controlling an LED, you’re controlling a real lamp with your phone! Congrats!

This project is adapted from the book Make: Bluetooth by Alasdair Allan, Don Coleman, and Sandeep Mistry.

Why should a fax machine?

If I asked you to send me a fax today, you’d probably message back in disbelief—a what the hell message transmitted near-instantaneously via text, email, Instagram story, disappearing Snapchat, or Skype call. A fax? 1989 called, they want their communication method back.

Signing copies.

But the fax machine isn’t dead yet. Usage certainly has fallen from its peak in fax-friendly 1997, when 3.6 million machines were sold in the United States. But technology historian Jonathan Coopersmith says it’s still too soon to count the fax machine out entirely. In fact, a fax is probably being sent somewhere, for some reason, right now.

Coopersmith is the author of the book Faxed: The Rise and Fall of the Fax Machine and technology historian at Texas A&M University. On a Monday morning in fax-phobic 2018, he called PopSci from a busy airport (“Isn’t modern technology wonderful that we’re able to do these things?” he said as he ordered tea in one state, and I listened in another) to discuss his favorite machine. He says the facsimile machine, as it was originally known, has metal roots stretching back to the 1840s. And, he believes due to its continued use among doctors, lawyers, and governments, who need valid signatures and safe information transfer, it will persist, in one form or another, for years to come.

The story starts with Alexander Bain, a mid-19th century Scottish inventor who developed an experimental machine that could transmit a scanned message line by line. For more than 130 years, various inventors, including Thomas Edison, tinkered with their own facsimile machine designs. “There’s a lot of failure, which is normal with technologies,” Coopersmith says of that first century of research and development. “There [were] a lot of people who say, ‘We can do this better. We’ll try again.’”

By the early 1900s, you could get a high-quality fax—on par with the kind of fax you’d receive today—but it cost a lot of money. “In many cases, you’re talking one or two orders of magnitude,” Coopersmith said of the cost. “For most businesses, that’s hard to justify.” For others, though, it made good sense. The Associated Press, for example, launched its Wirephoto network in 1935, which transmitted images through some 10,000 miles of leased telephone wires.

Then as now, the fax machine was based on a simple light/dark binary. To transmit a document, the machine scans a page, line by line, and transmits one set of electric pulses for the black parts (like text) and another for the white parts (like the spaces between letters, words, and paragraphs). The electric pulses are move through a telephone wire. On the other end of the transmission, a the receiving fax machine spits out black ink as directed, leaving the rest blank. It takes a few minutes, but early developers were convinced the hybrid analog-digital device showed promise.

A World War II-era Muirhead fax machine.

Their bet finally paid off in the 1980s. “When that price went down, more people began to use [fax],” Coopersmith says. The machines quickly became ubiquitous in the workplace. It was an exciting time. Or at least it appeared to be in the films of that era, many of which prominently feature a fax machine. (In 1989, Back to the Future 2laid out a vision for the future in which everyone had a fax machine in every room of their house, for example.) But it also presented a new problem, according to Coopersmith. “One of the issues raised by the legal community [was], is a fax signature legally valid?” It was this question—and its ultimate resolution—that would determine the fate of the fax, at least for now.

Drone For Accessible Research

Remote-controlled robots make data more accessible and are quickly becoming a desired tool in scientific research

ain Kerr was having a bad day. He and his research team had been cruising the Gulf of Mexico in a motorboat all morning chasing sperm whales, hoping to get a tissue sample to take back to their lab. But the behemoths were being frustratingly elusive.

Image result for drone

At one point, Kerr was balancing on the bow of the boat, poised to shoot a modified crossbow that’d pop out a pencil eraser-sized chunk of blubber from the whale’s side. But just as he got close enough to shoot, the whale dove—for the fifth time that day. Sperm whales dive for 45 minutes to an hour, so when they’re gone, they’re gone. After 9 hours on the boat, which costs around $2,000 a day to rent, and no data to show for it, Kerr worried he was piddling away funding and donor money. “It felt like I was standing in a cold shower ripping up one hundred dollar bills,” says Kerr, a biologist who runs the nonprofit research organization Ocean Alliance.

That’s when two things hit him: a billowing mass of whale mucus, and an epiphany.

“I was sitting there fuming, and this cloud of snot enveloped me,” Kerr says. The whale snot “was stinky and horrible”, he says, “but as a biologist, anything that’s stinky and horrible is probably productive. I wondered if we could collect and study snot.”

His stinky, horrible hunch was right. Whale snot, it turns out, is packed with DNA, viruses, hormones, and microbes—all incredibly useful things to a variety of scientists. With DNA, geneticists could tell if an animal is native to the area or just passing through, epidemiologists could track the spread of infectious diseases, and biologists could analyze hormones to see if an animal is stressed to the point of infertility.

The only hurdle was figuring out how to get a bucket full of whale snot. But Kerr had an idea: As a hobby, he builds and flies remote control aircraft. Could a similar technology scoop up whale boogies middair?

So goes the origin story of SnotBot: a hexacopter drone covered in petri dishes that collects snot for science. Over the next few years, Kerr’s group, Ocean Alliance developed the bot with help from students at Olin College of Engineering in Massachusetts, with the idea that it could make whale science easier for the researchers and less invasive for the whales.

Typically, marine biologists employ the same techniques that failed Kerr: A motorboat equipped with long sticks and modified crossbows to collect whale biopsies. But Kerr hopes these flying research robots will soon change that. They’re part of a larger trend going on in the field in which scientists are employing drones to capture data that previously proved difficult to gather.

Drones are clearly having their moment of fame. Farmers are using temperature-sensing drones to monitor crops. Meteorologists and climate scientists are sending drones to track storms and hurricanes, and fast-food chains are even experimenting with ones that deliver pizza. But the technology has also proved useful for studying elusive animals in remote locations, whether that’s orangutans in the trees of Indonesia or whales in the middle of the ocean.

And they might be doing more than accessing hard-to-reach places. “Tech like SnotBot are a catalyst for the democratization of science,” says Kerr. Renting research vessels for a remote location can cost nearly $20,000 for an entire trip. Drones can often eliminate the need for such a ship altogether. A complete SnotBot package, including cameras, runs about $4,500 — and can be used over and over.

More whale stories

  • A new study on whales suggests Darwin didn’t quite get it right

  • Look to large bodies to understand long life spans

Before the robot can take to the skies as a standard research tool, it needs to prove its worth. It’s still unclear whether whale mucus can provide consistent measurements of hormones and DNA that are needed to study the monstrous animal.

Whale blow is a diffuse matrix, and it’s heavily contaminated with seawater,” says Liz Burgess, a marine biologist at the New England Aquarium in Boston. That’s fine for simply detecting which molecules are present in a snot cloud, but consistently getting a precise concentration of a stress hormone? Forget it. “It’s definitely not that easy.”

Burgess studies whale blow too, but grabs it the old fashioned way: with a 30 foot pole. She says using drones and traditional methods together might eventually be an ideal situation.

Ocean Alliance is developing other drones besides SnotBot, like FLIRBot, which can detect infrared light. Researchers could measure whales’ body temperatures just by looking down their blowholes. They also have EarBot in the works; it lands on the water, powers off, and listens for whale calls.

EarBot Drone

Ocean Alliance has other drones it plans to deploy to study whales and other marine life. Earbot, pictured above, can land and float on the water as it listens for and records whale calls.

Christian Miller

There’s no doubt drones have a place in science. Even the federal government is getting in on the act. The National Oceanic and Atmospheric Administration (NOAA) collaborates with a drone project that passively listens for whales. The bot, called Saildrone, monitors several whale populations—including the North Pacific right whale, a species with only 30 living individuals left.

“It’s really important to monitor these animals in any way we can,” says Jessica Crance, a biologist at NOAA’s Alaska Fisheries Science Center and lead acoustics researcher for Saildrone. Passive acoustics, Crance says, seems to be the best way to do that.

Saildrone is 23 feet long and 15 feet high. It’s been deployed in the Atlantic Ocean, the Gulf of Mexico, and in the Bering Sea where North Pacific right whales live. The drone is motorless and relies on a combination of battery and solar power to turn its sails and navigate. Researchers simply input coordinates and the drone will get there.

These bots are especially helpful for species like the North Pacific right whale, which are hard to spot because they seldom come to the surface. Saildrones can silently sit on the waves, listen for the whales to start talking, and then track them. And because they can stay at sea for many months, Crance hopes to use them to plot migration routes. That could be crucial data for species conservation; if researchers find that a swath of waters in the whales’ migration route has been uncharacteristically warm, for example, or has less food available, they might be able to pinpoint why so much of the population has died off.

But this project, too, still has hurdles to clear. Researchers are still working on making the sound recordings clear enough to identify distinct species vocalizing beneath the waves.

“The dream would be to have these recordings be clean enough to monitor for any species in the Bering Sea,” Crance says. “If we get there, we could use this as a real-time tool—if we heard a right whale vocalizing, we could alert and divert any vessels nearby.” She adds that the tech is being used to study other animals besides whales, too, like fur seals and various fish species; using multiple Saildrones and technology akin to sonar, researchers can triangulate the positions of these animals as they migrate and shift habitats.

Drone tech isn’t always a magic wand for making research affordable and easy, however. Megan Ferguson, a marine ecologist for NOAA, looked into using ScanEagle, an aircraft-like drone that’s been used by the military, as a replacement for manned aircraft to count whale populations from the skies. Her 2015 study found that the two methods estimated the same number of whales, but using ScanEagle required far more labor and resources.