Monday, October 13, 2014

ChipKit Uno32 and ENC28J60

I've been having a bit of a problem understanding the Arduino/ChipKit environments. It's not like my typical embedded environment where I can include libraries without any issues. I've undertaken an effort to port the UIP Ethernet library to my ChipKit UNO32. The Arduino Uno UIP library works very well but the use of the AVR's registers makes the library non-portable. So I spent some time understanding the library which was actually pretty easy to do. So I proceeded to include the ChipKit DSPI library but the IDE couldn't find the files (???). So I copied over the DSPI.cpp and DSPI.h files to the UIP library directory and I was able to get the modified UIP library to compile. I'm not too happy with the size (double that of an Arduino compile). I'll look into that later. For now I'm more worried about getting it working. Then I can worry about making it more efficient, I still have much to learn. Right now I think I understand the way the SPI works. And I have the ENC28J60 data sheet and it too is pretty well understood. Next I must begin to test the library's operation.

Sunday, July 13, 2014

Burning down the house

Well I had a very interesting July 4th holiday (USA). That Saturday I developed welts on my arms after being out in the sun for 4 hours (and I was 2 hours from home). I had gotten a severe sun burn the week before when I forgot to put sun block on my arms and went out for an 80 mile ride. This week I put on sun block but got the welts anyway. Later, I went to see the Doc and he said long sleeves, sun block and anti-infection lotion until it heals. I have at least one light long sleeve cycling jersey that will work for my bike rides so I won't miss out on the mileage. :-)

Now on to more serious burns. About a week ago I ran into dimming and flicker lights and appliances. Sunday the flicker became huge problem. I thought for certain that the house was going to burn down. Some lights and appliances would flicker and go out for 30 seconds at a time (that's really bad). Others showed no issues what so ever. I checked out evertyhing and I'm pretty sure I'm not over the current rating of any branch, the breakers are cool, and the outlets and swithes showed no evidence of arcing. I pulled everything that wasn't absolutely needed and the problem lessened but didn't go away. I checked my notes and found was that the problem only occurred on phase 1 of a split phase service and the voltage dropped to 0 when the problem occurred. I called the power utility and when they arrived they found that the service drop was bad. The gentleman pointed out that the drop didn't look good. After he replaced the ends he noted that it was melted like too much power was being used. He also noted that the voltage was low, at 116 v AC. While I don't think we're using too much power, I do have to take into consideration that he knows what he's talking about. So I'll start monitoring my power with my Brultech ECM-1240s I picked up last year. I'll used the Brultech to investigate if I have too much load in one place (i.e. breaker or phase). This house was designed more than 50 years ago and it's possible that most of the load is on one side rather than shared. At the moment my battery backup still occasionally beeps. This wasn't a concern in the past as the power in the area isn't the greatest, especially during the summer. Now every beep is of great concern to me.