Sticker shock

I started making a bill of materials (BOM) for the power monitor and realized that each node was likely to cost $30 or more.  With 30 nodes to make, I am looking at a $900 in parts. Perhaps I need to rethink the project. Continue reading

Posted in Home Energy Monitor, Projects | 4 Comments

Design pretty much done with design!

I got a good chunk of time in the lab this weekend to pretty much nail down the design for the Power Monitor. I now have two sensor nodes on breadboards connected to an Arduino reporting data back to a Linux box. I will now transition into designing the PCB to get sent out for fab. Learning Eagle as I type for that exact purpose. Continue reading

Posted in ADE7763, Components, Home Energy Monitor, PIC, Processors, Projects | 5 Comments

Programming PICs

Last few evenings I have had a few minutes to start programming my 16F627A PIC. So far I have been sucessful in reading and writting IO pins and using the external interrupt. Although my PIC does not support the debugger, I have not had any problems I could not debug by inspection or by twiddling an external IO pin.

Although I purchased the 16F627A for its comparator, I think the chip will be fast enough to do my task just using reading from on IO pin and writting to another. The latency seems to be in the handful of microseconds something I can tolerate. But I will explore the comparator just to gain that knowledge.

Next stop is programming Timer0 to act as a timeout mechanism. Should be done by the end of the weekend unless I get called into work.

Posted in Home Energy Monitor, PIC, Processors, Projects | Comments Off on Programming PICs

PICKit-3 and the 16F627A

Saturday I spent the whole day getting my wife’s sewing machine running again. Sunday morning was spend on domestic jobs. Sunday evening I got some time to start back on the the Energy Monitor project. First thing I did was to solver the PIC16F627A SMT parts to prototype adapters. Next I got the chip put down on a breadboard with the crystal and load caps. After that I connected up the PICKit-3 and tried to right the classic blinking LED test program. At first all was working well. But then I stumbled on a few problems. Continue reading

Posted in Furnace Monitor, Projects | 1 Comment

Adjusting the timing of an industrial sewing machine

My wife has an industrial sewing machine used for quilt making. Over the last few days it has started to act up. Last night and tonight I have been working on the machine adjusting the timing rather than doing any of my own project work. Not complaining just explaining.

One thing I will say is that sewing machines are bloody marvelous. The exquisite mechanical linkages, gears, and manipulators are ingenious. But also very finicky. Having to get the thread tension, and timing of the needle and hook just right is a pain. You have to remove an access panel and then loosen three screws to adjust the timing of the hook. The hook needs to pass through the scarf of the needle by just a few thousands of an inch and in a narrow angular range. And when you tighten the screws, it changes the position. Very frustrating. Too close and it “pings”. Too far and the thread gets mangled. Get to work on it more tomorrow. What joy!

What I don;t get to do is play with the new Sparkfun parts that came today as well as the PicKit-3 that came from Digikey yesterday. Perhaps I will get time on Sunday.

Posted in Personal | 2 Comments

A few steps forward

This weekend I was able to spend some time in the lab. I got the Arduino to ADE7763 interface cleaned up and working using the hardware SPI peripheral. This greatly increases the speed that I can access ADE registers.

I then took a detour in learning to program a PIC micro. I will be using a PIC to drive each ADE7763. I had an old development system that I was able to use with MPLAB to start doing some simple things like blinking an LED. By the end of the weekend I had the prototype of my application done. But the prototype lead me to realize I had a speed issue. To switch the chip select on and off was taking 60usec. This is almost twice as long as it takes to transmit the 3 or 4 bytes of data. Either the PIC is very slow (clock was 20MHz), I am doing something wrong, or I need a beter way.

Assuming I need a different solution to my chip select problem, I ordered some 16F627A chips that have a built in comparator. I think I can use the comparator to pass the chip select on to the ADE when selected at a very fast rate, and then force an inactive chip select when the sensor node is not selected. I also ordered a PicKit-3 programmer to make the programing of the chip seamless. The old programmer was a standalone device. The PicKit-3 should work in circuit.

Posted in Home Energy Monitor, Projects | Comments Off on A few steps forward

2 Steps back 2 steps forward over 1 week

I tried to migrate the ADE7763 chip from bit-banged SPI to the HW peripheral in the Arduino. Should have been easy right? Continue reading

Posted in Home Energy Monitor, Projects | Comments Off on 2 Steps back 2 steps forward over 1 week

NIOS2 FPGA work

At work I got assigned to write a very simple control system for a device we are making a prototype of. For various reasons, the designers choice to use an FPGA with a soft-core processor. What this means is that the processor is simply made from available gates on the FPGA. A fascinating concept and one that has advantages such as adding a new instruction to the processor to support some weird thing you are doing.

In my case it was just a matter of sending and receiving some serial messages, controlling some SPI devices, and tickling some IO pins are appropriate times. How hard could that be?

When each development iteration takes 25 minutes to compile, when all you have initially (till you get the UART to work) is one IO pin to blink for debugging, and the stock C library is too fat to fit into your available memory footprint, it can be very hard. For the whole week I have been working every waking hour trying to get ready for a demo early next week. And since I have the time to write this post, I succeeded late last night.

I still need to support the integration team over the weekend, but I should be able to get back to my own home projects soon.

Posted in Personal, Projects, Software | Comments Off on NIOS2 FPGA work

Swamped at work

Having to take a small break from the fun stuff as I am swapped at work. Hope to be back in a week.

Posted in Uncategorized | Comments Off on Swamped at work

Power meter design-2

I think I decided that the easiest and simplest solution to the chip select problem is to use a small PIC processor to receive a serial data block with the address that the master processor wants to talk to. If the PIC sees that that address matches its own (defined by DIP switches) it will enable the CS.

Why a PIC? I love the MSP430, but being a 3.3V part, I did not want to mix voltages with the ADE7763 that runs on 5. PICs are cheap and ubiquitous with lots of free support at tools. I also happen to have a PIC programmer (EPIC) I purchased way back in 1999. So now I take a break and start writing the code for the PIC.

 

Posted in Home Energy Monitor, Projects, Uncategorized | 6 Comments