Showing posts with label ENTR 390. Show all posts
Showing posts with label ENTR 390. Show all posts

Friday, October 21, 2016

Project Idea Refinement

Candidate:
Idea 2: Audio control system.
What problem are you looking to solve?
Audio volume issues when using a speaker system
What potential solution(s) have you considered for this problem?
Aside from the IoT solution of intelligent control of volume and other factors, there remains little that can really be done to solve this issue. Perhaps a sound engineer would know more about it. Maybe tearing down the entire room and rebuilding it for better acoustics? That’s definitely not practical, no matter how rich you are, and the return on such a project would be minimal at best.
How might you integrate IoT concepts?
The IoT solution is to have a bunch of Photons or other devices scattered around the room. They each have sensor(s) that can detect different aspects about the audio in the room, and they all report those readings to another device that is controlling the audio device of the room.
1 minute pitch draft:
“Everyone’s heard of audio feedback before. The dreaded ‘eeeeEEEEE’ that keeps getting worse until you turn down the volume or shut down the entire system. What I’m proposing is a way to solve that issue, once and for all. Thanks to the handy Particle Photon, an accompanying audio sensor, and some programming knowledge, we can hook up a bunch of these around a room and use them to automatically control the volume of audio systems so that they’re just the right volume. We’ll start small, in college lecture halls. From there, we can expand to presentation rooms, and finally into the home. The future of self-regulated audio is here.”

RIP this idea

Friday, October 14, 2016

Transmission Control Protocol is a Thing of Beauty

Particle Photons are Quite Versatile

You can do so much with a Photon. IoT stuff, yes. Especially with Particle's built-in cloud services. But there's way more than they can do.

The Basis for the Game: Pong

I've spent over a year of time by now working on a Game Engine using Java. So far, the one game implementation that exists is the classic game of Pong. The details are a bit complicated, of course, but every single game runs of a Client-Server basis. By creating a Client implementation using the Photon, it was possible to turn the Photon into a wireless controller for Pong.

Hardware

The hardware consists of a Photon as well as a breadboard, two buttons that act as up and down controls, and a bunch of wires and resistors. The breadboard itself doesn't look very pretty.
Of course, it doesn't have to. It's a prototype, and it works. That's what matters. But what good is this hardware without accompanying software to actually make it work?

Software

The software of the Photon is based on the same software as Arduinos, allowing much compatibility. In addition, Particle has provided many useful libraries in addition to the default Arduino ones that unlock additional functionality that the Photon and other Particle boards have the hardware capable of using. Among the others, there is the class TCPClient, which is what it sounds like. When used in conjunction with a TCP Server, no matter what the source, TCPClient allows for the transmission of data across the internet. Of course, in this case, the client and server are right next to each other. But by the nature of TCP, as long as both devices are connected to the internet (and not firewalled or whatever), it is possible to communicate between the devices. Compared to Bluetooth or other near-range communications, using the internet effectively extends the range to anywhere in the world.

Of course, anywhere in the world is a bit optimistic, as this is Pong after all. There is no way that the Photon is powerful enough to display the real-time playing field of Pong, at least not with the fidelity required to play it well. Thus, the Photon is effectively tied to the computer displaying Pong, a sad reality for the once-limitless Photon.

Communication How?

On the Java side, the server makes use of Java's SocketChannel, ServerSocketChannel and ByteBuffer classes. The server itself runs based on the tick model. Any data that needs to be sent is aggregated until the end of a tick, when it is sent all at once in a manner similar to Nagle's algorithm. A separate thread exists to read packets received by the TCP and UDP channels so that processing is possible as soon as a tick begins.

The Photon uses the Firmware's built-in class TCPClient, akin to SocketChannel. But before it can connect, it has to know what to connect to. That's why functions to set the host address and port are exposed using the Particle Cloud. Via the Particle app, it's possible to tell the Photon what to connect to. From there, the TCPClient instance attempts to connect to the ServerSocketChannel on the server. If all is done properly, including setting up the host, then the Photon will connect to the Computer and the game will begin.

Using the two different backends is no problem, however, as they are unified by TCP (and UDP, but it's not used in this case). On the Photon, all the packets received are discarded, as they wouldn't be useful anyways. However, it does send one packet to the server in the format of an Input Packet. What goes into that packet? Time to find out...

Anatomy of a Packet

So what goes into the packet that's sent? Well, every packet sent has its ID as a 4-byte int added to the buffer first. Then, all the data that the packet contains is added to the buffer. In the case of the Input Packet, its ID is 6. So the integer 6 is written into the buffer as 00 00 00 06. The data of the input packet is a 2-byte short that specifies the player number, and a 1-byte byte that specifies the direction that the player wants to move the paddle. The player number for the Photon should always be 1, so the player number is written to the buffer as 00 01. The direction that the player wants to move is dependent on the buttons pressed. Internally, the directions are known as 1 for up, 0 for stop, and -1 for down. However, these values are known internally as 01, 00, and FF respectively. Finally, the end delimiter is written as a substitute to the next Packet ID, which is the minimum value for a signed 4-byte int. The internal value of that is 80 00 00 00.

Overall, the packet is thus 00 00 00 06 00 01 DIRECTION 80 00 00 00.

Prove It!

The following shows the Wireshark analysis for the data. From here, we can see a few things. The Photon's IP is 141.213.30.71, so we're looking for packets sent to and from that. The highlighted packet shows one sample of input packet. Obviously, this is way more than 11 bytes of data. 88 bytes, in fact. This is due to the fact that the Photon's delay is only 5 milliseconds, which allows it to send many different inputs which are aggregated together. The server only processes the first one, as the end delimiter is encountered right after it.

Looking at just the first 11 bytes, we see that the data are indeed correct. Awesome!

Sunday, October 9, 2016

Project Idea Research

Problems that Exist Today in Education and Healthcare, and Possible IoT Solutions:

  1. Logistical/Supply Chain issues: Keeping track of inventory and stuff ordered
    • IoT Solution: Photon with special attachment mechanism – potentially 2 sets of extendable straps. Power is provided by battery, and is only turned on when both are connected. From there, all the metadata about the package can be entered via a web interface, and all the data can be stored in the cloud if desired, or possibly on local servers. The Photon is kept in a low-power mode and woken up by an inventory request. At that point, it should be delivered to its intended destination. If tracking is desired, it is possible to activate Internal Positioning making use of the onboard WiFi, or other technologies if WiFi is impractical.
  2. LECTURE HALL AUDIO EQUIPMENT being too LOUD AND HURTING EARS
    • IoT Solution: Several Photons positioned around the lecture hall, all with some sort of method to pick up audio. Use software to determine whether audio being received at these points is too soft or too loud, and automatically adjust so that the volume is as close to an ideal level as possible.
  3. Lights and other utilities being on with nobody around
    • IoT Solution: An array of sensor and Photons working to process the presence of people within a room. If no people are detected, then the lights can be dimmed or even turned off.
  4. Impatient Patients
    • IoT Solution: Give each doctor/nurse a Photon (potentially in their pockets) and use existing AP’s and Internal Positioning Systems to triangulate position and make impatient patients somewhat calmer.
  5. Smoke Detectors that GO OFF FOR NO REASON
    • IoT Solution: Photons scattered throughout the buildings whose readings of temperate and other metrics also affects the decision for the sprinklers and alarms, etc. to go off. The photons and smoke detectors should be weighted equally, but fire alarms should override both and immediately call the system into action.
  6. Inaccurate Diagnoses that lead to billions of wasted dollars on treatments for aliments that aren’t even the problem.
  7. Bathrooms. Even in the most hygienic of places, such as hospitals, the bathrooms with inevitably be dirty. That’s quite an issue for both healthcare professionals and patients alike…
  8. Malfunctioning technology that may not seem like much… but over time adds up in lost time teaching and doing hospital things. As we grow more and more dependent on technology, we will also learn its flaws.
  9. Cybersecurity. Though applicable to almost any field, education and healthcare are probably the most in need of good security against breaches, beit hacking or ransomware, as they often contain very sensitive records that the institution needs to function and should keep private.
  10. Speaking of those records… more efficient record keeping. No doubt there are already decent databases in use today. But there are some cases, such as transferring schools or hospitals, which should automatically transfer records, among other possible improvements.

Sunday, October 2, 2016

The System Diagram & Identifying the 5 System Components

Consider the original Edison electric bulb, as well as the Philips Hue bulb. Diagram the 5 system elements in each case. What additional system(s) has to be present for the Philips Hue to work? Can you diagram it?

For the original Edison electric bulb, the system diagram is quite simple for the bulb itself. It requires electricity of some sort, so its source is from a power plant. The distribution system is the electric grid, and the packaged payload is the electricity itself. The tools are the bulbs, and the control system is the light switches that we all know and love.

The Philips Hue, however, requires a few additional components in addition to the simple electricity delivery that the classic light bulb needs to function. It also requires the information as an Internet of Things device to function properly. In that case, the source is the user's phone (typically), the distribution system is the internet, and the packaged payloads are the bytes that comprise the information needed to control the Hue. The tools are the Hues, and the control system is once again they user's phone.

Consider self-driving cars. Identify (& diagram) the 5 system elements needed for self-driving cars to work?

Self-driving cars are a curious case; a long sought-after technology that always seems to be so close, yet so far at the same time. In any case, the thing that allows humans to drive cars is one thing: our ability to take in and process information. The same must be possible for self-driving cars. Instead of organs and a brain, however, self-driving cars have sensors and most likely some controller within the car itself. The packaged payload is once again information, this time in the form of bits and bytes instead of electrical impulses. The tools are again the control system of the car, and the control system is the computer within the car.

If you have a choice between making very smart or somewhat less-dumb roadways, which would you choose & why? How would you improve safety?

Of course, one car is not an island. Self-driving cars will of course be required to work with each other in order to make sure that they coordinate and do not crash into anything. Roads may be one of the keys to providing that information, though there are also other ways to do it. From a certain standpoint, making roads as smart as possible seems like the best thing to do. They could tell cars what condition they are in so as to promote slower driving in harsh conditions, as well as communicate the presence of non-vehicular presences on the roads like deer. They could also provide quite precise location detection of every car on the road. All this technology, however, comes at quite the price, int both upfront and maintenance costs, and most of them can be supplied much more easily with existing infrastructure. GPS can allow for location tracking. Meteorological services can be correlated with road conditions, and unexpected presences in the road are being dealt with even now, with proximity detection and automatic braking. So, instead of making roads wicked smaht, we can make the cars driving on them smarter and tap into existing technologies to get the same information those roads could provide.

As for safety, that is where coordination comes in. Humans are notoriously poor drivers because we are not coordinated at all; the root cause of traffic jams and accidents. If every single car on the road was self-driving and communicating, then those issues would cease to exist. Traffic jams would no longer be an issue, and accidents would be cut to 0: so long as every car is working together.

Now, how would they communicate and work together? Obviously, having one, or even several centralized computers probably won't work. The data from billions of cars, all having to be polled in real-time may be too much to handle, and if a supercomputer capable of doing such a thing did exist, imagine the cost of running it! Also, imagine a scenario where a deer suddenly leaps in front of a car in Russia. If the car has to transmit that data to a server elsewhere, then wait for the server to make a decision, it may be too late. Time is measured in milliseconds; too long a time waiting for such decisions could cost lives.

Instead, localize the communication. Have each car be powerful enough to make decisions on their own, and communicate that decision to other cars within a local radius. This dramatically cuts down on stress on a handful of supercomputers as well as saves precious time in the process. Even if that one car that brakes suddenly to avoid the deer is being trailed close behind by another, the first car can transmit that data to the one behind it, and so on if necessary. The trailing cars can then brake along with the first one.

Of course, that's not to say that there shouldn't be a few centralized sources of communication. They are still useful for sending notifications to every single car necessary, which may become necessary in cases of national emergency,

Identify the Packaged Payload in (B). How do you make money if you’re Ford? How do you make money if you’re Google? Is the packaged payload the same?

If you're Ford, the Packaged Payload is simply energy in the form of petrol, just like it always has been. You make money off of sales of the car itself, along with any accessory sensor that may be deemed necessary to retrofit older cars, perhaps.

If you're Google, the Packaged Payload is slightly different. Instead of the fuel used to propel the car, it is the information that the car needs to decide where to go. Perhaps it is unentrepreneurial to say that such a thing should not come with a cost. Perhaps it could, and with most other healthy competitive industries, a consumer should have the choice of which control module to buy to control their car. The separate modules would communicate via a universal protocol agreed to by all companies. Differentiating features would include security, personalizability, and performance. If one really wanted to make money aside from upfront costs, perhaps charge some sort of subscription fee to use the module. As much money as one might make, however, I do believe that something as revolutionary and critical to safety as a self-driving car control module cannot feasibly charge a monthly fee for use, only a one-time fee. This will of course inevitably lead to the ethics of business and practices, but we'll cross that bridge when we get there.

Hopefully soon, as the potential for such technology is limitless.

Tuesday, September 27, 2016

Dominant Design

Dominant Design and the Future

The classic computer mouse.

From humble beginnings as just a set of two wheels, the mouse has gone through several designs to reach what we know today. The majority of it was there by the time the trackball was invented: two buttons, left and right. Nowadays, the main difference is in the tracking method: we use much higher precision lasers than the trackballs could ever hope to achieve, and we've added a scroll wheel. Sometimes, there are extra buttons on the side, which come in handy quite often. Sometimes, the mouse is wireless, sometimes it is wired. And although there exist some other designs that seeks to fulfill the same function, such as Apple's Magic Mouse and the Ergonomic mice that promise better form, I personally have never seen a single one of either in everyday use.

How you connect your peripherals to a computer.

The Universal Serial Bus interface has certainly earned its name. Before it came a time of much chaos, with printers, mice, keyboards, and monitors each having their own connection standards. External drives had quite the selection of possible connections as well, from eSata to FireWire. Sure, all of these still exist in some capacity today. One might need a PS/2 Mouse/Keyboard to access the BIOS before the computer can load USB drivers. And if you're one of the people with the first gen iPod classic, you can thank Steve Jobs for using FireWire. But we've seen quite the jump in USB recently. From a maximum transfer speeds of 480 mb/s with 2.0 to 5 gb/s with 3.0, and now 10 gb/s with 3.1, the technology is advancing quite rapidly. Printers are now almost exclusively USB enabled, as are mice, keyboards, and external drives. And with the advent of Thunderbolt 3 via USB 3.1 type C, we're even seeing power, video, and even external graphics processing all over this one tiny little cable. It took a while, and it still has a ways to go, but Universal is right.

Phones.

Yes, phones in general. Landlines have gone the way of the dinosaurs, at least for the average household here. As for mobile, we've gone through so many different iterations of designs, from the bulky and somewhat impractical cellphones of the past to the flipphones that everyone loves to make fun of, and even phones with pullout keyboards. But now, we're left with just one design: A touch screen, few physical buttons to interact with, and a sleek design that many would never have thought possible in the past.

The mattress you sleep on.

Sure, there might be different alternatives to what you put inside it. Springs, water, synthetic foams, all that stuff. But on the outside, almost every mattress is the same: a really, really heavy rectangular prism.

The shirt you're wearing.

Though it may be partly due to fashion changing, we've seen several different designs, from the loincloth to the toga all lose out to the simplicity of the t-shirt.

Designs Currently in Education and Healthcare

  • Smartboard: From the chalkboard to the whiteboard, and finally the smartboard. In addition, it also replaces those slide projectors that were so finicky to get working.
  • Flipped Classroom: This one's quite the innovation, I believe. instead of teaching every student the same way, then having them practice outside of class, reverse it. Change it up. Have students study outside of class, which gives them the freedom to do it however they learn best, and have them practice and ask for additional guidance in class. Perhaps this is the best way to implement Common Core.
  • Big Data: As the world inevitably grows more connected, more and more data is going to exist, whether we like it or not. Healthcare has one of the fastest growths of metadata out of any industry, and it's not slowing down. More data does have some privacy implications, but ultimately it is a boon to those in healthcare.
  • The Coming of AI: With all that data comes the responsibility to process it, however. Artificial Intelligence is definitely capable of doing just that. The biggest player is IBM's Watson, who claims to be capable of helping every position within the healthcare industry and beyond, something I am quite confident in.

So what's going to be the next big thing?

Education: Flipped Classroom
Healthcare: AI

10+10... Kind of?

Lighting is hard.
This is the 10+10 sketching method, or at least my take on it.
How do you accurately control a computer's sleep state?

This first page deals with broad ideas:
This second page deals with one concept that I decided to  zero in on: An internal positioning system, akin to GPS.
 Finally, another focal point: triangulation of position using WiFi/Bluetooth.

Monday, September 26, 2016

Reading + Reflections on the iPod introduction video from 2001

Entrepreneurial Design, or Philosophy?

I never signed up for Philosophy, yet here I am doing somewhat philosophical stuff. I guess I don't have much of a choice.

The Nature of the Beast:

It's important to keep in mind the truth about the field of innovation and entrepreneurial design. For every success story, there are hundreds, or even thousands of failures. History only remembers the successful ones. For those who can't quite make it, it's quite the opposite. No matter how many articles are written and press releases held for them, they are destined to fail. Perhaps due to mismanagement of the project; perhaps due to - no fault of their own - being simply glossed over and forgotten. In a few decades, we might see a few of these still surviving and thriving. But the final destination for the vast majority of these is far from million or billion dollar valuations.

Playing the Cards:

Ideas are a Dime a Dozen; Execution is Key:

In this startup world of ours where anyone can get funding (beit from Kickstarter, its shady counterpart Indiegogo, or the plethora of sites that somehow manage to be even shadier), ideas are worth quite little. There is no such thing as the million-dollar idea anymore. In a world with over 7 billion people, chances are there's someone else who's got the same idea you do. The trick, then, lies in how you see that idea through. It doesn't matter if you've got the idea for solving world hunger, global warming, and P=NP all at once if you can't execute it. Need any evidence? Basically any episode of Shark Tank will do just fine. There's almost always someone who has mismanaged an idea badly enough that Kevin O'Leary tears them apart for it, and rightfully so. Completely viable and marketable ideas have been flushed down the drain due to poor execution. Shame.

Competition, Competition, Competition:

Making execution all the more important is the fact that competition exists. With ideas out in the open thanks to the internet, there's little chance that someone else isn't doing what you are already. The free market, then, is what decides which products float, and which ones sink. Take package delivery via drone, for example. Amazon has promised its new "Prime Air" service as "a future delivery system from Amazon designed to safely get packages to customers in 30 minutes or less," a lofty premise that nonetheless seems to be getting more real every day thanks to advances in technology. But of course, they're not the only ones exploring that market. Mercedes-Benz and Matternet are now also in the mix, working together to achieve something quite similar, and there are bound to be countless other companies scattered throughout. The competition is intense, and everyone wants a piece of the pie. Who eventually gets that comes down to consumer preference, of course, but there are several factors that directly correlate to that:
  • Marketing
  • Form
  • Function
  • Release Date
These factors all play quite an important role in products and the market. It does not matter how good you product looks and acts if nobody knows what it is, or there are already plenty of similar products on the market. At the same time, releasing an incomplete product early while spending important R&D dollars on marketing instead leads to an underwhelming product, disappointed customers, and a tarnished reputation (*ahem* No Man's Sky, though there are plenty more examples out there). It becomes a delicate balancing act, one which startups may not be able to sustain on their own. But with startups at the heart of innovation due to their "nothing to lose; everything to gain" mentality, it may well be worth the risk. For those that don't quite make it, well, in a few decades, the world will have forgotten entirely of their existence.

The Steve Jobs Way:

Few can deny that Steve Jobs was a legendary innovator and businessman. Even being kicked out of his own company didn't phase him, and he made his eventual triumphant return. Just what made Jobs such a brilliant orator, though? What did he do right?
Let's examine his introduction of the first generation iPod. Such a product was completely new, and was given a target market of everybody, because it's "A part of everyone's life." And Jobs does this quite well. He introduces the market, and the fact that there is no market leader. He mentions the digital music revolution, and how he believes that Apple will lead it.
He gives several alternatives to the iPod, and dissects exactly why each alternative cannot stand up to the iPod in terms of price/song, essentially telling the consumer in the most objective way possible that the iPod is the best way to get portable music.
As if that wasn't enough, he seems to never run out of ways in which the iPod and all the other products of the Apple ecosystem it's built around are better than anything else. Automatic integration with iTunes. Comparability with iMac. Long battery life. Fast file transfers. And all that in the contained in a device the size of a deck of cards.
For the time, this device truly was revolutionary. And Steve Jobs did quite a good job telling the world exactly why it was.

Sorry I had to.