Skip to main content

Posts

Showing posts from April, 2014

on exhibit

I ended up not packaging it, and I was informed by the friend that it is currently on exhibit for her presentation: It'll be on display for a week, it seems. Nice.

packaging

I've spent some time trying to figure out how to solve the 3-state problem mentioned in the end of the last post about this project, but I haven't been able to find a solution I can use right away. I do think the practical solution would be a "wind sensor," a primitive anemometer that would simply just distinguish between no blowing and blowing ("wind"). I would suppose a fan-like sensor would pick up the wind (in a way, a very miniature version of this ). Anyways, I'm thinking that this project should be packaged in some way for presentation sake, and I'm guessing it could be something like this: Of course, the contents would be inside the box, and cut-outs made to make the visible parts visible. Note that the servo can actually work as a lock with this layout. In order to do this, though, it will be great to have a ruler/cutting knife and someone who can use them well.

random things during the week

had one more Arduino Pro Mini ordered, soldered the pieces in once I received it.  also did work on one sizable project that looked something like: somewhat a long story, but the result was - back to square one, will have to attempt again. 

adding a servo

Since I don't have any lock that works based on a digital signal, it seemed appropriate to at least have something in place that would emulate the behavior of such a lock, and I thought that a servo would be a good substitute. (note: a servo is a device with which one can control a specific rotational position) Connecting a servo to the current circuit isn't too much of a challenge, as it just requires a single output connection along with the ground/power. Making the servo also just requires an addition of a few lines of code, using the Servo library . A simple video of the servo in action: Now, at least with a locking behavior in place, the one visible functionality that needs to be addressed is the device's ability to distinguish between a "standby" state (no alcohol/no breathing in: should be in "lock" mode) and a "open" state (no alcohol/breathing in: should be in "open" mode).

cleaning up

Decided to clean up/re-wire the board, as it was a jungle of wires. Did take much longer than I thought it would, but the result is satisfying. clean!

interfacing alcohol sensor with the led

Programmed the Arduino to have the alcohol sensor play with the LED display. I had the display show either "open" or "lock" depending on the alcohol sensor level. Here is the result: Notice that this has a very notable flaw with respect to its potential use as a "breathalyzer lock": it stays "open" as long as there is alcohol present, which only then "lock"s. This means that currently, if you leave it alone (no breathing into it), it will keep the device unlocked. This is something I will have to resolve. code used for this: int del = 5000; int gasPin = 0; int value = 0; int lastValue = 0; void setup(){ //  Serial.begin(9600);   pinMode(12, OUTPUT);   pinMode(11, OUTPUT);   pinMode(10, OUTPUT);   pinMode(9, OUTPUT);   pinMode(8, OUTPUT);   pinMode(7, OUTPUT);   pinMode(6, OUTPUT);   pinMode(5, OUTPUT);   pinMode(4, OUTPUT);   pinMode(3, OUTPUT);   pinMode(2, OUTPUT);   pinMode(1, OUTPUT); } void lo

alcohol sensor (it's working!)

Built a voltage-regulation circuit that was shown here (seems like this layout is uncommon, as other resources seem to agree on using a circuit with a 10uF and a 1uF capacitor. I already ordered a 1000uF shown here, so I'll go with this). Seems to work like a charm. I connected it to the alcohol sensor circuit using a 9V battery as input, but it still did not seem to work: Output voltage was constant @ ~5V. Expected behavior is 5V = maximum alcohol level.  After some thought, I just decided to try wiring the alcohol sensor circuit again. I was almost sure I had the wiring right before, but once I connected it after the re-wiring, output voltage started dropping: Voltage dropping. As stated in the previous post, the sensor requires a 24-48 hour calibration time (to reach 0V state) Two key functionalities are now usable. Time to start putting them together.

alcohol sensor (and some patience)

Soldered the alcohol sensor into something that is connectable: I tried to connect this to the Arduino, as I had the appropriate circuitry, but I did not get any legitimate output from it. 5V going in, 5V coming out with no variations. Nothing seems to be awry in wiring, as the circuit seems to be grounded properly (and the 5V current is flowing).  There are a couple of potential factors as to why I'm not seeing any results: - I'm using a 10k ohm resistor, while some guides (and the datasheet for the sensor) asks for 100-200k. However, there seems to be a good amount of people using 10k and getting at least some kind of result. A batch of 100k ohm resistors I ordered is on its way, so I guess I can try with them when they come. - This site  claims that these sensors take 24-48 hours for its signals to be stable. It also tells me that I should not be powering the sensor directly from the Arduino, which I have been doing, out of concern that the power draw of t

bring (the arduino pro mini) to life

Despite my comment on the previous post about having ordered a new coil of solder, I decided to take a another stab at soldering with what I already have by finishing the soldering of the pins for the Arduino Pro Mini. Surprisingly, it was much easier than the first time. voila! I connected the LED I set up yesterday to the Mini, aligning all the pins together, and lo and behold: much smaller package than yesterday My order for the alcohol detector came today, but I'll probably deal with that the next time I work on this.

warming up

I still don't have all the parts I need to do what I need to do, but I started working with what I had around. I had a 4-digit 7-segment led which I had ordered previously, but for the longest time I had thought I needed additional parts to make it work. It was only today that I realized that that was not the case. Getting some help from this site , I was able to get the digits fired up: This method uses way more wires than this guy  (which uses a serial communications protocol called I^2C), but it's good to see it work. I still do want to try the less-wire led setup, as I would like to try playing around with I^2C. In addition, I had recently purchased an Arduino Pro Mini , which contains all the capabilities of the above Arduino Uno but requires pins/connections to be soldered into the board. I had attempted to solder one part of it (the serial/USB connections) a few days ago (note that this was my first attempt ever at soldering), and the USB-to-Serial interface

time to build something new

I've been making good use of the previous project. It did fail me once (unfortunately, that moment was probably the most necessary situation for the project..), but overall, it has been serving me well. Ever since, I've been constantly thinking about what project I should start on next (or rather if I should even start on something else), but I never really got to thinking up an idea that is useful, not too time consuming, and relatively fun. It took some outside factors to get me started on a new project. A couple of weeks ago, I was approached by a friend in church who wanted advice for a project she has to work on. It was an industrial design project in nature but required electronic functionality. As soon as I heard the general specifications, it spoke "I could be done with an Arduino." I decided it would be a win-win situation to help out by implementing the electronic part, as it is my understanding that the main focus of her project--what's graded--is t