Week 9: "Input Devices"

I put "input devices" in quotes, because, true to form, I ended up working on week 7: embedded programming instead.

This week's assignments: measure something: add a sensor to a microcontroller board that you have designed and read it

Thinking ahead

At the rate electronics have been going, the final project has been a huge source of fear.

To try to alleviate some of my anxiety about the final project, I peppered Jiri with a bunch of electronics questions during our meeting, and got a lot of helpful advice. More on that here. After that, I found Zach and asked him about Bluetooth, and he very kindly gave me three different BLE chips to use. I'm currently in the process of Googling various tutorials on how to use them, with hopes that I can figure out how these fit into my final project.

Ideas for this week

Input devices lend themselves to a lot of ideas.

Right after lecture on Wednesday, I dreamed that I was in an ideal world, where I had a lot of electronics expertise, and declared that I wanted to make a sensor that used capacitance to detect the difference between a drink that was spiked with a drug and a drink that was not. I got really excited about this, and started Googling the most common date rape drugs to see if they would have properties easily detected by a sensor. I happened upon gamma-hydroxybutyric acid, which is not only a very common date rape drug, but also one that (from an organic chemistry standpoint) seems frighteningly easy to synthesize:

That terrifying fact under my belt, I came up with a way to synthesize a version of GHB that would not have the same properties that make it a class I controlled substance, but would probably retain some of the properties that would allow it to be detected; namely, the slightly acidic hydrogen on the end with the alcohol (the -OH functional group), and the more acidic hydrogen on the end with the carboxylic acid (-COOH). This involved starting with valeric acid, which has one more carbon on its carbon skeleton than GHB, and repeatedly oxidizing it to first form an alcohol, then a carboxylic acid. This would probably yield a mix of products, but those could be separated later. As an aside, it's pretty ironic that anybody (including myself) could buy chemical starting materials and reagents required to synthesize a very, very dangerous drug, but that alcohol is restricted to those 21 and over. So, I could pretty easily find a way to make GHB (I won't because that's immoral and illegal), but would have a tough time purchasing alcohol. Weird. In order to make a sensor to detect spiked drinks, I imagine I'd need to first spike a drink, but it seems that obtaining materials with which to spike a drink could actually be about as easy to obtain a drink. That's kind of scary.

Working on week 7 instead

Back to reality

After jumping down that rabbit hole of chemistry and dubious moral issues, I realized that a more realistic thing to focus on this week would be to get an LED to blink, which was difficult for me two weeks ago. One day, I'd like to be good enough at this to make a sensor to detect drugs in a drink, but that will probably have to wait until I can actually program boards and legally posess alcohol. I went back to my schematic from week 7 and fixed the missing trace, milled a new board, and stuffed it. I'm pretty happy that this part of the workflow is now really easy, and these first steps went without a hitch.

Programming

Hoping for the best, prepared for the worst.

Unsure what to say here, because I feel like my soldering and milling was fine, but the LED would not turn on. I brought my board and schematic to Zach, Jack, Eyal, and probably some other people, and followed various tips, but could not get the thing to work. This is pretty concerning, because I feel like at this point I should be able to get a simple LED to turn on, but it's not happened for me yet. After a frustrating while of resoldering and pursuing various pieces of advice, I had to call it a night. Hopefully, I can get this to work in another week, but I'm currently too frustrated to properly debug.