Saturday, November 12, 2011

Arrgh....*poof*..

The DigiLite DATV project has taken me on an interesting (and kinda expensive) tangent in the last few days.

About 2-3 years ago, after years of doing small Micros and PIC processors, I decided to try out the AVR and the open source WinAVR GCC tool chain for the AVR's.  I never did get into Arduinos except for hardware-- I bought a few Sanguino boards which are an ATMEGA 644P version.  I got shipped 644's instead of 644P's and it wasn't worth shipping back (my order was correct, the shipment wasn't).. so I used those.

I decided that for the DigiLite DATV project to make my own programming board for the "Ultram Tech" PLL board rather than using the BATC Closed source or F1ACN "demo PIC basic" solution.  Initially, I didn't want to do the software work required to use WinAVR (see previous posts when I was working on the HF amplifier-- which I will get back to someday!), so I decided to see how "beneath me" the Arduino IDE actually is/was.

I'm actually fairly impressed by it because it does actually hide the GCC tool chain within it so the actual hit to the performance and RAM is minimal.  It is really well designed.  In the meantime I decided to order off a Chinese clone of a Arduino 2009 and  a LCD shield to go with it.  It cost $29 shipped for both.  It will be the "GUI" for the PLL project.   The physical packaging is nice.. it'll be nice and really that inexpensive PLL with the inexpensive control could also make a really nice "poor man's microwave signal generator".  The commercial Arduino 2009 version has a FTDI serial chip on it so ideally my version will have both a 2x16 LCD display and also USB (CDC serial emulation) control over the PLL.  I'm getting more functionality out of this unit for less work and $ than the two PIC based solutions.

I think I am going to post on Amateur Radio.com a "Zen of Arduino for Ham Radio" describing the potential uses of these little devices and a small quick tutorial (maybe here if it gets lengthy or too technical).  Anyway.. all is well with that project.. It took me about 20 minutes to build up a Sanguino and a HD44780 display and write 80% of the GUI for the PLL.  This was before I got the e-bay modules (which are quite nice).  To port off to the real Arduino (ok clone) took literally 10 seconds.

I'd have the whole thing done now.. but I need to figure out the control words for the PLL chip... this will be easier when I actually receive the PLL.

I can see the reasoning for "Arduino" even though those are slow, 8-bit processors that are a bit pricey for what they   are... but for someone who wants not to delve into programming these are ideal.

Anyway.. I also decided that I should use these to teach the older boys how to start programming rather than starting them off on Linux or MS Visual Studio.  So I got the "wild hare" up to dig out another old project--

About three years ago I bought a WizNet812MJ (W5100) module for about $35 with shipping (which was expensive IMHO) to do the DVB-S project on a FPGA.  The intent was to use Ethernet at the max 20 Mbps SPI rate the W5100 was more or less capable of.  I did get it to go with a small micro, but at the time the code to do the stack was substantial and I ran out of time.  In the closet that module went.

I decided, hey, the Arduino Ethernet Shield is basically the W5100..the arduino has a nice library for it.. no work, right?   So I made a breakout for the breakout, and put a L78L33ACZ 3.3V regulator on it and wired it into a breadboard.  What I didn't realize is that on the Sanguino board the SPI is currently "broken" on Arduino >-019 .. it's fixable but it's not a simple fix.

I almost had it.  (It has to do with the Arduino code not knowing the different pinouts of the SPI UART on the ATMega644)..

This is only a minor ARRGH.. though.. I was on my way to find out the issue with the module..  It is, by the way 3.3V but 5V tolerant for the inputs.  One thing that has to be done is resetting the chip.  I did this by tying into the RESET on the Sanguino.  I didn't yet (I'm getting some from...yes..e-bay china) have the little push button reset buttons.  So I have been resetting with a jumper wire.

Well.. guess what I did when I almost had the SPI issue resolved on the Sanguino/ATMega644/Wiznet?  I bumped the unregulated voltage when resetting it.  The Wiznet W5100 is 5V tolerant.. but it's not 8V tolerant!  :O(  The LCD was fine and the ATMega was fine.. no it couldn't have been something I had multiples of that is easy to get.

So it happens to all of us I suppose.  The bad thing here is that it costs about $25/module now with shipping (I did buy two more because I do have a couple of future projects and I want to teach the kids by making a little sensor driven Internet device-- weather station maybe?) and I also decided to buy an actual shield from.. yup... China.  I wondered why the lines on the Arduino shield are buffered on a 5V tolerant chip.  I now know.  So in a millisecond it cost me about $75.  OK the $25 for the shield was coming anyway probably.. but $50 for two more modules.. not so much.

Lesson:  don't do something that stupid.. or if you do put the chip reset on a GPIO line!

The good news (as it is) is I fired up the X-Tronic hot air gun and got the chip off without totally destroying the board.  (It looks good and I didn't drop off anything from the bottom!)  So if a place that charges reasonable shipping (Saelig is out, for example) and doesn't require minimum order of 5 of them (like WizNet direct or Jameco).. I can fix the module.  SparkFun carries them but are out of stock.  So if a SparkFun guy sees this I'd like the $6 solution to the $4 problem too to fix the module I have.  !

Like ham radio.. electronics is an expensive hobby.  But I do love it and I guess since it became my life and living I am blessed.

But boy do I feel downright dumb tonight.

1 comment:

  1. Hello, digilite is an interesting project for DATV,I saw your video on youtube, it would be interesting to see more videos on setting up the program Digilite for NTSC,I also want to build one, I already buy the pre-programmed PIC and the USB module,to the other components took me a while to get,I hope not much.My first tests with DATV: (www.televisiondigitalamateur.blogspot.com)
    Josue

    ReplyDelete