日本漫画无疑岛漫画

日本漫画无疑岛漫画

Thursday, January 1, 2015

First things first...

Happy new year!
Hello all! I know it has been a long delay yet again, but I am still chugging away. I have not forgotten about any of the projects that I wanted to post updates on and I plan on doing that soon. I also have a host of other projects to start that I am looking forward to sharing!

That is all for now! I hope this new year is full of projects!

Mike

Thursday, October 30, 2014

Another tip....

Hello again! Nothing big this time but I think this tip may be handy for some makers out there.

Here is the problem I was facing:


My mini Stash-N-Go organizer is a mess of small parts that are easy to mix up, especially when many share the same attributes, such as water clear LEDs.


Here we have one of those water clear LEDs, this one happens to be red in color.




Here is my solution to easy identification of these such parts that may get mixed up in a bin or other container. While it is time consuming at first, but as a collection grows of "experimental" parts, this will save time in the long run. You will need a basic labeling device with small and easy to read tape. My unit is a basic thermal Dymo Letra Tag that can be bought almost anywhere and I am using basic white background tape in it. The first step is developing an organizational system for your parts, see my early posting about organization that could be of help. Since this is a red LED, I decided to call this brand/model R1 for simplicity. I placed a label with R1 in the main bin for these parts and printed out a "flag" for the LED using the smallest font my label maker would print.

Trim down the "flag" to make it smaller:






Wrap the "flag" around one of the pins of the component:



Trim the "flag" again to make it smaller which means less chance it will snag on other parts or "flags":
And you are done! This is time consuming at first but in the long run it is very handy in quickly identifying parts to experiment with, VERY helpful with Zener diodes! This can be used on any part that you want to identify quickly without having to read a code as in the case of ceramic capacitors. Just keep an "experimental" parts bin handy to place these items in for faster experimenting.

Thanks for reading and I hope this tip helps out.

Mike




Sunday, October 5, 2014

Got the time?

 Wow! There must be a full moon or something because two posts in one day about two different projects is odd for me. As the title suggests, this is about the time, temperature, pressure and alarm clock in a cigar box idea. At first the cigar box wasn't on the list but as I was thinking about the enclosure for it, the basic ABS ones are kind of "blah!" and almost cliche. I was looking around my workshop/office and noticed this nice older cigar box that I had been using for junk storage.
I test fit the parts and they sat in with plenty of space.




  The project centers around the Arduino UNO. The main external parts so far are as follows:
From Adafruit:
BMP180 Barometric pressure sensor with temperature. Communicates via  i2c.
The Arduino library for the BMP180 .

DS1307 RTC that communicates via i2c.
The Arduino library for the RTC.

20x4 LCD display

i2c LCD backpack module
Modified LCD library to use the i2c backpack

   Right now the project is in a very basic functional status. No external input is setup and it only displays current time,date,temp and pressure.




   Overall vision is to have a nice looking mounting setup that fits inside the cigar box that does minimal damage to the box. I am unsure of the overall look of the interior, I am caught between an industrial all metal design, a classical wood design or a more modern laser cut plastic look. I am also unsure of the types of switches and buttons to use to compliment the look, does it look better with more or less buttons/switches? All parts will be on one or two PCBs with the Arduino pulled down to a base configuration on the PCB. I will be using a whisker based switch to cut the main power when the lid is closed to conserve power when travelling since the RTC module has a backup cell. I may not use a breakout for the RTC as all parts can be hand soldered. The BPM180 will be a breakout because I lack the ability to perform SMD soldering for parts that small. I am unsure of the alarm clock. I may use a basic 555 timer for the alarm sounds, a more advanced breakout board from Adafruit but I do not know yet.

The code so far as of 05October2014 :

/*
Cigar box Time/Temp/Pressure/Alarm Clock
project.
History
===============
Created by: Mike Dawson
http://mikethemaker.blogspot.com

Created on:04October2014
*/

/*
Notes
==============
*/
//Begin includes
#include "Wire.h"
#include "LiquidCrystal.h"
#include "RTClib.h"
#include <Adafruit_Sensor.h>
#include <Adafruit_BMP085_U.h>
//End includes

//Setup RTC
RTC_Millis rtc;

//Setup BMP085
Adafruit_BMP085_Unified bmp = Adafruit_BMP085_Unified(10085);

// Connect via i2c, default address #0 (A0-A2 not jumpered)
LiquidCrystal lcd(0);

//Begin Variables
String AorP;
String alarmInfo = "Off";
//End Variables

//Begin Custom Functions
//End Custom Functions

//Begin Code
void setup(void)
{
  rtc.begin(DateTime(__DATE__, __TIME__));
  // set up the LCD's number of rows and columns:
  lcd.begin(20, 4);
  lcd.clear();
  lcd.setCursor(0,0);
 
   if(!bmp.begin())
  {
    while(1);
  }
  lcd.print(" Current Conditions");
}

void loop(void)
{
  DateTime now = rtc.now();
  lcd.setBacklight(HIGH);
  lcd.setCursor(0,1); //Sets cursor to second line
  int hr_24,hr_12;
  hr_24=now.hour();
  if(hr_24==0) hr_12=12;
  else hr_12=hr_24%12;
  if(hr_12 < 10)
  {
    lcd.print("0");
  }
  lcd.print(hr_12, DEC);
  if(hr_24<12) AorP = "A";
  else AorP = "P";
  lcd.print(":");
  int min_00;
  min_00 = now.minute();
  if(min_00 < 10)
  {
    lcd.print("0");
  }
  lcd.print(now.minute(), DEC);
  lcd.print(":");
  int sec_00;
  sec_00 = now.second();
  if(sec_00 < 10)
  {
    lcd.print("0");
  }
  lcd.print(now.second(), DEC);
  lcd.print(AorP);
  lcd.print(" ");
  int month_00;
  month_00 = now.month();
  if(month_00 < 10)
  {
    lcd.print("0");
  }
  lcd.print(now.month(), DEC);
  lcd.print("/");
  int day_00;
  day_00 = now.day();
  if(day_00 < 10)
  {
    lcd.print("0");
  }
  lcd.print(now.day(), DEC);
  lcd.print("/");
  lcd.print(now.year(), DEC);
  lcd.setCursor(0,2); //Sets cursor to 3rd line
  lcd.print("Alarm: ");
  lcd.print(alarmInfo);
  sensors_event_t event;
  bmp.getEvent(&event);
    if(event.pressure)
    {
      float temperature;
      bmp.getTemperature(&temperature);
      lcd.setCursor(0,3); //Sets cursor to 4th line
      lcd.print(((temperature*9)/5)+32);
      lcd.print("F");
      lcd.print("  ");
      lcd.print(event.pressure*0.02952998751);
      lcd.print("inHg");
      lcd.print("  ");
  }
  delay(1000);
}
//End Code

I have the power.......supply that is.

   Hello again! As I mentioned in my last posting, this is the first of "many" for the bench power supply. I started working on this project before I realized I should start posting about it so the project is more or less in functional beta stage. During my first few uses of the supply, I discovered flaws in the design that I will iron out. These flaws are not show stoppers but they are annoying.
   Sorry that my projects were delayed but RL has been rather tough lately with a death in the family and other things going on. I also know it seems that I have ADHD or something with the way I bounce between projects but I decided a long time ago to not get stuck on a problem. Instead of banging my head against a wall for days, I put that project to the side and work on something else until I arrive at a solution to the prior problem. I also hate the lead times for parts to arrive so I work on something else while I wait, hence I have about 3 Arduinos laying around in various projects and parts to bread-board more Arduinos if necessary.

On to the project as of October 5th 2014:

   This project is using a basic 12V 3A step down transformer found at Radio Shack with a basic LM317 voltage regulator coupled to a 10 turn precision pot from Bourns to help with fine adjustment. The Arduino is used to read the voltage output from the supply, display it, read the ambient temperature near the bridge and LM317 via an LM35DZ Centigrade temperature sensor then turn the fan on or off  via an IRLB8721 N-Mosfet based upon ambient temperature. Right now the fan is just on or off since it does not play well with PWM (pulled it from an old computer) and it is loud! I purchased a replacement fan and testing so far shows it works happily with PWM and it is very quiet. The first major flaw is that I tied the USB and the logic into the same 5V regulator and that was a bad move because when a USB device is plugged in, the voltage drop changes the reference voltage used by the Arduino causing the voltmeter to not read properly. The other flaw is that the USB port was pulled from an older computer case and is limited on current output, I wanted the ability to pump out at least 1 amp of current to test tablets but it was designed to be plugged into a motherboard header and is clamped at about 250mA to 500mA to protect the motherboard USB chipset. The LCD is a 2 x 16 display from Adafruit being controlled via I2C using the LCD backpack from Adafruit as well.
   Most of he parts were salvaged from my bins with the exception of the POT and transformer. The enclosure was located on eBay several years ago so I do not know if more can be found. I purchased a few of them and still have one unused just waiting for an improvement to this design perhaps.
   Not only did I use Eagle for the schematic and the Arduino IDE for the programming, I also found a great free 2D CAD program called "Draftsight" that I used to layout the front and back panels. I then printed them out as templates and did basic "drill" cutting where I drilled LOTS of holes to pop out the openings. They are rough around the edges but it works for a beta design. For the holes, I drilled small pilot holes then used a hobby tapered reamer to slowly enlarge them until they were the right size, since I do not own any metric drill bits "yet".
   The project is all point-to-point wiring using proto-board from Radio Shack. I plan on laying out a true PCB and etch it for the next phase. This was a "Proof of concept" to test the base design. The insides are a big wired mess! The Arduino was also pulled down to a bare configuration to simplify the design and not tie up one of my Arduinos.

A few images:

The front. The pouch is used to stored leads and USB adapters.
The back. Mains switch, fuse and drill outs for the fan.
Just a simple display view.
Nasty rats nest due to point to point proto-boarding.
LM35DZ temp sensor reading ambient temp to control fan.


The code:


/*
Arduino based voltmeter for variable power supply.
This sketch uses the I2C based LCD backpack and a
16 x 2 standard LCD module from Adafruit. This system will also use an
LM35DZ calibrated centigrade temperature sensor and a PWM controlled fan to
maintain a safe internal operating temperature.

LCD module http://www.adafruit.com/products/181
Backpack  http://www.adafruit.com/products/292

Required LCD library
https://learn.adafruit.com/i2c-spi-lcd-backpack/downloads

LM35DZ information
http://www.ti.com/lit/ds/symlink/lm35.pdf

History
===============
Created by: Mike Dawson
http://mikethemaker.blogspot.com

Created on: 27July2014
Modified : 12August2014
Modified : 14August2014
Modified : 16August2014
Modified : 5October2014
*/

/*
Notes
==============
The LCD circuit:
 * 5V to supply 5V
 * GND to supply GND
 * CLK to Analog #5 , #28 on ATmega328
 * DAT to Analog #4 , #27 on ATmega328


The fan circuit:

The temp sensor circuit:
  * LM35DZ output to A1, #24 on ATmega328
 
The voltmeter circuit:
  * Voltage divider circuit to A0 , #23 on ATmega328
*/


// include the library code:
#include "Wire.h"
#include "LiquidCrystal.h"

// Connect via i2c, default address #0 (A0-A2 not jumpered)
LiquidCrystal lcd(0);

//Begin Variables
int analogInput = A0;//From voltage divider Arduino A0, ATmega328 #23
float vout = 0.0;
float vin = 0.0;
float R1 = 98100.0; // resistance of R1 (100K) -see text!
float R2 = 9840.0; // resistance of R2 (10K) - see text!
int value = 0;
int tempInput = A1; //From temp sensor Arduino A1, ATmega328 #24
float tempData;
int fanDrive = 3; //To MOSFET for fan control Arduino #3, ATmega328 #5
float fanOnTemp = 55.00; //In celcius, for when the fan should turn on or off
float compTemp;
int ii=0;
float voltOffset = 0.2;

//End Variables

//Begin Custom Functions
void monitorTemp()
{
  compTemp = (tempData /2);
  if(compTemp < fanOnTemp) {
    analogWrite(fanDrive, 0);
  }
 
  else if(compTemp >= fanOnTemp) {
    analogWrite(fanDrive, 255);
  }
}

void LcdClearLine(int r)
{
  lcd.setCursor(0,r);
  for (ii = 0; ii < 16; ii = ii + 1) {
    lcd.print(" ");
  }
}
//End Custom Functions

//Begin Code
void setup(void)
{
   pinMode(analogInput, INPUT);
   pinMode(tempInput, INPUT);
   lcd.begin(16, 2);
   lcd.print("OUTPUT:");  
   analogWrite(fanDrive, 0); // Sets the fan to off
   lcd.setBacklight(HIGH);
}

void loop(void)
{
  
    // read the value at analog input
   value = analogRead(analogInput);
   vout = (value * 5.25) / 1024.0; // see text
   vin = vout / (R2/(R1+R2));
   if (vin<0.09) {
      vin=0.0;//statement to quash undesired reading
   }
   //LcdClearLine(1);
   lcd.setCursor(0, 1);     
   lcd.print((vin + voltOffset));
   lcd.print(" VOLTS DC");
   lcd.print(" ");
   delay(100); // analog read delay to allow the ADC to settle between reads
   tempData = analogRead(tempInput);
   monitorTemp();
   delay(500);
}
//End Code




Here is a link to the zip file on Dropbox: Files

Keep on Makin!

Mike

Saturday, October 4, 2014

Again with the long wait....

Here we go again with a long pause between posts. Too many things going on IRL that kept my attention. I have a few actual projects in the works and in beta stages to post here but those will be later. I just wanted to let anyone who reads my blog to see that I am still active, though there was a long pause. The first active project that is in beta is a bench-top variable DC power supply that features not only a traditional power supply but a fixed 5VDC USB connection for testing USB devices, an Arduino based voltmeter, soon to be added ammeter and temperature control via fan and future PWM. The alpha stage project is a time/temperature/pressure/alarm clock unit that I plan on fitting into a nice older cigar box and making it portable. I will be trying to make these projects active "Follow" projects since they will involve a lot of updating as they progress. As usual I will post pictures, schematics and code as I go.


"Sing like nobody is listening, dance like nobody is watching, eat like nobody is counting calories and make like nobody is keeping track of your expenses."

Mike

Thursday, December 26, 2013

Happy Holidays!

   First of all I want to wish all of you a merry Christmas and a happy new year! I know this post is late but that is due to massive celebrations on my end. I also wish to share a small project that I did with parts laying around. I was inspired to do this project after receiving a gift in one of those holiday tins. I don't know about you, but these tins seem to pile up over the years and I hate throwing them out as they are still useful. I decided to turn one into an LED project that can be used as a decoration for next year.

The basic tin in it's unaltered form.

   
A lot of room inside for electronics!

The project is based off of a 4017 Decade counter. Here is where you can get some more information on how it works. A rather simple project but this version does use 15 red and green LEDs in total. The total cost is not very high, I would guess the total parts would cost about $20 and the tin was free.

Here is the schematic:

I took a rather simple approach to this project, using a basic 555 timer circuit as the clock. Feel free to replace my clock circuit with your own. The duty cycle of the 555 circuit can be adjusted by changing out C1 and R1, feel free to experiment.

I also just randomly placed the LEDs in the tin, feel free to plan out an approach. To help with the layout, I searched for a Christmas star image on Google, here is the one I used. It was also necessary to re-size the image to fit the tin's lid better. A solid application to use if a photo manipulation program is not available would be Gimp and best of all it is free!

Here are a few more images of this project:


Star template taped to tin lid

Holes drilled and reamed out to fit LEDs
Testing fit of LEDs
Just about done, notice the hot glue holding everything down,
this is an easy method but be careful! Hot glue is well...HOT!

Done and testing LEDs

Final project on the wall!

As always, you can get the Eagle file here!

Keep on making,
Mike!

Wednesday, December 18, 2013

Long time no update...

   I know it has been awhile since my last update but things around here have gotten busy in my personal life with many things that needed urgent attention. Things have finally started to settle down and now I can get back into the swing of  projects. This is only a small update but I have been working with the rotary quadrature encoder from my last post. I was at a standstill on how to actually read it and get measurable data until I located an Arduino library just for quadrature encoders. Here is where you can find this library, instructions for installing it and a few examples on using it.

   I hope to get my project posted soon!


Keep on making!

Mike