My blog has moved to it's own domain!

You should be automatically redirected in 6 seconds. If not, visit
http://mad-laboratory.com
and update your bookmarks.

Showing posts with label Electronics. Show all posts
Showing posts with label Electronics. Show all posts

In Circuit Serial Programming

0 comments

So, I learned a very valuable lesson this week with the PIC microcontrollers from Microchip. In Circuit Serial Programming, or ICSP. I don't know if this is available with other uCs or not, but I'm sure that they would have something similar to this. Please comment and let me know otherwise!!!!!

ICSP is where you can install your chip into your circuit but still be able to program it by using 5 wires (2 wires actually program it, but 3 others support it, Power, Gnd, etc). It's really cool because you can put the uC in the circuit you are ACTUALLY going to use and work with it instead of working with a breadboard, prototyping board etc. Below is a picture of exactly all that is needed in order to program any PIC microcontroller.

SETUP

In this setup I am using the PICKIT 2 programmer. I am using the standard software that comes with the PICKIT 2 to load the hex file into the chip. The chip is the PIC16F690. I am writing code in the Proton+ Development Suite.

The wiring is really simple. You just need a pin 5 header, a PIC microcontroller, and a breadboard. The wiring is specific to this microcontroller, but probably will work for a number of different microcontrollers. See your specific datasheet for details on how to wire up your own microcontroller.

Wiring:
PICKIT2 - PIC16F690
Pin 1 - Pin 4
Pin 2 - Pin 1
Pin 3 - Pin 20
Pin 4 - Pin 19
Pin 5 - Pin 18

**IMPORTANT NOTE**
It took me a number of hours to realize that the pinout on the PICKIT2 starts pin 1 position on the right and goes to the left. In the picture above note the arrow. That designates pin 1.

Results

After hooking up the PIC16F690 correctly it was really simple to load the hex files onto the microchip.

Conclusion

Using the ICSP is really simple, once the wiring is hooked up properly. I plan on including ICSP in all of my own circuits in order to update the software without needing to remove the uC.

It has been suggested that if you are giong to use the specified pins for ICSP to not use them for any other purpose even though it is possible.

LED LIGHTING FOR LAMINAR NOZZLE

0 comments

Here is the video of the mood light for the laminar nozzle water fountain. This is just a proof of concept to make sure that I can build and make it so that I can put it into the water fountain, because a water fountain is cool, but how much cooler would it be if it could GLOW!

The video doesn't do the light justice it has a lot of glare to it. It looks SOOOOO much better in person.

Enjoy the video.


EVERY COLOR OF THE RAINBOW PART II

0 comments

First off, I would like to welcome my new visitors frequent visitors! Please contact me! I'd love to talk with you about my project!

So this is part II because I needed to learn how to fade and mix the RED, GREEN, and BLUE so that I could pick the colors from the rainbow.

How I did it.

Objective:

To fade each of the Red, Blue, and Green colors individually in order to pick the colors of the rainbow.

Setup:

The setup isn't much different from the past post. I just added more to it. This schematic was given to me from Mario a friend in Switzerland! Awesome schematic! It's simple to build and it really makes sense once you study it out.

I used a PIC uC PIC16F690, and the PIC KIT2 starter kit to program the microcontroller. I also used Proton+ to program the chip. The three different signals from the uC went to three different channels, RED, GREEN, and BLUE. Each pin used PWM (Pulse Width Modulation) to control the mosfet.

**NOTE: In the picture above the schematic shows BUZ11, that was replaced with IRFD024 and the resistor R1 was replaced with a 10K ohm resistor. R2 was changed to a 1.8 ohm @ 2W resistor.



The PIC16F690 was hooked up to the mosfet via a resistor (10K). The K2 Star LED was hooked up to power from the LM317 which was hooked up in a constant current circuit constantly outputing 700mA actually something like 705mA if you want to be exact. Essentially how this circuit works is the mosfet is blocking the path of electricty to ground.



Every time the uC would output a high voltage the mosfet would allow the LED to connect to ground and LED would turn on. The voltage would vary, because of the PWM, and allow different level of intensity for each LED. Using this circuit three times over (once for each color) I was able to control the light output for each LED allowing me to mix the color to obtain a maximum of 256*256*256 colors! Well ok, maybe not that much, but it's at least more than.....5! In the picture above you can see three aluminum heatsinks. Each one of those heatsinks has the LM317 attached to it providing power for each LED. =)

Results:


As you can see the results are pretty spectacular! These are just a few of the colors. I was having difficulty with my camera and so most of the photos didn't turn out. But it gives you an idea of what it will look like when you get yours finished!

I'm uploading a video of it changing colors. Once it is done, I will come back and post it.

Every Color of the Rainbow

0 comments




I've made some significant progress this weekend! I extended the Glowy Green LED's to Blue and Red. I also soldered up a circuit to power the LED's instead of just hooking up each part individually. That got pretty crazy really quick with all the alligator clips all over the place. I'll explain more later.

The next part is to use the mosfets to allow the microcontroller to control the brightness of the LED's. This will allow me to change the color and mix them as I desire.

BRIGHTER THAN ALPHA CENTAURI

2 comments

So, I've always been fascinated with mood lamps, green and blue glowy lights. I have, in the past, tried to make my own mood lamps. There is just something about the way that is changes color seamlessly from one color to the next.

So, I'm trying it again. What's going to make this time different and what does it have to do with a laminar nozzle? Both very good questions, I'm glad you asked. The lights are going to be for the fountain. I've always wanted a fountain, and I've always loved mood lights so why not combine them! The fountain is going to have some LED's and some fiber optics which will port the light right up the center to the water. When the water shoots out the light will be able to travel right through the water just like fiber optics.

I have a friend in Switzerland who is doing the same thing as I am doing. We share information back and forth. He has come up with a brilliant way to make the LED glow, and glow bright. Not to mention an easy way to the control the brightness of the light. Thanks to him I KNOW I cannot fail at this task.

Currently I am just working with 1 Green 5W K2 star from Luxeon. This light is soooooo bright. The one light can light up the entire room as shown below.
Just to give you an idea of how bright it is, a regular LED (like the one on your DVD player) uses 20mA of current. The K2 star is capable of using up to 1000mA. That's 50 times more current!!!!!!!




Because it uses so much current you can't turn it on without it being properly heat sinked. That's what that hugh chunk of Aluminum is. The heatsink helps draw the heat away from the LED and a fan blow over the aluminum and cools it down.

Just so you know this is only 1 LED. I'm planning on have at least 3 more if not 7 more. I will also need to purchase some fiber optics in order to port the light into the fountain. This will be a challenging but really rewarding task once it is completed.

Underwater Tests

0 comments

So a very smart friend of mine brought up the point of the mechanism working underwater. I didn't know. So I had to find out.

Test
Cutter Mechanism Underwater test

Objective:

To observe whether the mechanism will work in an underwater environment.

Introduction:

The cutter mechanism is going to be used in order to deflect the water from the air to the underwater piping system giving humans the illusion that the water is jumping. Each nozzle will be timed in such a way that the water will appear to be jumping or leaping from place to place.

In order to cut the water the Cutter mechanism will push and pull a plate in from of the orifice in order to deflect.

We must be certain that water will not affect the mechanism. The mechanism must be able to cutter the water in either a partially or fully submerged environment. This test is designed to find out if the water will cause any problems. We are particularly concern with the solenoids and how they will perform.

Setup
The setup for the cutter mechanism is the same as the setup in other cutter mechanism tests with the small addition on waterproofing. I applied a liberal amount of hot glue to the connections and any point that might have a leak.

I filled a 5 gallon bucket with a small amount of water just enough to cover the mechanism.

Results

The cutter mechanism was suciffiently waterproofed and I was able to contain the magic smoke. The cutter operated as designed.

The video below show the results.



Conclusion

The cutter mechanism performed well underwater. The proof of concept was succesful and the mechanism will be introduced into the design.

The mechanism was observed to be a bit slow moving from position to position, but has not be confirmed. However, the majority of the drag is probably due to the vertical plate. The Laminar Nozzle will have a significantly reduced drag since, the cutter mechanism will have a U-channel instead of an L-bracket. This should alleviate any drag induced problems.

Solenoid Cutter Mechanism Video

4 comments

It's really hard to make a movie and think how to explain things clearly. If you focus on explaining things clearly the video is out of focus and aren't even focused on the right part. On the other hand if you focus on making the movie then the explanation suffers. BUT..if you are careful and get just the right balance of focus on explanation and on the movie.....you just get a crappy movie clip.

I try! You get to see some cool moving things though!


Solenoid Cutter Mechanism

0 comments

Since I have my solenoids working properly I started working on the cutter mechanism. Solenoids are really neat mechanisms and if it weren't for them generating A LOT of heat I wouldn't even have to design a mechanism. But they do, so I will!

The purpose of this mechanism is to allow me to keep the cutter open or closed for ANY amount of time. I started thinking of all these neat mechanisms that would allow me to latch the solenoid. These were pretty complex but eventually it got more and more simple. Eventually it came down to this design.

The figure below show the solenoids in the starting position. You can see that the solenoid plungers don't have any magnets attached to them or anything. The magnets are on the brackets at the end. The solenoid at the top is in the on postion, meaning the current is running through it to attract the plunger and retract it. The bottom solenoid is in the off position. I don't have a representation of a hole in this experiment but imagine that the hole is just to the right of the bracket in the middle.

In order to cutter the water the bottom solenoid will turn on, but just for a moment (200 ms). Once the cutter mechanism has moved to the "closed position" (see figure below) the upper solenoid engages the magnets and the valve is now closed and all current is off.


In order to move the cutter mechanism basck to the start the top solenoid is turned on and the entire process starts over again.

I can't say that this is the exact design that I am going to use yet. I still have a few other ideas that I have before I commit to one design, but so far I am pleased with these results.
So I only run current through it to move the mechanism once it arrives at its destination the current turns off and remains in the position until the next solenoid is turned on. That means no excess heat, and remember HEAT is the enemy in electronics.

Solenoid Tests

0 comments

I won’t detail the setup exactly in this post, but I just received my solenoids from Goldmine Electronics and they are awesome. Thanks to Zachary for pointing me in the right direction on that one. I’ve never played around with solenoids, and they are very basic, but what can you expect when you only pay $0.99 for each solenoid. How do solenoids work? Well, when you run current through a wire you get a magnet field. This magnetic field circles around the wire. When you wrap the wire in a coil you get a stronger magnetic field! Wrap it enough times and run enough current through it you can get a large enough field to attract an iron core plunger. When the current turns on the plunger is attracted and retracts. When the current turns off a spring returns the plunger back to its original position. That’s the basics of a solenoid.

Drawbacks:

Solenoids need a large current to run through it in order to create a large enough magnetic field. Since nothing is a 100% efficient you get a lot of HEAT. Heat is the enemy in electronics. If things get too hot things burn up and solenoids are no exception. So you can only run them for about 25% of the time and they have to rest for 75%. That is going to make it difficult for the cutter mechanism. Since I want to be able to keep everything open or cut the water at ANY given time, I will have to think of a clever mechanism that will hold the cutter in its proper place one the solenoid have moved it to its desired position.

Understanding Transistors Demostration Video

0 comments




So here it is in all it glory. The video is pretty boring and I don't do a good job of explaining everything or anything for that matter. Perhaps you can glean some information from it anyway.


So why do we even care about the transistor and the fact that it can turn the DC motor on and off? Well, the simple answer is...you don't care. The more involved answer is that the DC motor won't be in the application, but it is in place of the solenoid. The solenoid will actuate the cutter valve that is yet to be determined. I have a couple of ideas of how to make it work, but I will spare you the details....for now.

Other concerns:

Drainage: I don't know exactly how or where to drain the water. I need to either have a very robust drainage system or a water return system and pump. The water return system is better since there wouldn't be any flooding, but it is clearly a lot more complex.

Water pressure: Since I will essentially running 8 nozzles constantly I am worried about the ability to keep all the nozzles pressurized in order to make all of them work properly. I think that if I can figure out how many gallon/minute my sprinkler system puts out I can figure out what the water pressure will be as the flow rate and how high they will be able to jump.

Solenoid/Servo: I've been playing with a servo motors as well. **That will be my next post** I like servos because of their simplicity, but I'm not sure that they will be quick enough in order to give a proper cut. Solenoids have the tendency to burnout if run to long. The solenoid that I am working with will (from what I've read) can only be on 25% and has to be off 75% of the time otherwise it will "burnout. If I can water proof the solenoid then maybe I could have water cooling them off, and then I wouldn't have to worry about burnout.

Manufacturing: Seeing as I only have a drill press manufacturing these can be difficult. I have to find a company that will be willing to take on my small little project. If anybody is interesting in me making some of these nozzles for you let me know now because it will be cheaper for all of us!
There are going to be 2 parts that I can't manufacturer at my house. Those are the brass nozzles and the clear plastic (lexan) to hold it in place. In previous post where I show some of the results from the nozzle I was just using the plastic cap as my nozzle. I believe the reason that I was getting those, "veins" or "rifling" in my water is because of the slight (and I mean slight) inperfections in the orifice. The plastic can't hold a sharp enough edge in order to get that brilliantly clear stream. Since I am making a special brass nozzle I need something to hold the nozzle in its place. I will post some picture of the entire nozzle once I get a model made up.

Tasks:
1. Find the Flow rate!
2. Test solenoids (when they get here.)
3. Find a manufacturer for the brass nozzle, and lexan pieces.

Understanding Transistors

0 comments

So what does electronics have to do with Laminar flow fountain nozzles? EVERYTHING! I think I have the nozzle design pretty much nailed down. There are still a few question that I need to answer but those will come in time. I have to wait on some manufacturers to give me some quotes on making my brass nozzle orfice before I can make more progress on the nozzle. So my attention has been turned to the cutter valve. I've been doing a lot of research on this and I've found out that they don't cut the water before the nozzle they cut it after it leaves the nozzle. Why? My suspisions are that they have to in order to make it look clean and cut. If you have a valve that shuts off the water before hand then it won't have a clean cut to it and most likely will slowly die down. Likewise, when you open the valve it would take a second for it to start back up again.

So I've been researching motors, solenoids, and servos (which I guess technically they fit under the motor category, but it sounds more impressive if I have more categories). I started with solenoids because solenoids are CHEAP. I found some on a website for $0.99. WOW! I never knew that, but I guess that makes sense. It's just a couple of windings around an iron core. I have 8 on their way, and I should have ordered more since they were so cheap.

So a solenoid is just a push/pull type of motor. Actually it just pushes or pulls but not both. There is a spring that helps the shaft return back to its orginal position. My microcontroller that I am going to use to open and close the cutter valves can only output 5V and 40mA. So I need a way to get the voltage and the current up so that I can actuate the solenoid.

That's were the Transistor comes in. I read about them in the past, but never understood them. This time had to be different. So I went to radio shack and picked up a couple of different transistor based on my research. Since I don't have my solenoids I subsituted a DC motor that operates at 12V. I put everything together like I read. And it WORKED, kind of.....it worked but slowly. This wasn't good enough because I knew that the solenoid would need to draw more current than was being supplied to the DC motor. So it was back to the drawing boards. I looked over and over again trying to figure out what was wrong. As it turns out I'm not exactly sure what I was doing wrong, but I must have been hooking it up wrong or something. What I ended up doing was ripping everything out of my breadboard and started hooking things back up. When I turned it on everything was working just fine! I don't get it. I SWEAR I was hooking it up properly before! Oh well, at least now I have a working example to work from. I made sure to document everything I did so I can reproduce it in the future.

I ended up still using the TIP31 or TIP31A (I can't remember which one). I hooked the 12V to the motor and then the motor to the collector. The emitter was hooked directly to ground. The uC was hooked to the base via a 2K resistor. I made sure that the ground used for the uC was connected to the 12V ground so that I had a common ground.