Wednesday, October 31, 2012

Homebrew Power Supply

I'm in the midst of designing / building a homebrew 220VAC to +12VDC / +5VDC power supply for the Remote Controlled AC Outlet projects. Not much else to say, just throwing up some pictures for now.

Oh, I will say this - if you are working with the mains voltage, BE CAREFUL. Sparks, smoke and flames are the least of your worries - electrocution and DEATH is what you should really worry about.

Here's an application note from MicroChip about transformerless power supplies: AN954

1st gen power supply design (right), connected to a PIC board (left)
It worked, but it shocked the heck out of me
when I touched the PIC board. And in the process,
it took out one of the LEDs.

Monday, October 29, 2012

Remote Controlled AC Outlet (PIC12F629)

For my next project, it's going to be something functional instead of just LED eye-candy. Yes, it still has LEDs on it (I have to have my blinky lights), but that's not all.

This project is a remote-controller AC Outlet, based on a PIC12F629. It incorporates a 40Khz IR receiver and all of the IR decoding is done on the PIC. When a POWER_ON IR code is received, it toggles the state of the AC control line (GP4), which either activates or deactivates a +12V relay. Right now there is only 1 relay (for one outlet) and a couple of LEDs on other control lines. Later I want to have a quad outlet where each outlet is individually controlled. But that means 4 relays, and - I only have one for right now.

This project was inspired when I was scrapping parts out of an old TV set and found a +12V relay in the power supply section (for the degaussing circuit, I'm guessing) and the IR receiver. That led to writing my own routines for decoding 40khz IR codes on the PIC12F629. And after I had remote control, I put it together with the relay.

  Yes, I know - it needs a lens over the open hole.
I haven't figured that out yet.

I'm using it to control the Christmas lights on my patio. Just point the remote at the window facing the patio and *click* the Christmas lights go on and *click* the Christmas lights go off. Yeah, it doesn't take much to amuse me.

Sunday, October 28, 2012

PIC12F629 Datasheet

If you are interested in working with the PIC12F629, you may want to download the datasheet from MicroChip HERE.

Dual Die Emulator V2.0

UPDATE 12:1113:
I've decided - after days of trying different schemes in the programming to get rid of the ghosting - that this is a really dumb design. Besides the ghosting, it draws _way_ too much current. In fact, depending on the number of LEDs lit at one time, it can sag the voltage from a little 500ma supply that I am running it on. That is too much for a battery operated toy. The money saved on transistors and resistors will be spend many, _many_ times over on a power supply. So - no more work on this design, I'm converting the V2 board I have back to a V1.
In the aftermath of my Dual Die Emulator being posted at Hack-A-Day, I managed to glean some ideas from the good folks that comment there. That said, I came up with a V2.0 of the schematic and busily built a prototype tonight.

The original post is here.
The Hack-A-Day post is here.

This is V2.0 of the schematic that I came up with yesterday:

Sunday, October 21, 2012

Prototyping A Dual Die Emulator (PIC12F629)

Above The Post Update 12.1117:
Final changes have been made. I added two 220 ohm resistors - between the collector of each transistor and the cathodes of the corresponding LEDs. This helps to reduce the current draw and increases battery life. I also added a 9V Transistor Battery to +5V circuit, so I can connect an easy to find 9V battery to the device. Lastly, I cleaned up the schematic and it should be easier to read. That should be it for any changes, unless I need to increase the battery life even more.


I found some 100 LED Christmas lights at a local discount store for CHEAP. I paid only p169.50 (around US $4) for each string. I saw that they had one with PINK LEDs, so I bought that for projects and disassembled it once I got back to my MadLab.
100 LED Christmas light string in its' original condition.

The 100 LED Christmas light string - disassembled.
Since I had 100 Pink LEDs, I decided to build something LED intensive. So, using a PIC12F629 as the microcontroller, I decided to build a Dual Die Emulator. Each die would consume 7 LEDs, so I would use 14 LEDs total for the project.

 Back to the future: the project as it will look when completed.

Thursday, October 18, 2012

Home Stretch! (Or - How I Spent My Fall Vacation)

Finally getting around to painting/trimming out the office furniture.
It's scary - it looks so much like the labs I spent hours upon hours in at VLSI/Philips.
I guess that was the look I was going for.

I don't think the cardboard box (used for recycling) is working out, tho.

New Desk And Paint!

I framed the new desk. It's lower than the rest of the benches, so it
will be at a comfortable height for my Asawa. She is going to take care
of the paperwork, so I want to do whatever I can to help her do her job.
That's one of our cats, Whitey, enjoying the new sleeping spot.

 That's the desk, skinned with plyboard, and the first coat of paint being applied.

The desk is finished with three coats of paint. Looking good!
Now I need to paint the trim dark gray and install it.

Friday, October 12, 2012

Cheap LED Christmas Lights

I need to mention a smokin' deal I found today. 100 multi-color LED lights, with 8 programs, for only p169.50 (about $4). We have been seeing lights like these on sale for p600 (about $15) - but NEVER this low. I bought 4 strings today - we are buying 6 more tomorrow. Good quality, strong, reasonably bright. Interestingly, there is NO indication where they are made. My guess is China.

I have dissected one string of lights and found out a few interesting things:
  • Although there are 4 colors, there's only two control lines. So all of the blues and greens are on one control, and the yellows and reds are on the other.
  • Having only two control lines (instead of 4) reduces the amount of wire needed (by about 1/3).
  • Having only two controls lines eliminates two transistors that would be needed for control.
  • Fewer control lines also means a simpler microcontroller with only 2 output pins instead of 4.
So - simpler micro, 1/2 the number of transistors and 1/3 the amount of wire translates to the lower cost. The more expensive strings have 4 control lines (I have dissected one of those last year).

The nice thing is - for $4, I can get 25 each of red, blue, green and yellow LEDs. Plus lots of wire. Plus AC plugs and sockets. And a couple of control transistors, a pushbutton switch, and a couple other misc. components. A tinkerer's dream.

Inside Of An LY-706 Chinese Tablet

Blogger's Note: 12.1130
I've seen a lot of people coming to this post looking to either 1) upgrade the RAM or 2) upgrade the OS. I'm afraid that I haven't seen any information that you can do either of those things to the LY-706.

First, the RAM: you will notice that the RAM chips are soldered directly to a Processor / Memory / FLASH module that is soldered to the main board. There are no sockets, no easy way to replace or add to the RAM that is in the tablet. God only knows what is sandwiched between that processor module and the main board (if anything), but there could be more RAM chips hiding under there. I think if you were to try to replace the RAM chips on the processor module - which involves some rather fine-pitch desoldering and resoldering - you would probably end up with a brick.

As far as upgrading the OS: The manufacturers website has been gone for over a year, so there's no hope of receiving assistance from them. I have heard that there are a few images out there with an upgraded version of Android, but every one of them seems to have problems when it comes to buttons. You can try one of those images, but best case is only the main button will continue to work - no volume buttons or power on/off button. I've even heard in some cases where the touchscreen stops working. WORST case is you end up bricking your tablet.

My opinion? You are stuck with what you have got. Find a use for it - I use my tablet for internet radio and that's about it - and take some joy in knowing your $100-$150 wasn't _completely_ wasted.


Original Post:

I managed to drop my Chinese Android tablet the other day and the screen started acting all goofy. Uh oh. No worries - I took it apart and it was just a loose connector for the LCD display. While it was open, I felt I should take a picture for all you folks who are curious about what the inside of a tablet looks like. So - here it is.
The largest component in your tablet? After the display & touch screen, most likely the battery. That's what that big silver rectangle is, which takes up around 1/3-2/5 of the space inside the case.

I also find it interesting that it appears they bought a processor board - with RAM and FLASH memories - and integrated _that_ into their design instead of just putting all of those components on their own board. I guess the processor board was cheap and/or it helped them get the design to market faster. These tablets have flooded the Philippines market. They sell for p5000-p6000 ($125-$150, US).

BTW: If anyone knows where I can get an Android upgrade to this tablet, please let me know. A version that will allow all of the buttons to work - there are several versions out there, but there appear to be button issues with all of them. The 'manufacturer' is unable to provide an upgrade, as their website went down quite a while ago. That's that problem with buying Chinese products - low cost, but no support.

Loading Movies Onto The Slick eReader ER700-2

After spending several hours downloading firmware upgrades, downloading video conversion utilities, perusing websites for tips and tricks, and then letting a LARGE movie convert overnite (from MP4 to FLV format), I finally have managed to g
et movies to play on my Slick eReader (ER700-2 - 2GB internal memory with a 4GB SD card). Now, instead of just reading eBooks and listening to MP3s, I can take a break and mindlessly watch a movie. Not bad for a cheap $79 device. No touch screen, tho - so the user interface is a bit clunky. But - it still works. Whoo-hoo!

The software I use is "Any Video Converter", which is free (but ad-supported). Also be careful during the install - they will try to install one of those goofy toolbars. Do a custom install and uncheck the installation of the toolbar.

To convert movies for the Slick eReader - select the .FLV profile. When you load a movie to convert, look at the framerate for that movie (in the info section of the movie selected) and select that framerate for the conversion process. If the framerate of the original file is 24 fps, select 24 fps for the conversion. For the video size, I usually select 640x480, unless the original video size is small (320x240 or less) - then I select 320x240. For the bitrate I select 512 - this results in a reasonably sized file (usually below 0.5GB). The conversion process seems to take 1.5-2x the length of the original video file, so if the movie is two hours long, it will take between 3-4 hours to convert.

Once you have your movie converted, just connect the Slick eReader to your PC with a USB cable and then copy the .FLV file to either internal or external memory.


Micro-Man LIVES!

Just goofing around in the new lab.

It has a PIC12F629 micro that controls the LED.

Friday, October 5, 2012

Thursday, October 4, 2012

Tuesday, October 2, 2012

A Little Finish Carpentry In The MadLab

I did a little carpentry today - I needed to box up the fuse box and submeter so the conduits and rough concrete are hidden. We couldn't do a finish on the concrete because - well, to be honest, the placement of the boxes wasn't well thought out and finishing the concrete would have meant never being able to open the service panels. Oh, well - not great, but not bad.

Monday, October 1, 2012

The Office/MadLab Is Finally Finished!

Well, the construction/tiling/painting part is finished.
Now I get to build furniture and organize it.
Kind of a 360 degree view below: