Showing posts with label Projects. Show all posts
Showing posts with label Projects. Show all posts

I'm sorry, Sir. I won't be programming for you

Well, that sucked. Really sucked. And it was on a Monday too.

Let me tell you why.
(tl;dr - POS Test Clip not working)

Once I have finalised a program, it means it's code is ready for Production. So, the moment the chip has been programmed, it would be soldered onto the circuit board and that's it. So, if there is any changes after that, I would be expelling a lot of colourful expletives.

But, the codes still need to be changed. Unlike a normal chip which I can just pull it out of the socket, SMDs are a whole lot different. Desoldering SMDs requires a lot of work if your intention is to reuse them. Another alternative is what one would call ICSP (In-circuit Serial Programming) where you just connect the circuit board directly to the programmer. In this case, I would just need to solder the relevant pins from the chip to the programmer. No a problem until you realise there are tons of them lying on the table.

And so, to cut a long story short, I invested in a SMD test-clip. And after waiting for more than two months, it arrived. But after using/testing it for half and hour, it sucked. At first I thought it was because the solder got in the way. So I took a fresh chip and it failed 9 out of 10 times. Using this clip would have saved a lot of time, that is, if I had any last minute changes.

Oh well, maybe one day I would be able to find a more reliable clip but not today. I'll just let today suck monkey balls.



And so, here it is. That sucky SMD clip (black) connected to ribbon cables and then finally, to a DIL adaptor (yellow) to connect to my programmer

So, in normal sense, I would just plug this clip onto my circuit board and re-program the chip from there.
But it did not work. Damn it.

More speaking, please!

These came in the Post today. And I might say, its a bit too late as they're supposed to be used for a few projects before September. Then again, its not their fault but mine because I should have given some leeway for shipping times.

It was pure luck that these were being sold in a set of four at a very ridiculous prices!



At first, I thought it was the **censored** but I was wrong


These are the 2.1Watt mini rechargeable speakers which are very loud. I once tested it in a busy restaurant and the sound was clear and well, loud. It has a USB cable for charging plus a key-ring. But I do not like the black rubber-like coating since from experience, they will become sticky and gooey after some time.


On the left is my RM39.00 speaker while the right is more than half that price. I am not too particular about the pros and cons of these speakers since I am going to take them apart anyway. What I needed was the speaker and its amplifier. The charging unit plus the battery will be thrown away.

1/32 bath-tubs

While I was preparing to send these two 1/32 scale pilots off, something which I forgot to do for the past 10 days due to another project and also loads of work from well, work. Then Kristine came over to see what I was doing and she commented that.......

"Dad, why he has no arm?"

"Dad, he looks like taking bath in a bath-tub."

And so, I quickly wrap them for posting before
I could not answer anymore questions.....

My new place Part II

OK, so this is still a small part of my stuff. I have to
go back to KK soon to protect all my things because
now they have discovered termites there. Shit, man.
This is not good news as this means I have to use a
lot of trips to get my stuff back and wrap them in
plastic. Then this room would be too small because
all my stuff would completely fill it up. This also
means I have no space to do any projects of any
electronics for at least a few months until I get things
sorted out. Sigh. So close and yet no cigar.

I am very angry about this. Finally I have some space
to work and now this fucking termite crap comes in.

My new place Part I

OK, Wife helped clean up the storeroom and I do need to move all my things in there before Saturday morning. This was because we will be having a very important guest from Australia for three weeks or so. And this is also a good excuse for me to get the room ready. Now, with the room almost ready, I will be able to do my things in peace. But that is in theory anyway. Getting to have long term working space for my own again is not easy because there are a lot of interruptions. And this means I usually have to work in weird places from the dinner table to well, the lounge and so on.

Sigh. How I really wished I had a house of my own. Years ago, a few guys did talk about sharing to rent their own apartment unit a place where they can go to, for doing their modeling projects. but it never materialise because by then, The Outpost was created......

Kaelynn helped me with some of my things
earlier. The only missing item is a fan........

BNC connectors

In my case, I wanted the project to have as little
cabling as possible on the outside. This is so that
the connections do not fail when being used. But
herein lies the dilemma. Almost no one in Pasar
Road sells this as they're rare. Luckily, in the
last minute, I remembered one shop which had
three left. And so, without being too greedy, I
bought two (as shown on the right). But the last
resort would be going to RS Catalogues which
would cost me four times as much, which I do
not mind but its the drive all the way to Shah Alam

It costs how much?

So, how much to make a board of this size?
I am not sure but before you even begin, there is the Startup cost of RM500
Huh? RM500?
Yeah, this is for them to make master (or something) from your data (Sounds more like handling fees in a Photo shop)....
riiiiight. But how much is the board this size?
How big is it? (I show him with my fingers) This size and it must be double-sided. Well just an average cost would do.
Hmm. I would say, its about RM40 to RM50 but its up to them to quote you.
Wow. So, I would have to pay RM500 on top of RM50 per board?
Yeah, for a large volume, this is a small sum I know, but I am going to go less than five (one or two, actually) And the next time I want the same board made, do I just pay RM50 per board?
Well, there is a time limit but I am not sure how long they want to keep your data but after that time limit, you'd have to pay them Rm500 again.
Wow. Er, ah, OK. Thanks, Bye! (And I almost ran out of the shop, not looking back) [Update]

Well, his son told me that if I want to do a simple single sided circuit board, then the price would be reasonable as there is not much tooling required. Oh well, back to the drawing board. Have to redesign the board but this would mean a lot of wires to solder and a lot of compromises. Maybe I should look for another PCB maker but I am not sure of the prices would be the same. Then again, I have to wait too since my salary is still not in as of today. Damn.

BSG O2 Sensor Part II

Dammit. Spend the whole friggin day figuring out the LED sequence as seen on the video. It did not help much as the LEDs I got were common anode which means, I have to program the output with opposite values instead. Which I something I cannot do while the kids are running and screaming about the house.

So, I gave up and went to sleep. Only to wake up and realised that my fucking Nokia 5800 hanged and switched itself off even when its not being used. Yeah, I am not in the best of mood today as I wanted to get this project up and running.

Finally, after a few rounds of ice cold water, I ripped out
all the wires and started all over again, this time in more
systematic arrangement. And also, no more "following"
the LED sequence on the video as I could not get the
nice yellow light perfect from the red/green mixture.
Good thing the circuit can run on 3 volts which means
there would be no bulky batteries. Perhaps I could
push my luck and test it out with a coin cell battery.

And luckily, I bought some diffuser caps for the RGB
LEDs
so that the lights from each elements "Mix"
better to give
a nicer colour. Its hard to capture
but without the caps, it
(the colour) just looks very
uneven. Even at 3 volts, these LEDs are still very
bright. You cannot view directly or your eyes will
definitely go.

In other words, you're looking at the LED colour in its
own elements instead of the total blended colour.


And not only that, apart from the common anode problem,
the colours form LEDs are not constant, especially when it
comes to displaying White, which was a combination of the
Red, Green and Blue elements inside there. Here, you can
see the LEDs on the left and right are not matching.

At least I got the spare USB programmer up and running.
I need to get a replacement chip puller/inserter as this
does not have a ZIF socket and I have already broken
off the legs of one IC chip, which is not a good thing
since they costs almost Rm20.00 each. Dammit.

Ok, its past three in the morning and I am getting sleepy......... oh, heres the video. See if you like or not, in case I can't meet up with you.


BSG O2 Sensor Part I

A friend have asked me if I could do some electronics for him as it was urgently needed in two or three weeks. After asking a few questions, I told him, it could be done but I needed time. He was willing to pay me for my time and all but in the end, I just prefer him to pay for the costs of the materials.

Now, this is where the boo-boo part comes in. My Notebook is being repaired. Usually it takes about two days but now, its more than a week. Yeah, after eight years of service, I think its time to get a new one. But until then, I just hope the tech boys can save it for one last (or more) time.

The project looked a bit daunting at first because of the requirement of using a set of five red and green LEDs in one spot. You can find these LEDs easily but for this project, it must have three legs to switch between them. A normal two legged is more difficult to do. Its possible but difficult. And another thing, from the video, the lights from the LEDs are very bright and so, the normal dual-colour (red and green) LEDs are out of the question since their lens are frosted. And so, I have to resort to using the more expensive RGB LEDs (Red, Green and Blue LEDs in one). Also, it is a first for me as I have never ever connect these LEDs to a microcontroller due to the way they are connected. Oh well, a promise is a promise.

Since I am using the company's Notebook at the moment, the next problem is the absence of the SERIAL port for the microcontroller programmer (which my Notebook has. Yeah it shows how old the Notebook is). So, I would have to source for a USB version of the programmer. Luckily, I have one, which was from the software package I bought years ago. But if all else fails, I would have to get a new one, which again costs money in hundreds of ringgit.

This is the prototype board all wired up. The micro
processor chips are on the right.


This is the backup programmer which I will try to
see if it works during the weekend. Now all I need
is the 13.5volt DC power supply.........

LED tester from Hong Kong

Just after I came back from that workshop, the postman came and went. And right on my desk, was the small parcel. Its the LED tester I ordered from eBay 18 days ago. This is a great tool for testing LEDs as there are no wires or probes compared to using a Multimeter. Just a box for you plug in the LED. I could have done one myself but the cost and time plus research is just not worth the effort. Ego aside, there are a lot of things already done, all I have to do is to use them for my projects and not re-invent the wheel.

I am not sure how much it costs in Pasar road (Or if they want to sell it to you) but I have seen most of the shops using it since 2004.

This is the package on my desk. Right in front of my
Boss who was browsing my accident photos while I
wasaway to deal with that Lady.


For RM23 or so, I get a free battery too, which is
great because I can start using it right away

All you have to do is to plug the LED into the connector (at
the correct amperage slot, of course) and just press the
button to test.

Electronic Candle with Flicker

When it comes to electronics, simulating a flickering burning candle can be achieve in a few ways. One could be via "old school" electronics where you stuff loads of off the shelf electronics components into a board. The effects can vary from downright amazement, "You call that flicker?" to extreme disbelieve, "Wow. Now, that is what I call a candle!". However, the downside it that the electronics alone would not fit into a normal sized candle.

So, the only solution would be to use microprocessors to do the job. Mind you, when it comes to using them, you have to remember the the age old computer adage of GIGO (Garbage In, Garbage Out). this means, how well the candle flicker works depends on how it has been programmed. The simples way would be for the processor to run through the numbers in an EPROM or memory. And the other is to create a random number or someting similar, which is not simple because there is no feature to generate random numbers in a code. You have to build it up. But since I am not going to waste my time on this, I looked to ebay for my solution. This is because of time and money saved. Don't believe me? Try this:

To create the candle flicker, first you must know which microprocessor to use, their programmer to to buy and also, the programming language to learn. Once you have done that, you have to design your own circuit board and hope that everything goes well when its all soldered. After the first prototype, you have to miniaturise it. Easy or not? Yeah, so, instead of years and thousands of ringgit (really), ebay solved my problem for Rm32.39 and three weeks, my solution arrived on my desk. Ha ha ha ha!

[Note: A fellow programmer is NOT a GIGOLO as in GIGO-lou, la)

This is a battery operated candle which can flicker. How well it flickers,
well, all I can say is, "OK, what" since I am too lazy to compare it to an
actual lighted candle. Knowing me, I could burn the house down in the
process as well. I did buy a local version but all the stupid thing would
do was to use three 1.5volt batteries and use a simple Red/Blue/Green
led which rotate the colours. Ever seen a candle cycle its flame colours
from Red to Blue to Green? Yeah, weird, right?

This one is better as when I opened it up, there is the white
LED and a small COB (Copper On Board) black gob. And it
uses only one battery, so, I can now remove it, power it via
another set of battery and connect the white LED to another
circuit which will flier about 12 LEDs at once. Ha ha ha ha ha!

I don't believe I am doing these at four in the morning.

3.5" LCD screen and reverse camera

OK, I found this on my table yesterday morning and boy, am I excited! The first items are the 3.5" LCD screen and an IR camera, while the second item is the set of six flickering candles (more on the next post). With no one else in the company except for the clerk, I quickly took them to the car in case everyone asks questions. I hate people asking me questions when I am doing something. And so, about two in the morning, with everyone sleeping, I was free to test them out.

The LCD screen and the camera is for my own project, where I am developing my own set of tools for testing CCTV points. It was due to the last two customers who made me realise that my current CCTV tester is inadequate. It would be good for testing the cable conditions and the power but that's as far as it got. Now, I will develop the MkII so that one person can attend to a CCTV service call instead of two. This would save time and money for the company in the long run as long as the tester is in good condition.

Hooray! And no one dared to ask me what was in the packages.
And I had to wait for more than 12 hours before I can start
opening them!


Testing the camera
Setting up them up for testing is easy because everything is already pre-wired and all I needed was some crocodile clip cables and a 12volt DC power supply. So, what am I testing here at so early in the morning? Simple:

1) The qualityof the LCD's image, and
2) The quality of the camera la.

OK, everything is set up. I have the LCD screen, the camera and yes,
the International unit of Internet measurement, the Coke can. I
purposel chose the small screen and not those 7-inch versions as I
presume they would fit neatly into the casing which I have ordered
locally from China (and not through Internet, OK?)

Not only that, the screen has not much control except for brightness. I
did not want the ON/OFF switch or any other switches. I will control it
via power to the unit. Great, isn't it? And yea, the whole system is PAL
so again, there is no PAL/NTSC switching. I do not mind if its auto but
I suspect its not. Still, this has not deviated from my requirements.

How to take the stand off, I am not sure but I know it cannot be snapped
off incase it breaks.So, I would have to void warranty (duh) and remove
the screws to do this, I suspect. The whole thing is made of plastic and if
I really did put this onto a car, the heat from the sun and from the inside
would have baked and warped the casing, cracking any electronics in the
process too. In the long run, the LCD would have died as well. Or will it?

The camera is quite big and not as compact as I have imagined. But
then, I was too excited to note the measurements from the Internet.
Still, its a nice design and very different from the ones I have seen in
the local shops here. FYI, I am holding it upside-down.

And this is the correct way of using the camera. You will need to make
the holes and then screw it in under some ledge or parts of the car. In
other words, you have to mount the camera upside-down.


Here is the setup for the test. One Coke can to the LEFT and HALO fig
to the RIGHT. The came will be pointing at the two objects inches away.

At first, ifyou're not familiar, you would notice the COKE can being on the
RIGHT and not left. And when you turn the camera around, the COKE
can is now in the correct orientation but its upside down........

So, you turn the camera back the right way and you notice the image is
flipped. This is weird. Maybe there is something wrong with the camera.

With a spare camera, I replaced it and tried the test again.

This time, the image is correct. The flipped image is not caused by the
LCD screen by by the camera. This is because, the camera automatically
flips the image so that what you're looking at, is a mirror image. You
would not understand this until you put the camera behind you and the
screen in front, just like in a car. Now, do you understand?

OK, here is another test, this time, we pretend as if you're reversing
the car to this wall, about 9 feet away. I took this image from my
Nikon D50 to show you the "actual" scene. To camera claims to have
a 120º viewing angle. This means that it would show a lot of things and
then lens is going to be giving an almost fish-eye type of images.


Again, this is using the new camera. Notice the images, especially the
door and the green box. So, when you reverse your car to the wall,
you can literally see a lot of things and not back into something or
someone. Which is great. The only problem now is to disguise the
camera because as Wife stated before, if you have such things in
the car, people would think there is something valuable inside...

With a normal camera, the image is "right" way round this time. But its
not as wide. I hav aimed the camera as close as possible to match the
new one by adjusting it to point betwen the door's 3rd & a half square
and the clothes rack. The limited view angle is very obvious especially
how problematic it is for me to make sure the green box is still visible.

So, now I have the LCD screen for my project but I am not going to use the reverse camera. Maybe there is a switch in there to set it back to show the correct image but this means I would have to open it up. Still, I could always install it in the car but then I would have to save up for another LCS screen, this time which must come as a rear-view mirror. And that, would have cost quite a bit.

Customising my Hardigg Storm case

After getting the case for almost a month and not being able to use it is a waste of money in my opinion. I used to do that, buying stuff and then play with it for a while before "forgetting" them later. But now, I am using a different way: eBay. When I wanted some things, I would order them and in 2-3 weeks, they would arrive at my desk. Because of this, I need to plan ahead as some of my projects depend on this. I mean I could get the stuff locally but at the cost of higher price and all. Then, I would "collect" them into a bin and leave it there. Because I got them so easily, my mind tends to relax and within a few weeks, they are forgotten or missing some parts when the time to do the project is due.

So now, I purchase from eBay, calculate the time frame and while waiting, complete the design as detailed as possible. Once it arrives, I can almost start on it immediately. Anyway, when I got the Hardigg Storm case last month, there was a slight setback due to the foam inside it. And so, after looking for ages, I got lucky and stumbled into Multifilla. And so, today, with the raw materials, I can start lining the case. The sooner the better as my current case is about to break. It was so bad, when I stood it up, it leans like the Tower of Pisa.

Ok, this is it. I have the Multifilla's blue foam, the silicon lubricant,
my trusty (so far) blade and some news papers. Since I don't have
a metre long ruler, I'd just have to use the black foam as measurment
and a long PVC casing to guide the cutter. Oh, some papers as well.

This is the reason why I need to line the case. For you see, I
would be carrying a Notebook, lots of customised CAT5, USB,
Serial cables and other tools that I need when using the Notebook.
Also, I have to make most of the limited spaces in the case. The
blue foam is almost an inch thick and so, if I followed my original
design, I would not be able to carry much but the trade-off is that the
internals are much better protected. And this is not what I have in mind.


So, here is my second design. I would line the bottom with the
1cm black foam, while the blue foam would line the sidewalls.
I left the middle block free so that it can be used as a divider in
case I have extra things to carry in the future. The upper half
would then be separated by a perspex plate, and this is
layer where I would put the Notebook. Since it is close to the
lid, it is secured by the lid's very own sponge. I did this
drawing using Google's SketchUp


Cutting the foam is quite easy. Since it is "stronger" than those
normal white ones, you can just score the board a few times until
you feel it snap off. And best of all, there is not much debris unlike
the normal white polystyrene boards.

Not sure if you can see this but at the edge near to the right, you
can see some irregular patterns, which I made while cutting the
board using the sawing method. Later on, I just made sure my
knife is sharp and I just score it bit by bit, which gave me a
sharp smooth surface. Because its so robust, you can
technically carve basic shapes out of it.

This cut near the top is done with a normal slice with the knife.
The other cut, near the finger, is via saw action. If I used the
silicon lubricant on it before cutting, then the effect is not so
obvious. I did not want to try with the WD40 although the proterties
are the same. But because WD40 is oil based, it is best not to
play with it as it might react badly with the foam.

OK, the first two edges are done! I have to slice off some of the
edges as the case's corners are rounded. I should have tied the
blade to a box so when I cut the foam, it would not have uneven
surfaces which is caused by the hand. But I am not so bothered
since its my case and I not doing this for anyone. OK, OK, so I
wanted to finish this asap as there were other things waiting to
be done. I need to wash the cars too.


With the other boards in place, I glued them. Note some of the edges
have been cut off, as this was my mistake when I tried to go to design
#3 without thinking/planning properly. Anyway, after "throwing" all
my things into the case, so far so good as there were more space than
before after I decided not to line the bottom with the blue foam. If I
followed my original design which is to cover the foam with the 1cm
black foam, the case would be very cramped indeed. I mean, we are
going to lose 1cm from every side.

With the perspex on top, I can put my Notebook. Don't worry, the
lid'sown foam would make sure the Notebook would not slide about.
I have tried it (but I do not want to throw the case about). I am
putting the stuff in so that the polystyrene glue and the foam can
"set" into the proper shape. Sort of like wearing it in.

This is now, my old case. See the edge on the lid which is already
warping? When I open the bag, I have to make sure there is
something behind to prop the lid so that it would not fall backwards
and snap off. If I happen to put some papers there, it would fall off
through the hole behind.

This is the other side of the lid. Already the hinges are quite loose.

When one of those feet came off, I was shocked to see how it
was fastened. The whole bag is made of paper pulp or
something, and reinforced by metal edges. And if I soaked the
bag in the rain......... Haih, and this is RM100 wasted for a six
month old bag which started to break in the first 3 weeks I got it.

The loose hinges allows the bag to open the gap as much as 3mm,
which means, paper or other thing stuff can slip through if I am not
too careful.


Finally, the new (left) meets the old (right). The old briefcase is not
leaning anymore because I have moved all the stuff to the new Storm
case. Although the Storm case feels very heavy, even when empty,
I quickly got used to it as it makes me feel quite confident when using it

While I was working, an ant thought the foam is edible. The Queen
will definitely have its head for that.


While waiting for the blue foam to dry, I decided to work on the
jewellery box for my wife. Since I do not have shellac or other
decorative stuff, I just decided that the box would be plain but
with felt inside it. For the lid, I would have to find a nice photo.
All this would be glued together using the spray-on glue I got
five years ago.

Oops. I forgot to erase the price! Wife gave me a scolding for that,
among other things.