Controlling a clock with an Arduino

Here's another great article I found via Hack-A-Day about controlling the ubiquitous quartz clock movements that are all over the place.  Cibo Mahto explains how to easily control one of these using an Arduino but the same technique applies when using a PIC.  The clock coil needs to be energized in a positive direction and in the opposite direction for each "tick" which is easily done by connecting it between a pair of port pins and toggling one pin high, the other low and then reversing the process.  This makes it possible to control time - at least as indicated on one clock!  Pulse faster than 1 Hz (once per second) and the clock speeds up.  Slower and it slows down.

Cibo's article has all the details.  There's plenty of explanation so doing this with any micro and language will be a piece of cake.

Controlling a clock with an Arduino

Update: The Arduino system is fine; the only thing you have to take into consideration is the 9.54 hour rollover event, which Rob Faludi has provided an excellent solution for here. I made up a nice little over-analysis of the issue, available here.

I have been wanting to make a variable-speed clock for a while, so this weekend I picked up a cheapish clock unit (thrift stores are a great source!), and played around with using the Arduino to control it. In summary, I was able to get everything going, but there are some issues with the Arduino software that are going to prevent making it a really accurate clock. Explanation, source code after the break.


Clock controller circuit

Read the complete article

Discuss this article in the forums (0 replies).

Spiralbrain's Blog: PIC Kit 2 IR capture tool

An awesome use for a PICkit 2, via Hack-A-Day.  Note that this only works with a PICkit 2 - the upgraded PICkit 3 does not include the logic analyzer function.

 

PIC Kit 2 IR capture tool

The PIC Kit 2 is a brilliant tool that can be used as a programmer, debugger, serial receiver and for signal capture. In many ways it is more versatile than the PIC Kit 3. One of my projects required IR capture to duplicate remote codes. I decided to create this small module that plugs directly on the PIC Kit 2 and can be used to capture IR codes for almost any IR remote available today. The software supplied from Microchip also allows to approximately measure the timing which makes it quite handy.

The circuit is pretty simple and can be wired in 5-10 minutes

Read the entire story at Spiralbrain's Blog.

Discuss this article in the forums (2 replies).

Low Cost Enclosures

vm in box - 300I'm always on the lookout for low cost, nice looking enclosures.  I'll present a method of easily making a custom enclosure that looks great on the bench or anyplace else in the house.  I touched on this technique in my various comments on the TAP-20 Power Monitor - here I'll spell out the details.  Enclosures of this type are perfect for projects using an LCD or LED display, and minimize the machining a panel requires.

 

A small wood box or frame and a plastic panel make a great enclosure.  Clear or colored transparent plastic can be used so that an LCD or LED display or LED indicators can show through the panel with no cutouts required.  Cutting nice openings can be a downfall, so this works well.

The first step is to find a box or frame of suitable dimensions for your planned application.  A box with a back is great for "finished" projects where you don't need access to the internal circuit boards.  For a dev system or projects under development, a frame with an open back allows access for cables, programming and changing things around.

Read more: Low Cost Enclosures

Discuss this article in the forums (8 replies).

Design News: Getting Started With Proximity Sensing

 

 



Jon Titus, Contributing Editor

 

The Vishay Semiconductors VCNL4000 reflectance proximity sensor combines an infrared (IR) LED and a photodetector with a second sensor that measures ambient light with a spectral response close to that of a human eye. The small sensor IC can detect an object out to about 20cm. Vishay suggests possible uses in smartphones, digital cameras, and tablet PCs. Other ideas include: hands-free light dimmers, pet door openers, industrial safety apparatus, etc.

The kit allows engineers to work with the small IC on a USB stick controlled by Vishay's measurement-and-control graphical user interface (GUI). I recommend the kit but with a few reservations about the quality of the accompanying manual. You must decipher many sentences and try to determine what the authors mean. I had hoped for real-world examples, which the otherwise good application information lacks.

The $35 kit worked well, and the software plotted signals from the sensor that takes into account and rejects ambient light. Software reads from or writes to 11 registers via an on-chip I2C port to set operating conditions such as LED current (10mA to 200mA), an ambient light parameter, and 16-bit ambient light and proximity values.

Read the rest of the story

Discuss this article in the forums (3 replies).

Dave has posted EEV Blog #186, covering surface mount soldering techniques.

"Now the 1206 is an absolute monster.  Steveie Wonder could solder this thing!  It is so damned easy."

Recommended viewing.

eev_blog_186

Using Fixed Voltage Reference (FVR) for A/D conversion in enhanced mid-range PIC microcontrollers

Here's another great article from Embedded Lab.  The FVR (fixed voltage reference) is included in the 18Fk-series parts with various capabilities.

The reference voltage plays a very important role in any A/D conversion. It determines both the range and the resolution (Volt/Count) of the A/D conversion. Besides, the accuracy of the conversion also depends upon how stable the reference voltage is. Usually in PIC microcontrollers, the reference voltage for A/D conversion can be selected as the supply voltage itself or provided externally through one or more I/O pins. But the new enhanced mid-range family of 8-bit PIC microcontrollers have a built-in module that generates a stable reference voltage internally. It is called Fixed Voltage Reference (FVR) where the output is very stable and independent of the supply voltage (VDD). The output of the FVR can be configured to supply a reference voltage for A/D conversion internally. This article describes how to configure the FVR module to derive the reference voltage of 2.048 V for A/D conversion in PIC16F1827 microcontroller. The analog signal for this experiment is taken from the output of a LM34DZ temperature sensor. After the A/D conversion, the PIC16F1827 displays the temperature on a 2×8 character LCD.

Isn't this an awesome board layout on perfboard?

Read the rest of the article

Related article from Embedded Lab: Voltage monitor for car’s battery and its charging system

Discuss this article in the forums (10 replies).

A Lesson Learned the Hard (and Expensive) Way

The following is from Gary's Blog on EEWeb.  Think you know what happened?  Click the link at the end to read the read of the blog and learn an important lesson.

How to Destroy Data and Hardware, Wholesale.

So a nice holiday weekend, I decide to reorganize my home office and set up some extra equipment I had sitting around. I pull everything out, unplug all the cables, and dress everything up nicely. I add a network hub, and set up an old PC that I use occasionally, and added the power wall wart to the USB hub I’d been using. Also fixed and set up a scanner. It all looked great and I had more workspace as well.

After that, I did have a few hours of work to do for a client, and the latest files were on a thumb drive so I plugged that in and sat down to work. Odd, it doesn’t recognize the thumb drive. I try another one, and it doesn’t see that one either. Hmmm, no external USB HD as well. Plugging directly into the PC USB ports doesn’t work either, but my keyboard and mouse are working OK. Ah, I think I’ve heard of this – Win 7 not recognizing USB mass storage devices. A quick check of the Googlenet, confirms that this is probably the problem. Unplug everything, reboot, uninstall/reinstall drivers. Nope. Roll back the last Windows update. Nope. Stumped.

Well, it’s getting late, and I have work to do, I can get the files off the thumb drive on another PC. Plug it in, and* that *PC doesn’t recognize it either. Same for the other thumb drive. What the flock is going on!


Think you have the answer?  Read the rest of the story.


Discuss this article in the forums (6 replies).

Dave has posted part 2 of his soldering tutorial.  Recommended viewing - even if Dave does say "It just looks like a big mound of turd...I don't know."

Advanced Circuits Tour - How PCBs are made

Advanced Circuits Tour

Posted by Andrew on June 20, 2011

Last year around mid-November Eric and I (Base2's owners) were in the Denver area and were fortunate enough to be able to visit the circuit board manufacturer that we frequently use - Advanced Circuits. They were kind enough to give us a tour of their facility and explain the manufacturing process every step of the way - and let us take pictures! We'd like the thank Tony, who enthusiastically gave us the tour, and Forest, our sales rep who setup the tour. Advanced circuits has an amazing facility and it was quite an experience to see how the boards we order are made. On with the tour!

See the full story - click here

Discuss this article in the forums (2 replies).

Hacking the PIC 18F1320

opened_state

 I came across this Article and thought the people here would find this an interesting read.

Andrew “Bunnie” Huang is well known for his Xbox hacks.

He wanted to try out some reversing techniques on programmed PIC 18F1320 chips he acquired in order to read the secured FLASH memory.

After having the PICs commercially decapped, he analyzed the silicon under an electron microscope revealing the location of security bits relative to the FLASH memory he sought to read. In this tutorial he reveals the further tedious steps he took to complete hacking the PIC 18F1320 to read the memory data.

 

READ MORE:

Visit website http://www.bunniestudios.com/blog/?page_id=40

Discuss this article in the forums (1 replies).

Forum Activity

Member Access