An evening of measuring inductance

I was inspired by Alan Wolke’s ( @W2AEW ) video on measuring capacitors and inductors with an oscilloscope. I tried it out and it works pretty reasonably; yeah why wouldn’t it? Anyhow, if you can do it on an oscilloscope it can be done by a microcontroller right?  I have been trying to keep myself from buying this $220 eBay LCR meter on eBay.. it looks nice enough (model: MCH2811C). I needed to make this a project or I was going to pull the trigger on some Chinese garbage!

I went with simple and cheap, I don’t know how well it’ll work out yet but I bread-boarded a proof of concept design. It tested okay after some modification. The first road bump was I had found the PIC output pins had unacceptable rise time compared to 74HC14. The first change was using the PIC output to drive the 74HC14 HEX inverter to get the quick rise time needed.  I’m throwing a fast edge at the tank circuit that includes an “unknown” inductor and then I do my measurement, just as Alan used his homebrew TDR circuit. I went really low tech on my measurement circuit, I may change this. I used an LM339 comparator and a trimmer as a voltage divider. The first couple waves in the tank “ring” trigger the comparator and I measure the frequency by figuring out the time between the positive pulses by timer. Pretty simple no? It works fine as it turns out. I will have to get a better capacitor and ensure I measure it very accurately to do my math in the PIC and get a reasonable result.

Instead of the usual photos I made another YouTube video. It wasn’t a great one, one take, no editing.. it’s gets my point across (kind of).

My project proof of concept for the PIC L-meter. With the addition of a known inductor and a rotary switch and a little more code you can turn this into a PIC LC-meter in no time.

 

Project Update : 4D Systems μLCD-43PCT / Si4707 Radio

So as suspected the uLCD-43PCT display worked just fine once I got their USB-RS232 dongle.. it has a RST pin.. maybe it uses it in some way when programming? I didn’t do any research because I just wanted to try the display out but maybe I’ll check that out later.

I used Visi Genie which is one of four options you have for configuring their displays. It’s not bad.. but it’s not great. It gives you a very limited number of switches, buttons, numeric displays, etc.. but it worked. I also haven’t found a way to send text to the screen which I can’t believe I couldn’t do.. I just haven’t found it I hope? You can dig in and actually use some of the other configuration modes in which I imagine you can design your own display in detail…again maybe some time I’ll check that out. It’s all code and looks like it would make for a very long day or two. The Visi Genie took me about 3 hours to figure out and configure the display. I ran into a few issues.. of course some of my time was just picking what colors I liked best. The colors show up on the monitor a little different from the LCD so that took some tweaking.. also I noticed the LCD is a little less readable than their simulated display: no big deal though.

The really REALLY annoying bug that took me about an hour to figure out (while was figuring out the serial protocol) was the “LED Digits” module… I dropped it in, selected 6 digits with the decimal place in the third; check, no problem. When testing I could write 1, …. 2, ….3,… WTF? See photo below.

4D Systems LED Digit 3

 

How did that happen? The serial commands were right… after a while I dropped in the Custom LED display.. this next photo shows both displays with “200” written to them.. note: the larger LED segments has the leading zero’s turned off (hidden), it’s setup at six digits.

AARRG!!!?!?!?
AARRG!!!?!?!?

…… sigh.

I finally switched my display from 6 to 4 digits as a test (well really 2+4 digits). Success! I guess the program doesn’t like over 4 digits which makes sense because after I figured the serial protocol out there is only room for 4 digits  in the packet. Why does the program allow for more than four? The program does a pretty good job of limiting everything else … oh well. It’s finished

The display set up to my satisfaction.
The display set up to my satisfaction.

Next steps … I’m deciding if I want to wait for the Tautic 18F26K22 dev board or order something and use one of my protoboards or even just stick with the 16F1509? I’ll figure this out shortly once I decide how I’m going to mash this all up together. I ordered another Si4707 from Richard @ AIW Industries. Hopefully his board is decent: It has promise with the BNC connector and you can buy a fairly cheap Larson whip from him for 12$ and change for the right band which is pretty nice (no more random-wire antenna!). I’ll probably have to shelf this project for a week until it arrives anyhow.

I started up MPLAB 2.05 after the update… I want going to start programming but didn’t get far before I ran into this..

<3 MPLAB

It looks like it marks “TODO” in tasks!!?…. I don’t know if this was an option before but I usually just //TODO if I have something I need to get to… perhaps the update reset some toolbars? I don’t know but I really like this feature. I love me some MPLAB.

Day 1 with the 4D Systems Intelligent LCD: Fail.

First off, I can point fingers, you can point fingers, who cares.. the fact is I’m pretty underwhelmed by my first day with the “Intelligent LCD”. I purchased the 4D Systems uLCD-43PCT LCD based on a SparkFun YouTube video describing how to use the product and associated software.This product is “intelligent” because it has it’s own processor and serial interface. The idea is to build the interface in software on your PC, drop it on a flash card and program the display.. then just use some simple serial commands to update the display, offloading all that work so I can add this to simple PIC projects with ease. By the p/n you can tell I got the 4.3″ LCD with capacitive touch screen.

I ordered the LCD second day air from Mouser ( @MouserElec ) because they offered the best price I could find. ($190+20) On the YouTube product review, Nick at SparkFun mentioned that he was using the 4D Systems USB to serial adapter because Spark Fun’s doesn’t work and can damage it (due to wiring?). I checked the specs and it says the LCD is 5V tolerant. I used my USB to serial adapter (TTL serial) which works great with PICs as long as they’re 5V tolerant. Well unfortunately, no luck… I can tell the LCD is communicating in some fashion because with a terminal client and with the terminal client built into the “Workbench” software (wasn’t that the name of the Amiga OS?).. in both programs I could enter carriage breaks or other characters and get some serial response from the LCD (usually NULLs (0x00).).. so there is some communication going on.. but the Workbench software itself declares the LCD is not attached. I also confirmed some communication with my logic analyzer. I ordered the 4D systems USB converter from Sparkfun and now I’m back to waiting. How lame.. if you really-really need a specific adapter why not just include it? what is the BOM on something like that? $1-2

I guess I’ll find out in a couple days when my Spark Fun order comes in. I was really hoping to get my display loaded. I spend a few hours on Sunday and Monday tweaking my design… TBC.

01ac1faae7f7a345fcea704ccb59b096fffb9fc41e 019f6ccc9d33cd592d6fa150307fb3f9bed275f037 0129ce0b8710388f61d5c50c95fcf4ec4ab9e0d820

Experiment: TCN75A Temp sensor investigation

I covered the TCN75A i2C sensor a few weeks ago in a simple test to practice using I2C. I had never used I2C before and I knew it was time to stop avoiding it and jump in if I was going to use some of the fun chips and modules. Shortly after posting my results and code I jumped into @tymkrs IRC (visit their site if you’re curious) and Victor ( @vicatcu ) must have at least caught the article subject as he asked me if I noticed the chip runs a little warm (I think he mentioned roughly a deg C?). I had also noticed that oddity myself but I ignored it as I was only concerned with the actual communication. Victor  ( @vicatcu ) posed the question: what would happen if I had a vented circuit board? Would that cure the chip from running hot?

Well that was half-brilliant wasn’t it? I had to know! Does under chip venting on the PCB effect temperature readings? I decided to purchase more sensors and SOIC break out boards as well as make sure my Fluke 51 was calibrated.

Upon receiving the SOIC breakout boards I took one and carefully used a Dremel to mill out the package outline. I had started to design my own PCB  but I abandoned that because I didn’t want to wait for fabrication. I mounted the new sensor on it’s vented PCB then plugged the sensors right next to each other on breadboard and put the temperature probe wedged between the boards. Obviously factors like mounting the sensor near power transistors or near your power supply are always going to have some effect on your readings, and in some cases maybe that’s what your application is meant for. I wanted to take those factors out of the equation. My workshop heating and A/C was off for over a day when I did this test… no windows where open and the chips had been prepped for about 1/2 hour on the board while I wrote the code to test them out. I decided to read data straight from the I2C bus with some confirmation on RS-232 telemetry. I did this in case I introduced any math problem in my conversion in code. I also stuck with Celsius over Fahrenheit because that was the native output of the sensor.

SOIC breakout board with vent cut into it
SOIC breakout board with vent cut into it
The setup of the initial test.
The setup of the initial test.

After downloading code and checking everything out my Fluke 51 read 25.8 deg C, the un-vented TCN75A read 26.06 deg C and the vented TCN75A read 25.81 deg C. Over time the un-vented sensor would measure up to 0.400 deg C away from the other two. It’s not 1 deg C but it is something.

The TCN75A boards are back to back with the K type probe between them. To the bottom right you see the I2C pull up resistors with the logic analyzer tied to them. The PIC16F1509 is just to the right.

Temp sensor telemetry
Temp sensor telemetry; don’t mind the calculator. I was confirming a hexadecimal I2C address.

Test #2, a muffin fan…. same set up. No real change; roughly the same results.

Test #3! What about a change in temperature? I grabbed a cardboard box, put my test circuit and a bowl of ice with some water in the bottom of it, with a muffin fan blowing into the bowl and covered the whole thing in with saran wrap. Not the most insulated thing but I was only looking for a couple degrees. The test proved interesting… both sensors had some lag, and the venting only offered some minor help. It caught up first but they still have a fair amount of lag over the K type probe. In the graph provided I measured at even intervals over 15 minutes. The box settled out at the end (not enough insulation I imagine) the temperature flattened out so I dropped that data.

The Fluke 51 with K type thermocouple vs the normally mounted and modified mounting TCN75A temp sensors.
The Fluke 51 with K type thermocouple vs the normally mounted and modified mounting TCN75A temp sensors.

I can live with the results. I think if I were going to design a board where I wanted as close to an accurate temperature as I could get with this part I would definitely have a milled vent. In hind-sight I would make the vent so it is along the chip axis and protrudes past the edges of the chip. Thanks again to Victor for the great idea!

Weller WD1001 and other updates

I’ll get the “other” updates out-of-the-way before talking about my new love! I’ve collected a solid number of PIC development boards over the last couple years and in about 3-4 weeks I’m going to do a review over what I have collected and what I’ve liked and disliked about them. Do you have any suggestions on a board I just can not miss? I am not sponsored, nor do I collect any money from blogging so I’m not going to buy dozens but I’d be willing to buy a few additional boards if someone has been holding off on pulling the trigger on a purchase. I’m not much of a “review” type person but I’m passionate about development boards for prototyping and I would hope my review would help give someone something to think about before purchasing something for their first or second project; PIC based or not. E-mail away!

It’s a changing of the guard on my bench. My beloved EC1002 is being replaced by the WD1001. It took me a while to decide on the WD1 platform. I decided on the WD1001 over the WD1002 strictly based on the pencil. The WMP appears to be more helpful for small circuit soldering. The WD1 base is very robust, it could be used as a weapon in a pinch. They cord to the pencil appears like it’s made from something that’s near impossible to tangle and is very flexible. The stand… a dream. The only thing it was missing out of the box was a connector to ground it. There is a base connector attachment which appears to be a 1/8″ mono tip/sleeve audio-type jack. I’ll just have to build something myself. Otherwise I’m in love with the purchase.

Weller WD1001 boxed

@whixr was really trying to sell me on the Hakko FX-888… he is in love with his. I did consider the purchase despite feeling like the blue/yellow made it difficult for me to take it seriously as a tool. They have a new silver version; Perhaps I’ll buy one to test out and send to my brother. I was also seriously considering Metcal.. but after a little I can tell I’ll have no regrets with the WD1002.

Old and New

Adam Fabio was definitely on team-Metcal and he just about had me sold. It all boiled down to a review of the WD1001 on YouTube and how agile that pencil is.

Check out how close you are to the work with that WMP handle! I really feel in control.

The handle and tip perfect for up-close small work!

 

Not the most exciting thing in the world, but a good iron really makes like easier. I put my time in with 25 and 35 watt wall corded pencils. The old radio shack models, even the 35W weller… nothing beats a nice thermostatically controlled station.

%d bloggers like this: