Friday, December 15, 2017

Instructable

My Proximity hat Instructable

This was a fun project and I plan on trying some of the other projects and making more of my own.


Friday, December 8, 2017

Proximity Hat Materials

Materials for my Hat

Are you prone to hitting your head, like me. Even though I am below the average height I still hit my head a lot, especially when working on projects by leaning forward or lifting up and hitting my head. Because of this I decided to make a hat with a proximity sensor and alarm in it.
Materials needed At least 2 basic or decorative Baseball caps or other hats, one needs to fit inside the other. $3 each at Hobby Lobby
Arduino Nano, I ordered a 3 pack from Amazon $12 https://goo.gl/EiGoRz
I had also already purchased a 37 pc sensor kit $28 https://goo.gl/Prsx9s
But all you need from the kit is an Ultrasonic Sensor https://goo.gl/Prsx9s Active Buzzer https://goo.gl/Prsx9s and power connector or inline switch.
1 or more LEDs, what ever color you like.
9 volt battery
Soldering iron and electric solder 22 gauge coated copper or F-M wires. I used these https://goo.gl/Prsx9s and just cut the ends off if not needed.
Hot glue gun and glue sticks
Around 2 feet of Velcro, the same color as the hats would be best. 3ft roll $1.49 at Hobby Lobby for the different colors.
Drill and Drill bit that is as close as possible to the diameter of the LED.

Code for my hat

The code I used for my proximity hat.

Here is the code I used, I started with the code from
then added in the code for the LED
#define trigPin 7
#define echoPin 6
#define buzzer 3
int sound = 250;
int pin2 =2;
void setup() {
Serial.begin (9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(buzzer, OUTPUT);
pinMode(pin2, OUTPUT);
}
void loop() {
long duration, distance;
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2) / 29.1;
if (distance <= 30) {
digitalWrite;
sound = 600;
}
else {
digitalWrite;
}
if (distance < 25) {
digitalWrite;
sound = 400;
digitalWrite(pin2, HIGH);
delay(500);
digitalWrite(pin2, LOW);
delay(500);
}
else {
digitalWrite;
}
if (distance < 20) {
digitalWrite;
sound = 350;
digitalWrite(pin2, HIGH);
delay(500);
digitalWrite(pin2, LOW);
delay(500);
}
else {
digitalWrite;
}
if (distance < 15) {
digitalWrite; sound = 250;
digitalWrite(pin2, HIGH);
delay(500);
digitalWrite(pin2, LOW);
delay(500);
}
else {
digitalWrite;
}
if (distance < 10) {
digitalWrite;
sound = 50;
digitalWrite(pin2, HIGH);
delay(250);
digitalWrite(pin2, LOW);
delay(250);
}
else {
digitalWrite;
}
if (distance < 5) {
digitalWrite;
sound = 50;
digitalWrite(pin2, HIGH);
delay(250);
digitalWrite(pin2, LOW);
delay(250);
}
else {
digitalWrite;
}
if (distance > 30 || distance <= 0){
Serial.println("Out of range");
noTone(buzzer);
}
else {
Serial.print(distance);
Serial.println(" cm");
tone(buzzer, sound);
}
delay(500);
}
You should be able to copy and paste the code directly into the Arduino software.
I tested it on both the Arduino Uno Rev 3 and Nano Rev3

Friday, December 1, 2017

Messed up my project

I had so many things planned for my final project with my arduino using an LCD screen.
 unfortunately I had problems with it.


First it took a long time to get the 10k potentiometer I needed them I fried my LCD and one of my Arduino Nano chips.

The problem arrived after I soldered the LCD wires to the Arduino.
I messed up while soldering to the Arduino Nano and used to much solder and ended up bridging the 5v connection with another connection.  Wish I had taken a photo of it but it also shocked me when I turned it on, luckily it wasn't that strong but my middle finger was numb and tingling for a few minutes.  After that my only injuries were all from burning myself with hot glue while adding the Velcro to my new project of a Proximity hat.

Saturday, November 25, 2017

Problems with Amazon

After working on figuring out all the sensors I need for my project I realized I needed a 10k potentiometer which I did not see in the cabinet at school so I ordered a set of 5 from Amazon on Monday 11/20 with a delivery date of 11/22, perfect timing so I could work on it over the Thanksgiving break.  
10k potentiometer that I ordered

But on Wednesday I get home to a package from Amazon a few minutes after it was delivered, so I take it inside and open it up.  Then I see the first problem, it was not a potentiometer.
What I received on 11/22

I long into my Amazon account and request to return the item since they shipping the wrong thing due to the plastic bag having the wrong label on it.  No problem I get to keep the bearing and they will ship a replacement item by Saturday 11/25.
On Saturday 11/25 I get another package from Amazon with a small bag inside the package with a label for the Potentiometers on it once again, problem is that what ever is in the bag is very flexible and light weight.  So I opened the bag and this is what I received in the re-order.
A roll of thin blue plastic of some type, this time I have to send it back to get a refund and order from someone else.
Of course I tried to post a review of the item but Amazon refused to post it since it wasn't actually about the item, or maybe since the photos I included are the same ones I posted above.  Once the other brand I ordered arrives I will call Amazon and complain till they give me a few months of prime for free, their screw-up is delaying part of my project over a week and that is unacceptable.


Monday, November 13, 2017

Elegoo 37 pc kit V 2.0

Tutorials and technical data for the Elegoo 37 pc sensor kit V 2.0 that I ordered.

Most of the tutorials are for kit v 1.0 but most applies to V 2.0
37 Piece specs

Instructable for kit V1.0


Monday, October 30, 2017

Final Project for Monday

Final Processes
Temperature sensor reads temperature.
Shows temperature on LCD readout
Also has 3 different color LEDs,
Blue lights up if temperature is below 50 F,
White if 51-79F, Ideal for storing photographs
Red if 80F or higher along with audible alarm.
Reset/ interrupt to next sensor

Sensor #2 reads Humidity
Shows humidity in % on LCD display Also flashes LEDs on 1 second off 2 seconds.
Flashes Blue LED if humidity is below 40% (can be bad for photographs)
Flashes the Blue & White if humidity is 41-60% ideal for storing photographs)
Flashes Blue, White & Red if Humidity is above 60% (bad for storing photographs) along with audible alarm
Reset/ interrupt to next sensor

Sensor #3
UV sensor reads UV level or light sensor
Displays UV level on LCD screen
Also Flashes LEDs on 0.5 seconds off 0.5 seconds
Blue LED if UV level is safe
White LED if UV is High
Red LED if UV is Excessive along with audible alarm.

Reset/ interrupt to next sensor

Possibly have a control panel or buttons to push to activate each sensor.
Other sensors that might be added include proximity sensor and or a motion sensor to activate the unit.
All of these sensors should be in the kit I already purchased.
37 pc Arduino sensor kit
Instructions for most of the sensors


Get help from others when needed, working with others is great for this project.