Monday, October 31, 2011

Wireless Infra Red(IR) TSOP Design Tutorial 2

May the peace and mercy of Allah be with y'all.

PART II : IR CARRIER PULSE

You guys!We continue our journey in Infra Red (IR) communication in more practical approach. From the previous introduction article, IR pulse frequency play important role in determining the TSOP IR detection sensitivity level. How do we start?? Below is how we calculate the timing. Lets go!
From the calculation above, we need to light on the IR LED for 12.5us and turn it off for 12.5us. This is for a period/cycle. Repeating this cycle will generate IR LED pulse oscillator of 40kHz!

Go grab your Microcontroller (uC) or any IC that can generate pulse like we discussed. *I prefer uC as I can easily tune the frequency by modifying my code and not my hardware.

Eg : Carrier pulse 40kHz using mikroC and PIC12F629(cute and small uC). We can't set 12.5us delay as the input x to the function delay_us(x) as x should be round integer and not floating number.

While(1)//forever loop IR LED on and off producing oscillating pulse!
{
GPIO = 0xFF; //IR LED on
delay_us(12); //wait 12us
GPIO = 0x00; //IR LED off
delay_us(13); //wait 13us
}

The actual result : Use oscilloscope to probe at output pins.

On time(Delta) = 12.40us
Off time(Delta) = 12.01us

Period/cycle = (on time + off time) = 24.41us ;
1/Period = frequency = 40.9668kHz(Good enough!)


Oscilloscope helps a lot. From my experience, when the frequency is not exactly at the right specification (error = +/-1kHz), the TSOP sensitivity decrease! Some cases, I need to place the IR LED extremely close to the TSOP receiver to make it detectable!!! (T^T). Please verify your frequency pulse generated. Don't 100% trust on the code you write(especially high level coding) for timing restriction coding unless you use assembly language with precise calculation.



Monday, October 24, 2011

Wireless Infra Red (IR) TSOP Design Tutorial 1

May the peace and mercy of Allah be with you.

PART I : INTRODUCTION

More than a years I haven’t post any article in this beloved knowledge-base blog! I miss vortex electrica so much.OK! This time we talk about an idea on how to make a IR communication from scratch!

Component: TSOP4840,TSAL6200(IR LED 940nm wavelength)


I choose TSOP4840(use in my own project) as IR receiver. It was design to be used inside remote control(TV,DVD player..etc). When we know how to design it, we can implement it anywhere such as in robotic project. Below is the internal circuit of it.

From the block diagram above, we can see the internal circuitry of the TSOP48XX. Band Pass filter is the most important part where it can filter out the noise from ambient IR wave.*TSOP4840 (40 = 40kHz bandpass filter,38 = 38kHz,52,36) .

What the bandpass filter do???? it reject any light which have frequency other than 40khz. In non-technical way represented as cartoon below. (^^)

You can read the pins assignment from TSOP4840 datasheet,the circuit for the receiver shown as below/datasheet:application_circuit.

TSALXXXX is a IR LED. Ignore the transmitter part 1st. In my design, +Vs I used is +5V. The OUT pins can be left unconnected 1st to test it functionality. When the voltage +Vs and GND supplied, the OUT value should be high almost ~5V. TSOP48XX working in active low mode, if it detect any IR light pulse ~40kHz,the the OUT pin will be ~0V!

This Infrared receiver(TSOP) only sensitive to an IR light pulse 40khz with 50% duty cycle. From the data sheet, the minimum 10 pulse should be send by the transmitter to make the TSOP able to detect it.Link

That the introduction, in the next tutorial, I'll show you the working example + video!

See ya!

Wireless InfraRed(IR) Design Tutorial 1

Wireless InfraRed(IR) Design Tutorial 2

Friday, June 3, 2011

Announcing The Sketch Plotter Bot!!


The UNO is here!



The sketch plotter bot is now officially on its way to construction. The sketch plotter bot will be an XY plotter using pens/markers as the drawing media.

A CNC machine

Unlike normal CNCs and plotter machines however, the sketch plotter bot will take an image file processed using Processing and sketch an artistic representation of the image instead of line art. Much like the Drawing Machine. After months of contemplations I've decided on using the Arduino platform as it seems to be the easiest to use in terms of assembly, connectivity and especially programmability.
 
The basic parts list for the project is as following:


I just received the arduino, motors and motor shield kit in the mail today and the arduino proves itself to be as good as it claims. In minutes of troubleshooting (installing the driver and selecting the right COM port) and even fewer minutes of coding I got the on board LED to blink.

Blinking LED code:
void setup()
{
  // set pin 13 as output:
  pinMode(13, OUTPUT);    
}

void loop()
{
    digitalWrite(13, HIGH);
    delay(200);
    digitalWrite(13, LOW);
    delay(200);
}
That's it! Good riddance assembly.

Future milestone accomplishments will include videos. I just won't bother uploading a video of a blinking LED. Although the UNO only has 32kb memory it should be sufficient for plotting data. If it isn't then I'll probably resort to multistage plotting.

The next step will be controlling the 3 motors to work together to plot the image. As the motor shield cam as a kit I'll have to take some time to assemble and test it. Controlling the motors using Arduino should be a breeze though as there are libraries available for both stepper and servo motors.What are libraries you ask? Basically they're just code that you don't have to write and can use for your own convenience. Don't worry I'll cover this in the next post on motor driving and control.

Other projects/products worth looking at are:
  • contraptor.org open source hardware kits developed by a couple of passionate guys. The kits are pretty inexpensive for making your own CNC/plotter machine but I'm not ready to spend that kind of money yet. I'll definitely look into the xy-plotter further down the road.
  • The drawing machine kickstarter page (different from the above drawing machine link) all I have to say is:

And as an honorable mention, The no programming LED cube since it's so cool.

As you can see I won't go too deep into technical details or concepts in my posts to maintain focus on the sketch plotter bot itself, but feel free to ask questions in the comments. We'll be glad to answer them.

- dc

Thursday, March 24, 2011

Construct your own DC Power Supply Mark II : Phaserion reporting.


All Glory to the Almighty Allah who governs every detail of our life. No one can do anything except with the will of Allah SWT.

As told before, this is the sequel of the article about Wall Warts before this. So.. this article focuses on more structural insight, which is very simple but saves a lot of money. Before this, I used an adapter which has tuning knobs to it. However, the voltages are fixed with a fixed increment of several values. So... Some kindergarten electronics to kick in!

Initiation

This time, I want more freedom in choosing a voltage, and I have a very good quality adapter for this purpose. The one I obtained looks like this:


A Canon K30155 AC Adapter for printers, where I keep busted printers and managed to scavenge this. The other components below are some of the parts needed for the construction of the prototype; a perfboard, a plastic tuning knob from an ancient radio, a potentiometer and an LM317 Variable Voltage Regulator.

From the adapter, there are two outputs, a 5V/0.2A rail and a 24V/0.55A rail with respect to a common ground. So, I'd like to channel the 25V out to be fed into a regulator, which in our case is an LM317. The LM317 has a maximum current output of 1.5A so the adapter is tolerable for output variation.

The circuit to vary the voltage is very simple, as shown in the datasheet:



Construction

So from the structure of the adapter, it's quite obvious how would it serve its purpose as a Power Supply, where it acts as a platform. Now.. Some imagination would be useful:


You may need to open the figure above in a new tab if you'd like a closer look. *winks*
So.. from the figure:

1. Plastic panels from an old clock.... looks pretty suited for the job.

2. Estimates of the dimensions so that the circuit and everything else fits in properly. The springy cable is from an old phone charger, I thought it's very good for messy jobs where you might tug your circuits accidentally, so the springy part sort of absorbs some motion. Just an idea guys... no need to follow everything.

3. Holding the structure using rubber bands so that rigidity is achieved for the epoxy glue to dry out properly. Note that the epoxy glue is applied on the inner side so that the smear of the glue is not exposed. For aesthetic purposes. (Rubber bands? Oh noooo....Nah, it's okay, they're proper for the job)

4. The curved plastic sides added, also from the clock panels, glued accordingly.

5. Added the small plastic pieces to act as a platform for the screw threads for the panel to close the opening.

6. The front view, see the parts where the epoxy glue fills in. Also, the previous Variator Wall Wart is shown there for size comparison. Note that they have the same output socket to be plugged into the conditioning circuit, so it's easy for us to alternate between the two supplies according to our preference without changing the interfacing power sockets.

7. Added indicator LEDs for three categories: A green LED to indicate the input power to the regulator, a red LED to indicate the 5V rail, and blue for the 24V rail. Note that for the LED which is powered from the 24V rail, we'll need a Resistor with a higher tolerance. Also, note that the technique used to protect the wiring is similar as shown in the Variator article, where I encased the wiring using a pen casing, glued to the male socket.

8. Plastic panel cut to size as closure, which can be reopened for inspection if necessary.

9. Just a dash of aesthetics... sprayed black paint at the upper part of the structure.

10. Phaserion Power Supply completed. Below, the circuitry of the Phaserion is provided.



Foreclosure of a Design.

Now.. at last, just for fun, I also would like to construct the plug to supply from the mains, but just so you guys know, there are ratings of the wiring which may be ahead of you guys, so do this only under supervision from someone who has electrical knowledge. I take NO responsibility if you get yourself injured through electric shock. This part is not necessary if you already have your own standard main power plugs.


So... knowing the risks mentioned, we proceed:

1. A plug from a CRT circuitry which fits the dual terminals of the adapter, an ex-soldering iron cable (you know... they get damaged easily, especially the cheap ones.. so just so that you know, I prefer Ceramic Heater Soldering Irons. ) .... and to cover the whole thing, I used scavenged keyboard buttons to encase the exposed part of the wiring.

2. Soldered the terminals.

3. Some extra insulation using electrical tape, and fitted into the keyboard buttons, which now serve as a casing.

4. Press 'em using the cute G-clamp and glue 'em.

5. After drying, fit and a dash of black spray paint, you can try it.. looks like any normal plug, hopefully. *winks*.

6. The LEDs light up, ready to be used.

Conclusion

So... there you are. The structure is simple, rigid, and insyaAllah will last for a long time. The Recycletronics theme is still utilized at its best in this project, where I probably used up around only a few ringgit. Useful for research projects and prototyping as well, and you don't have to fish out fifty bucks for branded DC supplies... just fish out your junk and use the rest of the money for charity.

I named this prototype Phaserion because the variation of the voltage can be changed accordingly, so as to a phase shift. So there you go: Phaserion and Variator, working in tandem.

May Allah be pleased with us when we reduce our expenses for ourselves and more for other people who may need more.

All the best to the ones out there.

Sunday, March 20, 2011

Construct your own DC Power Supply Wall Wart! Variator Reporting.

Alhamdulillah. All Praises to Allah SWT who created and governed everything in this world.

So guys.. we'll be doing something very important for hobbyists here. All electronic circuits require a steady power supply, and you'll get fed up using batteries for testing purposes, which run out of juice for only an hour's worth of running time.. That excludes the electrolytes which leak out after some time.. (NOOOO!!!).....

So.. normally people would opt to: Buy a costly DC wall wart, with fancy controls and an indicator (which is sometimes deceiving) and risk thinning your wallets......

.....or construct their own by buying cheap DC supplies and hacking it to suit their applications. In my experience, after some time the cheap DC supply will be overheated and you'll be left with a fuselage of burnt plastic and a dead transformer.

....or you can opt to take a leaf out of the book of Vortex Electrica and use your own adapters in your house. There are tons of adapters for various applications; Laptop chargers, printer adapters, cellphone chargers (especially old ones), and so on. What's the difference between the ones you buy? Normally adapters for branded stuff have more quality and more protection circuitry. So... This is my collection:




A lot huh? Some of 'em are damaged, and some are okay. Each can be tested easily using an LED and a 100 ohm resistor.

So... the obvious steps for anyone with basics is to cut the wires loose and connect crocodile clippers to them, right?

WRONG! From experience, the weak points are always attributed to the connection between the wire and clip, because the CLIPS SUFFERS THE MOST MECHANICAL STRESS HERE, SO THEY BREAK APART EASILY AFTER SOME TIME. So if you don't want to have to repeatedly re-solder the clips to the wires, the best thing to do is to make separate connections, which can be plugged when in use. In short, see below:



So.. the figure should give an idea. Also, this means that the power from the DC adapter can be plugged into other circuits i.e not only the crocodile clips but also to a breadboard, or any other devices which have the corresponding socket to fit.

Now, another series of ideas comes into play: I want to have.....

a. indicators to know that it is ON, and
b. I want to be able to switch ON/OFF the power at hand, not at the mains where things might get messy, and
c. I want it to be STABLE, not fluctuating power, and
d. I want it to be VARIABLE, not fixed.

So the rest is easy... Add a green LED to indicate ON, a mono-state switch, a filter monolithic capacitor across the terminals, and a variable voltage regulator, like an LM317 or other equivalent components. In short, everything'll look like this:


So as we go along I'll explain the tips and tricks I employed, which may be of use, since we're all about IDEAS at the first place. So here goes:

First Prototype:
VARIATORTM
Wall Wart (I named it for reference... Heh heh..)


So the figure shows some simple stuff:

1. Solder the male socket wiring to the Adapter wiring. In this picture, notice that the GREY insulation is there, standing by to sheath the exposed soldered part of the wiring. This means BEFORE soldering, fit in the insulation first. You can get that type of insulation from various types of wiring which has thicker wires.

2. The exposed part of the wiring is now covered properly by sliding the grey insulation over it. Take note that you have to make sure the inner part of the wiring is also insulated so that no short-circuit takes place. Note that the adapter has a tuning knob there, with fixed values from 3.0,4.5,6.0,7.5 until 21 Volts.

3. Now, add a plastic cover over all the stress points, and glue it accordingly. This makes a nice, difficult-to-break-apart socket. This means if there are any mechanical stress suffered by the socket, the wiring will out of the way, and the plastic cover will take the load. The figure below explains better:


See that the one on the left is one without the casing, so the break points are easily formed at the soldered points, rather than the one on the left, where the load is shifted to the plastic casing, reinforced with epoxy glue.

Next, a conditioning circuit is shown here:


The conditioning circuit is also a separate entity, as declared in the plan before, which fits in a green indicator LED, an ON/OFF switch, a freewheeling diode (to counter backward EMF spikes), a filter capacitor to stabilize supply, and a female USB port.

Now, why did I use a USB socket? Because I have a lot of 'em, and they don't leave room for reverse connection, which could be disastrous. The male USB connector is wired to the crocodile clips, which we'll explain in the following. USB ports have four terminals, so I combined two terminals together to get two crocodile clip terminals.

So now.... The crocodile clips. The main problem with most clips is also due to the mechanical stress it faces. So here's my design:


So the epoxy glue is very important to secure the connections. Also, the plastic casing protects the wiring and shifts the mechanical load of the wiring to itself. The USB socket is a bonus; it's strong and has only a single orientation when you plug it.



The figure above shows the transition according to the design mentioned above.
First, fitting the wires inside the plastic casing. I must warn you, it is pretty tricky to fit in the wires in such a cramped space.
Second, the clips' wiring and gluing is done.
Third, just to show when everything's in place.

So, the conclusion is that while it takes a bit more time to do this, you'll save more time than attending to the wires again and again when they break off due to the wear and tear effect.

So that's it! You have a sturdy Wall Wart for yourself and you don't need to spend much in constructing one. A variant of this (more hardcore DIY-ing) will be provided in future articles, InsyaAllah. For such a simple project, a lot of drilling down is done to provide IDEAS. So.. hopefully some of them will be of use.

All the best to ones out there struggling with their lives... May we live to please Allah more.

Wednesday, March 16, 2011

Vortex Rechargeable Battery Pack Mark II

Assalamualaikum to all VE readers... it has been a while since we posted anything new, but I'll try to put up some old stuff, which is pretty simple but nevertheless provides a new perspective in DIY stuff.

So... I suppose you have read some of our older articles regarding rechargeable battery packs? Well this article is pretty similar conceptually, but with some major changes in reliability and structure. What I found out when I was using the older version is that, when one of the batteries conks out, it is pretty difficult to know which one is so, so you have to test them using LEDs, while fumbling through your prototype wiring and so on. This design is more rugged, stable, and takes safety into consideration, if the battery leaks or explodes, etc.

Let the graphics speak for themselves.




Initiation.

Here is the transition from raw batteries into being wired up (soldered of course), geared for testing & combination. So... Some notes to be taken:

1. In the bottom of the figure, both of the batteries in the left are Samsung batteries, and they have three and four terminals respectively. The way to know the right wiring is not only by testing it using a Digital Multimeter (DMM, check the highest voltage) but to also test using LEDs and see which combination produces the brightest intensity, because voltage itself doesn't mean it delivers the desired amount of current. Third is a Nokia battery, and fourth is a Sony Ericson.

2. Color Coding is very important (red: positive terminal, black: negative). When the whole thing is connected, you'll easily see from the color. Also, it is a good practice for all projects as well.




Quality Check

The next figure is the QC part. You'll see how two batteries are recharged on a breadboard. Explanation:
1. LED's off, meaning the battery's conked.
2. Now we'll recharge it for a few seconds....
3. LED's on. Battery is still functioning. Result: PASS
4. Sony Ericson battery's status: Charging....
5. LED's on. Battery is still functioning. Result: PASS



The image above is just to show how much voltage will it generate if all the batteries are connected. If you're afraid of combining different batteries together, read a reply to a my similar worry a few years ago. :)
Quote of the reply:

There's no problem of using batteries of varying capacities in series as long as each is delivering it's share of the power.

The problem occurs when the battery with the lowest capacity runs out of charge. Since the current is still flowing in the same direction (courtesy of all the other cells), it's effect is to place a reversed voltage across the dead cell. This could lead to the depleted cell either overheating or exploding.




Terminals of the batteries

Next, let us show how the terminals are derived. This may take some time, but Nokia handphones' sockets are rugged and doesn't leave room for misconnections due to polarity confusion i.e sometimes you insert the terminals incorrectly due to structural reasons. Some elaboration:

A. All sockets harvested from Nokia cellphones.
B. One of them looks like this, with a tape at the back. Remove the tape.
C. Now you can see the metal contacts clearly for halving. You might cut it wrongly, so observe the metal contact regions.
D. Clamp it using a small G-clamp (they're VERY useful)
E. Saw it (a hacksaw is also very useful)
I. Now you have extracted a socket, and you can bend the terminals for fitting it into a holed circuit board.
F. Another instance (from the ubiquitous 3310)
G. After being sawed....
H. Bend the terminals to reveal the metal contacts.
J. Solder them on a donut perfboard. I know this seems tedious, but believe me, The task of connections after that is a breeze, since you don't need to worry about the terminals anymore.

IMPORTANT: Make sure of the right terminals (positive/negative) are identified on the sockets' terminals by sticking a Nokia Charger into each socket, and check the polarity using a DMM or an LED.




Basic Structure

Now... The next step is to combine the rest. So... the figure above shows the combination done from 1 to 3. The boxes number 4 & 5 show the sockets being combined with the wiring (Hence the importance of color coding the wires).

Box No. 6 show the batteries being recharged. I used a Nokia 3310 Charger, which is very common in my house as an attic material.



Battery Tester Systems

Next, I wanted an off-board testing capability for the batteries, so I thought of using some old cellphone keypad boards which have pretty LEDs to it. They're very bright, and aesthetically good as well.

The figure above (You may want to click on it for a clearer view) tells:

a. A cellphone keypad board, which has SMT LEDs on it.
b. Just test the LEDs by connecting a supply to the terminals of the revealed LEDs. All of them are connected in parallel, so the rest of the LEDs should lighten up as well when you supply to only one of them
c & d: Screwed the LED board to the battery pack as a platform.
e. Another view of the unglued structure.
f. Epoxy glue comes into play.
g. Drying the structure under heat
h. Halved pen casing to cover the external wiring of the LED keypad circuit. A white female socket is used for the Battery Tester Pad.
i. Pressed using another G-clamp and glued.

Basic structure complete.




Male Socket Extraction.

Here, I have some male sockets from broken Nokia chargers and they'll be used to interface the battery to external devices. And:
A. Four different male sockets shown there, un-scalped except the second one from the left.
B. All male sockets harvested and stripped.
C & D: A plastic piece to act as a frame for the sockets
E. All wired up
F. Epoxy glue kicks in. (I like this stuff)
G. Completed part of the external male socket.

This looks easy, but it takes time also. So... take your time.




Lastly... The figure above shows the last part, which is the Interfacer circuit. The way I wanted my battery to be is that it has an on-board tester, so that when you connect it to a prototype, you can continually monitor the condition of the battery. Also, a common interfacing connection between the battery and other circuits are needed. Explained as follows:

i. Male socket soldered to a donut perfboard
ii. A plastic case, which fits the imagination.
iii. Cut it into half.
iv. Now some ingredients shown here: green LEDs salvaged from keyboards, switches from mice, and drilled plastic casing to emphasize on the DIY and Recycletronics scene. (Heh heh...)
v. Fitted them all together.
vi. The Epoxy Glue Guy being nosy again...
vii. Added 100 ohm resistors for each tester LEDs and extended the LED terminals using the wires.
viii. Everything on display again; note that anti-ripple capacitors are added on the board for steady supply, alongside the USB female sockets.
ix. A side view before enclosure.
x. All connections soldered, fused, clamped and glued together.
xi. All ready for testing.
xii. The interfacing circuit, which is very simple, but I just wanted to fill in the box there.
xiii. Testing... testing.... Yup everything's good.

The rest of the performance is demonstrated in the video here:

.


Conclusion.

So... a pretty lengthy article for such a simple project. What I'm trying to explain here is that there are myriads of techniques that can be employed when constructing a prototype. This is only a blog of IDEAS. So hopefully some is provided as well. The theme of my project orbits around using only the stuff I have in my house, so that's why the components used seem restricted. Probably just my habit, but I just wanted to demonstrate that it doesn't take much money to get practical experience actually, because everything's around you. I spent no money on building this prototype, if you exclude the epoxy glue.

As a reminder to everyone and myself, don't spend too much time on satisfying our needs (like doing projects, working, relaxing, etc) . This article is only an expression of a hobby, and nothing more. There are lots of duties to be fulfilled to Allah Almighty, which should be our focus in our life. Hopefully after reading this article, we'll realize that in our hustle and bustle, we'll quickly spare more time to please Allah SWT, for the life in hereafter is Eternal, and life in this world is only transient. InsyaAllah Tuan!!!

Best Regards to UM's Electrical Engineering Graduates.
Vizier87
Related Posts Plugin for WordPress, Blogger...