Aaron's CE Build Log

Hi all. I came across Contextual Electronics last year. Sampled many of the videos. Made a board list and started going through it. I like that the CE courses are project based. And I really like that students have shared their own unique takes on the builds. I am learning a ton from reading these experiences, so here I will try to share my own.

1 Like

First up is the Getting to Blinky board.

Partial Disclosure - I did not start with the blinky circuit. Perhaps I should have. Though if advising myself, I would have ignored my own advice and started where I actually started - which we will get to later.

My take on the Blinky is also an experiment in my hand-soldering capability with the tools that I have. I created three blinky circuits that are schematically similar but using different components: Thru-hole, SMD 0805, and SMD 0603.

Here is the Schematic:

Here is the Layout:

Here is the board blinking:
3xBlinky

Mistakes:
Initially, I was only able to get the thru-hole and the 0805 to blink. I de-soldered and re-soldered the 0603 components, and checked solder joints with a jewelers eyepiece, but could not find the problem. Probed the circuit, and then went back to the datasheet and schematic. For some reason I ordered the wrong part. Though they share the same datasheet, the MIC1555 is different that the MIC1557. They do not share the same pinout. Not even close. Details like this are apparently important. Replaced with the proper MIC1555 and they all three blink.

Findings:
After building this board, found that Art of Electronics (Fig. 4.84 p269) has a figure that investigates the same three sizes! One finding that I did not expect was operation at different power levels. Lowering with the voltage supply, the Thru hole Blinky stops at 2.3V, the 0805 stops at 2.2V, and the 0603 keeps blinking down to 1.7V (datasheet says minimum voltage is 2.7V). Better performance to go to the smaller parts.

Next Revision:
I should have probably tried smaller 0402, 0201 components, and maybe a DFN. These are small enough that they would not have taken up much space, but I would have learned from the attempt. However, I think I will stick to the 0603 as the smallest for now. Also would have either used tighter tolerance parts, or put in a potentiometer to be able to tune the blink rates to either make them all blink at once or in another pattern.

I am using KiCAD v5.1.9. Boards are ordered from OSHpark. And Digikey for parts.

2 Likes

Any thoughts on what might explain your observations?

It’s a great, concise log and I’m impressed you used the opportunity to compare the emergent systems using the different component scales. A good learning opportunity - for everyone! Thanks!

1 Like

It might be interesting to put 0603 components on the 0805 pads (they should fit) to confirm your component size vs voltage findings.

1 Like

@smerrett79 Thanks for the kind words. As for thoughts, AoE says “…smaller components generally deliver somewhat better performance owing to smaller parasitic inductances”. Bold emphasis mine. I am generally skeptical of somewhat inconclusive explanations that use the words generally and somewhat. Especially at the end of the paragraph. I think AoE may be hinting that there might be more here. I don’t know.

@Graeme I like your thinking. However, the 0603 is similar size to 0805 (relatively) and I have more skills in degrading circuit performance, so I tacked on thru hole resistors and capacitors to 0805 pads. See picture with 0805 original (top) and obnoxious technician (bottom) versions.

The bottom circuit blinks and guess at what voltage? It turns on at 2.3V and off at 2.2V, just like the original.

I have been thinking more about the question on the improvement with smaller parts and why. I was concerned it might be in the LEDs, since the 5mm LEDs are part of an older generic kit. Since I have extra perfectly produced purple pcbs and a spare set of components I build up another board, and tested it to confirm original results. Then de-soldered 0805 and 0603 SMD LEDs and replaced with 5mm. Here is the board blinking at 2.6V.

5mm_Blink

As you can hopefully see, replacing the LEDs did not change the performance - the MIC1555 (far right) blinks the LED the brightest at 2.6V. The difference is very apparent. Drop-out voltages where blinking stops are similar to those measured above with the MIC1555 the lowest.

I am still skeptical that all of the improvement can be explained with “parasitic inductance”. It sounds too much like a “because physics” answer - while technically correct, might not be explaining everything. I don’t know. The DIP and 0805 are schematically identical, but the MIC1555 is designed different (without a discharge pin) and allows for the removal of an external resistor.

In the context of where we are right now (Getting to Blinky), my hypothesis is that the increased performance comes from a number of modifications over the years by talented engineers to improve both the design and fabrication of the parts with tighter tolerances. The main driver of which may be reducing parasitic inductance.

The key takeaway: As a learning pcb designer, I am the very lucky beneficiary of all this improvement - if I can leverage these better smaller parts in my designs.

Thanks for the question @smerrett79! It made me investigate further than I would have on my own.

1 Like

Parasitic inductactance values between 0805 and 0603 wont be the reason. The inductance will be many orders of magnitude below a value that will change the performance

kvk is correct, those parasitic effects are very unlikely to be significant on a circuit that’s basically operating at DC.

You don’t mention the manufacturers of the ICs, apart from the MIC which is obviously Microchip.

TI’s data sheet for the NE555 recommends a minimum operating voltage of 4.5V.
Microchip’s data sheet for the MIC1555 says 2.7V minimum.
NXP’s data sheet for the ICM7555 says 3V minimum.

The fact that your ICM7555 “works” at 2.2V and your MIC1555 “works” down to 1.7V is simply the result of conservative ratings and the fact that you’re not rigorously checking that they are meeting every single specification at those voltages.

There’s no point in chasing ghosts on your boards looking for the reason for the “discrepancies”, they are in the silicon.

@kvk and @JuliaTruchsess Thank you both for your insights. Much appreciated both here and in your contributions elsewhere in the forum.

Blinky follow-up:
Both the DIP and 8SOIC are NE555 from Texas Instruments. Min voltage 4.5V.

I did not rigorously check, no. I had built the blinky circuit before I came across the AoE passage, wanted to check something, and turning the voltage knob lower was easiest.

On to the next board and chasing different (and hopefully more useful) ghosts!

Moving on to CE Header and CE Sensor.
The CE Header is a great idea. Following previous students comments (Thank you @Steve_Mayze ) I created both a socket and header footprint. There are already some good writeups on troubleshooting this board.

Based on previous students experience, I wanted to make the board bigger so it was easier to probe. And while doing this, decided to put both a header and a socket on the same board. I thought perhaps I could connect two sensor boards to one header board, if the sensors that I wanted to use were on different boards. This was also my first introduction to the Teensy, and I used the Teensy 4.0.

There were a couple of pins on the header not populated, tempting me to find something else to connect. I added a couple stretch objectives. Since the sensor board measures temperature and light already, I decided to try and add a microphone for sound. I also wanted some experience with hidden pads and with op-amps.

I selected on an analog microphone, the Knowles SPQ1410HR5H. The low bar goal here is to get the Teensy to detect if there is sound or not. No signal analysis.
image

The microphone has 4 hidden circular pads, two of which are ground, so thought maybe I could get this to work. The microphone output is connected to a LM358 which is a dual-channel op-amp. The circuit comes directly from the suggested interface circuit in the SPQ1410HR5H datasheet. I left the 0805 resistor values TBD, and put in plenty of 0Ohm resistors to be able to connect and disconnect parts of the circuit. Here is the final version of relevant schematic snippet:

Here is the layout and 3d model of my version of the Teensy Breakout:

Here is the Sensor board (Note: U4 is the microphone.)
image

I won’t share all the ghost chases, but will share the setup that I used. I built up one sensor board with everything populated, and then used another sensor board to populate only the microphone and associated components (see bottom board below). I used 30AWG hookup wire and soldered this to the leads of the microphone to their respective pads so I could see them to make sure I had good (relatively) connections. Then during testing, I could verify that the output of the microphones were the same between boards, and do the majority of resistor swapping on the test board, then transfer the final resistor selection to fully populated board.

The Results:
With Chris’s guidance, and reading through previous students work I was able to get all original circuit sensors to work. The stretch objectives were more difficult, and I had to go between board, simulation, and testing quite a few times. But I was able to get the microphone to pick up sound, and get the signal into the Teensy.

When the music stops, the sound signals settle to ~1.65V. The snippet of code that is shown - type “k” to get the chasing LEDs.

CE Header

Mistakes:

  • While troubleshooting the boards, I reread the datasheets and noticed the Knowles SPQ1410HR5H datasheet design guide says not to use Class 2 dielectric capacitors near the microphone. The KEMET X7R ones that I used (C5 and C6 in schematic above) are Class 2. I used these because they are used elsewhere and when constructing the layout, copied them over. The datasheet and design guide do not go into detail about what size or type capacitor to use, so I started looking for an acceptable replacement. And, as I sometimes have a propensity to do, went off into the weeds. Then circled back. The capacitors “worked” for what I was trying to achieve. However, if doing this circuit again, would do a better search for these capacitors.

  • I put two zero ohm resistors on the bottom of the Teensy Breakout board, in case I messed up TX and RX. These were the only two components on the backside, and I put them there because I didn’t want to put them under the Teensy. After building up the boards and starting testing there was no communication. Yep, I forgot to turn the board over and populate these. I bring this up because…adding components that are supposed to mitigate problems should not cause problems. I will probably continue adding these in the future, but be more aware of where I place them.

1 Like

K for Kitt?

So true! Zero ohm resistors are good for machine assembly but for a hand built prototype, I’d use solder jumpers for this purpose. The nice thing about them is that you can use normally connected solder jumpers and you can forget about them. Then, if you want to try changing the connections for tx/rx you can slice them open and greenwire across the pads. For slow signals like most uarts, when you can afford to change the signal direction quite a bit, you can use a pair normally closed dual solder jumpers like this
b8077b2eb61c327bc54c8324455f144adbec9884_2_663x500
Which you can configure so that by cutting them and soldering to their alternate pads you swap the signals over.

Yes! Of course. I was glad to be able to bring part of my favorite fictional car to life!

On to the next board: The CSOS - Current Sink Or Swim.

Disclosure - This is the first CE board I ordered and tried to build. This board took me a very long time. My timeline: designed in Dec, ordered board in Jan, revised board ordered in Feb, some stuff worked in Mar, finished program and discharges in Aug.

I want to start with a grateful thanks to these previous students and their build logs:

@Naxian for his excellent CSOS build log, especially parts selection, at the right time to help push me along
@ian for his ideas of using a DAC for control and details in his writeup
@Steve_Mayze for his investigative writeup on using the INA219
@ScottS for sharing LTSpice simulation in Ian’s Build Log - and the idea to put an LED on the output of the voltage limit op-amp. On one of my first board builds this LED was the ONLY thing that worked.

Objective: My goal with this board was to discharge a battery at 10W and record the voltage curve.

I built up 5 of these boards. On the first version I integrated the INA219 current/voltage/power monitor with a separate sense resistor, but made some mistakes on the layout. I did not want to order more boards just to fix mistakes, so tried to push myself a little on the second revision. I will cover the first board (#'s 1,2,3), and then the second (#'s 4,5).

First Board Mistakes:
Um, lets go through this quick. Here is a list of things I did wrong:
-Wrong MOSFET footprint. Switched Drain and Source. Had to cross pins, add yellow heatshrink.
-Wrong MOSFET part (repeated multiple times). Was not paying attention to difference between IRLZ44 and IRFZ44. Needed to worry about Vgs Logic Level gate drive instead of high current capability.
-Incorrect Op-amp. Chose a LM2904 3V part. Had to switch to one (LMV358) that would work with supply of 2.7V.
-Wrong resistor values to set the LM2931 adjustable power supply. Added a trim pot to be able to adjust this.

For the first board, I was very concerned about damaging components, so I put in 1k potentiometers instead of 10k, which would limit the current to low level. After a round of ordering proper parts and re-soldering, I was able to get Board 2 working. Once I was able to adjust current and confirm operation, I replaced the potentiometers with 10k. I used Board 3 to perform targeted testing on the INA219, separate from the other circuits, making sure I could read the values with the Teensy. The figure below shows the current adjustment up to ~1A and back down.

CSOS_display

I externally powered the CSOS, and hooked up two 18650 Li-Ion batteries in series to the current sink connection. The Teensy was connected to the I2C Bus and I added a small display to show all values at the same time next to the knobs. The Teensy printed data back to the computer through serial port. The plot below shows the data running at ~10W.

The heatsink was getting warm, so I put an external fan on. In order to get the power to remain at 10W, the current had to be manually adjusted. I bumped the setup around 600 seconds. And then discharged the batteries a little further than I wanted to.

Second Board: Boards 4,5

For the second revision I decided to add two MCP4725 DAC’s to control current adjustment and voltage limit, and a switch to convert between Manual and Auto modes. With Auto mode I wanted the Teensy to make the adjustments to keep power at 10W, and then add some software to prevent over-discharge.

Here is the schematic for the second board.
image

Here is the board layout
image

Here is the 3D view of the bottom where I put the DAC’s. The INA219 is shown (bottom left) with its own current sense resistor.

The figure below shows the setup with Board 4 just before the 6.2V low voltage limit is reached.

Here is the discharge curve with automatic control:

Here is the control loop running in the Teensy to close the loop on power and to stop if voltage is too low.
CaptureControlLoop

Simulation:
This was my final LTSpice simulation setup. I tried to add as much as possible to reflect the actual circuit. I am glad I had this to check with, but most of my learning was on the actual boards and parts.

Next Revision Ideas:
-I did not investigate power dissipation of the heatsink that much, and may have been overly conservative on this part. I would spend some more time on this and try out a different more compact heat sink setup. Or try to push this one to test its limits.

-There is some code that could be improved.

2 Likes

Next CE board is the BenchBudEE. This was one of my favorite courses and covered many different circuits. I went through the course, but did not complete the board layout. I reached the point where all the component footprints were placed, but did not continue with the routing. I knew I was not going to purchase this board and lacked motivation to finish. A quick picture of how I left the board:

Instead of finishing the entire board I picked one of the circuits that I knew I would use, and tried it out. The LED driver chip AP5726 was in stock! I implemented the variable brightness reference circuit in the datasheet. This is the Schematic:

Layout:

3D Model:

And a picture of it working:

Learnings:
-I did not understand from the 3D model that the potentiometer standoff tabs were metal, and so had to break one tab off the bottom of the potentiometer to not interfere with 5V power input.

-The potentiometer (RV1) to control voltage level to limit the current did not work as I expected. The power draw and brightness change, but only slightly and not over the range I thought it would. The power supply power varies from 0.35W to 0.45W with a full turn of the potentiometer. There is something going on - still investigating this.

I was able to get all three to produce light, and for now that was what I was aiming for.

1 Like

I found this interesting too. I read the datasheet and I cannot understand how their circuit would work. Ignoring their bare circuit for a moment, do you find the brightness setting matches your schematic notes that 0V = dim and 2V = bright? Or the other way around?

@smerrett79 you are awesome. Thanks for pointing out my mistake in such a nice manner.

Here is the datasheet paragraph I should have read more carefully:

I read the sentence “For VDC range from 0V to 2V, the selection of resistors in Figure 3 gives dimming control of LED current from 0mA to 20mA” incorrectly, lining up the voltage/current numbers as they were ordered in the sentence. It appears not to be that way. As the DC voltage increases, the LED current decreases. Which is opposite from my note in the original schematic.

With the original circuit, the maximum DC voltage (measured at the potentiometer wiper) was only able to get to 1.7V. I replaced the 100k R1 with a 47k, and DC voltage reached 2.5V. This allowed more LED brightness variability and the 5V power supply to decrease to 0.25W. I went further and replaced the 47k R1 with a 4.7k and the DC Voltage now goes to 4.5V. The brightness decreases substantially, and power supply drops to 0.15W.

This does not exactly follow the datasheet DC voltage level description. However, the dimming feature works much better. The power supply range is now from 0.45W (90mA at 5V) when DC Voltage is 0 and reduces to 0.15W (30mA at 5V) when potentiometer turned.

Here is the revised schematic.

Thanks again.

1 Like

Most welcome. It was quite a fun little circuit analysis. Well done for working it out!

That lines up with my knapkin calc, as did your reported ratio of full power to minimum power.

Absolutely. I wondered if they had missed a digit from the 5k resistor value. You can calculate the value of the resistor divider you need to achieve the reference voltage at the feedback pin, which should let you have a full range of current, down to 0 mA. I quickly substituted 50k and 15k in for the 5k in the calcs but IIRC it didn’t land on their figures, so perhaps they didn’t miss a digit in the diagram and it was a more significant error.

I once remediated a board that used a (nearly?) identical pot.

Most of the boards were fine, but on a few boards, the standoff tab cut through the soldermask and shorted Vin (12V) to Vcc (5V), resulting in magic smoke. Unfortunately, it sometimes happened well after the product was in the end-user’s hands!

1 Like

@toybuilder. Thanks for sharing. I was lucky the tab interference was obvious, so knew to make changes right away. Not sure I would have caught problem with cutting through soldermask to traces underneath. I went back into datasheet and tried to find some hint or mention to keep tracks out from under these standoffs, but did not see anything. It is a difficult interface problem to foresee.

While messing with the LED boards, I damaged one. New parts were installed, and I tilted the potentiometer on this board so the front standoff tab was off the board. See picture below. Maybe having this lamp over my work station will help remind me to look for these interferences. Thanks.

Next CE board is LoudMouth. The LoudMouth Course uses the TDA7491LP (2 x 5-watt dual BTL class-D audio amplifier) and the STEVAL-CCA029V1 Evaluation Board - which are both obsolete. I wanted to follow along, and use a similar package. The TDA7491HV13TR (20 W + 20 W dual BTL class-D audio amplifier) was available, and appears to be the exactly the same chip with a higher power rating. Called the board LoudrMouth.

Objective is for the board to make a sound. The PowerSSO-36 package is unfamiliar to me. Will be using the 4-Ohm speakers AS07104PO-WR-R, so used the 4 Ohm filter components suggested in the datasheet. I followed the ST Application Note AN4170 which had both BOM and layout suggestions.

Before ordering the pcb boards, I have learned to try to have all the parts in hand. Earlier this year I routed the pcb board and ordered parts. However, the supplier did not in fact have the TDA7491HV13TR, and after I ordered said they would ship in January 2022 (maybe). I looked for an alternative, and thought I could use the Exposed Pad Up (EPU) version, since these were in stock. They appear pin compatible in the datasheets. Ordered them to make sure I could get them, and when in hand noticed a slight problem.

The Pin Description list makes it seem that these are drop in replaceable.

However, the Pin Connections (top view) shows something different. The pins swap sides.

From looking at other ST parts that have EPU and EPD versions, this mirroring of pins appears to be standard. So, I routed the board to have the EPU version on the bottom, and pass all of the signals through vias. I decided to leave the EPD footprint on, which would allow me to use either part.

Layout:

Layout - bottom layer closeup:

3D Views:

I built up 2 boards. No sound produced. Searching options, there appear to be many small class-D amplifiers available. I purchased the Adafruit TPA2016D2 (#1712) as a sanity check for monitoring audio signals. I was able to get this to work rather quickly. The problem was in my board.

I went through and did a pin by pin verification of the signals, and compared to what the signal descriptions in the datasheet said they should be. SYNCLK was clocking, which gave me hope. But I measured a couple of pin-to-pin shorts that my jewelers eye-piece (ok, my eyes) could not see. New equipment time. I used a microscope and wow.

There was a short between SVCC and VREF. Other shorts, too.

I tried and tried, but could not remove all the shorts. They were on the backside of the pins. I used solder sucker, solder braid, tried 10’s of times. Since I was going to remove the chip, decided to go ahead and just replace it with a new one. When I originally built the boards, I used (too much) solder paste and oven. Replacing the chip I carefully soldered by hand, and used very little solder.

Proof of Sound:

The video shows Board #1 working, and the underside of Board #2. Picture below shows same.

Learnings:

  • Initially I did not connect the Exposed Pad Up to ground. Datasheet indicates to do this. I thought this might be a problem, but powered the boards both with and without this connection, and it seemed to make no difference (after I had both boards working).

  • I mixed up the audio input connections. The output from the ipod is L+, R+ and GND. The audio cable connection ended up grounding the + signals. LoudrMouth audio input connector pin 1 should be GND, was instead + signal for both channels. I ended up routing the audio signals through a breadboard and monitoring with oscope to keep them straight. How did I mess this up? Did multiple things wrong, from schematic to layout. Spending 5 minutes during design to understand the audio cable connections would have saved me much time troubleshooting.

  • Testing Board #1, I was able to consistently get popping on the Right channel during power-up. Not on Left. So there could be some more investigation here. Board #2 produces no popping either channel, so I have good/bad comparisons to make.

There was a lot of learning with this board. Glad it finally works, and I have tunes in the lab.

2 Likes

Kudos on sticking with it! And also on holding onto that iPod! Excellent test platform :smiley: