13/09/2021

REPAIR: Neato D5 LIDAR Motor

A month or so ago our beloved Neato D5 was starting to have sensor issues, as it would either stop vacuuming midway or only after a couple of minutes. So I reached out to Australia Robotic who said that the LIDAR motor was the likely culprit, and were trusting enough to send a replacement for me to fit :D

Disassembling the unit was quite simple, with the only tricky part being the front bumper (which you have to bend quite a bit to remove/place back on)

With everything apart I was able to have a good look at the LIDAR, which turned out to be a pretty neato ;^) assembly. But before I tell you why, here is a good picture which explains how a 2D LIDAR functions


OK so the laser bounces off an object and the reflected light is picked up by the image sensor, simple enough right? Well, above only tells you what's in front. What if we want to know what's happening all around us? To do this you would need to continuously rotate the LIDAR assembly... BUT wires can't rotate indefinitely, so how do we get power in and data out ?_?

The Neato D5 LIDAR solves this by going wireless:

  • Power is bought in via wireless power transfer, likely inductive coupling
  • Data is taken out via an IR emitter/reciever combo

05/09/2021

PROJECT: Japanese Wood Joinery & Kitchen Shelves

Before COVID steamrolled the whole planet, the wife was planning to take a Japanese wood joinery class at a local university. After that plan fell through she found out that the class teacher/sensei offered similar content in an online format, DIY Japanese Joinery Online Video Courses

So we decided to sign up to the class to see if we could incorporate these new techniques to our woodworking projects. I will admit that I was quite hesitant at first as I tend to be quite lazy/efficient with my work; as in, if two pieces of wood can just be fixed together with glue/screws then I don't see the point of using fancy joints. BUT after spending a good month getting familiar with the new tools (as well as the countless weekends slowly sharpening each one) we finally applied what we learned and made a kitchen shelf; and I have to admit that seeing something so modular come together was 100% good vibes for me. So should be fun to figure out other ways we could use these joints ;^)

Anyway, before cutting all the wood I modeled the assembly in SOLIDWORKS, as my monkey brain has trouble with "complex" assemblies. So here is how that looked (ignore the poorly fitted dovetail joints, here I was too lazy to make separate parts):

And here is how the result came out :D

29/08/2021

PROJECT: Half-Life 2 AR2, Update #13 - Solenoid Driver


Continuing with the RECEIVER_MAIN-BOARD design, this post will concentrate on the solenoid driver section. The solenoid in question is one I wound myself, whos approximate specs are:

  • 0.95 mH inductance
  • 1.42 Ω series resistance
  • 21 AWG wire (0.7mm dia)
  • 40m wire length

Why is this section so crucial? Well this circuit deals with driving a highly inductive load, which creates big voltage kicks/transients during the ON/OFF transitions. Dave from EEVblog made a good summary of this behavior here


Chosen Solenoid Driver Configuration

Before I bore you with more simulations, here is how the chosen configuration compares to driving the solenoid without any dampening/snubbing. Please note that the MOSFET I have chosen (Infineon BSC040N10NS5ATMA1) has a Vds rating of 100 V, which if exceeded will eventually destroy the semiconductor junction (as you see in the simulation with the 110 V peak...)

One other thing to note is that I have chosen to use a dedicated gate driver (TI UCC27533, see section 10.2.1.2.4 of datasheet on how to spec driver), as I am am working with a limited PCB area (as in have bugger all space to make a gate driver using discrete components)


A Closer Look at the Voltage Spike

There are many ways to dampen the back EMF (aka voltage spike), the most simple of which is just placing a diode across the inductor. This diode goes by many names, and the one I was taught at uni was freewheeling diode. It's recommended to use a Schottky diode, due to their lower forward voltage (think less dissipated power) and snappy response to reverse bias

Lastly my gate drive waveform is a 7 Hz square wave with a 50 % duty cycle (as in the inductor is energized for ~70 ms). Which is practically what the solenoid will be driven at, as seen in an older blog post 


Zooming in on the voltage spike we see that it "saturates" at ~110 V. This is because the junction of the MOSFET (which is rated to 100 Vds) is breaking down and clipping the peak. Using an ideal MOSFET in LTspice shows that the spike peaks at ~2 kV and lasts for ~1 ns


And with the freewheeling Schottky diode fitted, we get a manageable ~15 V peak


But What if I Want a Faster OFF Time?

Here is a good thread on this desire ;^)

If you have eagle eyes you might see that there is a bit of a delay before MOSFET Vds (and hence inductor current) stabilizes, and in some scenarios you would want this state to be reached as fast as possible so you can switch the inductor at crazy high speeds. Well if you want to do this one way is to add a dampening resistor in series with the freewheeling diode, but you have to size this resistor carefully otherwise the voltage drop across it is going to bring the spike back (as you can see below)


An even better way would be to use a Schottky & Zener diode combination, which I did not simulate as I was quite happy with the Schottky freewheeling diode arrangement (as I am only switching at 7 Hz...)

21/08/2021

PROJECT: Half-Life 2 AR2, Update #12 - Power Filter 10A


So today I am going to expand on my previous pi-filter topology to make it compatible with the solenoid driver. The same driver that is going to be dealing with ~7 Hz 10 A transients ;^)


Chosen Pi-Filter Configuration

As before, here is the step and frequency response of the chosen pi-filter configuration. Since I am dealing with a higher transient current, I am trying to minimize things like:

  • Settling time
  • Over/under-shoot
  • Frequency of ringing (think radiated EMI)

If you are confused about some of the above terms then have a look at the next section


Summary of Ferrite Beads

With the previous lot of simulations I was quite happy with the electrolytic & ceramic capacitor arrangement (which turned out to be ideal for this case as well), so this time I dived deeper into the impacts of ferrite bead impedance

The step response was configured to peak at 10 A, which is the peak current of the solenoid I wound. As I began simulating stuff I noticed that such a large current spike lead to noticeable over/under-shoot & ringing, hence I evaluated each ferrite with this in mind


Rather than flood yous with pictures of different ferrite bead simulations, this time I decided to summarize the data in a nice table:

Note how the NO FILTER response:

  1. Has a rather "late" -3 dB roll-off frequency, ~3,500 kHz vs ~160 kHz for others
  2. Manages to amplify any transients in the ~30 kHz to ~3.2 MHz range
  3. Has a step response that oscillates at ~2.2 MHz (think radiated EMI)

At the same time, now how using a higher impedance ferrite bead (48-115 Ω @ 100 MHz) leads to:

  1. Amplification of any transients in the ~15 kHz to ~150 kHz range
  2. An increase in settling time
  3. An increase in over/under-shoot

In my opinion the 10 Ω @ 100 MHz ferrite bead (Wurth 74279221100) gives the best performance of the lot. With the most noticeable/worthy feature being no amplifiaction of transients from 1 Hz all the way to 100 GHz :D


Closer Look at 115 R Ferrite Bead

For the sake of completeness, here is how the largest impedance ferrite bead (Liard 28F0181-1SR-10, 115 Ω @ 100 MHz) looks

10/07/2021

PROJECT: Half-Life 2 AR2, Update #11 - Receiver Sensor PCBA's


"Quick" update, I have just finished designing the left & right reciever sensor PCBA's (the ones that figure out position of solenoid plunger/firing pin). Next step was to place them into the AR2 assembly to check for possible collisions (see first section), and to see how well the IR LED & IR sensor pair are expected to function (see second section)


PCBA & Solenoid Plunger Collision


From my AR2 prototype I noticed that the solenoid plunger (pink thing below) has quite a bit of slop, and at the extreme case can move around by ~1mm


The components that are of most concern are the electrolytic capacitors (Nichicon UCQ1E100MCL1GB), as these are the highest items on the PCBA (coming in at a whooping 4.6mm). Below I found that on the IR sensor PCBA was heading for a collision, so I had to move the electrolytic capacitor (on both PCBA and AR2 assembly) as far down as I possibly could


IR LED & IR Sensor Viewing Angle

As mentioned in a previous post, I am using two IR LED & IR sensor pairs (in a line of sight arrangement) to figure out the location of the solenoid plunger


Doing a quick test with my selected LED (Stanley Electric VTAN1116P-TR) I saw that the 40° viewing angle should not be an issue, as at no point can a single IR sensor see light from both IR LEDs (think viewing angle cones having too much overlap)


However if you increase the IR LED viewing angle to 60° (SunLED XZTNI53W-8) you will have issues with loading configuration D and possibly E, as here the viewing angle cones overlap too much and so can confuse the IR sensors


But wait there is more! If you have a closer look at the datasheet for 40° viewing angle IR LED (Stanley Electric VTAN1116P-TR), you will see that: 

  • At 40° the LED has a 50% relative intensity
  • At 140° the LED has a 20% relative intensity

Meaning I am likely to run into the overlap issue with configuration D, as the IR sensor will probably pickup the stray IR light. I won't know if this is a problem till I build the reciever assembly, but if it is then I could either:
  1. Narrow the viewing angle of IR LED by making a cylindrical cover
  2. Read the analog voltage of the IR sensor (via ADC or comparator) and then trigger on a set threshold


To finish off... Believe it or not but the IR sensor (WE 1540601NEA200) also has a viewing angle, which is 120°. Luckily with the IR LED & IR sensor PCBA configuration (not angle between the two boards) should not have any issues

22/06/2021

PROJECT: RCA TV Adapter for Record Player

Recently my significant other got a record player (SONY PS-LX250H) to play her childhood records. However there was one minor issue, we did not have any speakers that supported the relatively old-school RCA audio connector

Well as luck would have it, our TV (Samsung UA50J5100) has an RCA input. But again there was a catch, the TV expects to see a video signal before it gives access to the speakers. So a new project was born, a box that generates a "fake" RCA video signal to trick the TV into sharing it's onboard speakers 

To achieve all this I used the super nifty TVout library along with an Arduino Nano, which I also programmed to display 4 different items (controlled by two switches):

  1. Blank screen
  2. Pictures of our cat =^..^=
  3. Pictures of us ;^)
  4. Conway's Game of Life (which I got from Emily Velasco)

With all that said, here is how the box looks as well as the "pixel art" it produces:


3D Printing Text

Now for some advice on 3D printing text. I find that using an "equal width font" works best, for example when I design items with text in SOLIDWORKS here is what I use:

  • Arial Rounded MT (bold)
  • At least 5mm high
  • 110% spacing


Basically the taller/higher the font, the better it will come out. Also if you are dealing with smaller/shorter font (≤5mm) then it's worthwhile removing any "islands" to improve readability (think difficulties when printing smaller features). For example, with above I had to clean up A, B, O, & P to get a nice print


Finally, to make the text stand out I debossed it by 1.5mm and then filled the cavity with nail polish. The trick here is to use a fine-tip flat-head screwdriver to dab the nail polish into each cavity, then wait for the nail polish to dry before cleaning up the edges with an IPA soaked cotton swab

UPDATE: If you want to stop the inter-layer/capillary action bleed then add a coat of clear spray, as this fills in the micro-grooves - ubermeisters

06/06/2021

PROJECT: Half-Life 2 AR2, Update #10 - Power Filter v2


Turns out my pi-filter simulation from the previous post does not tell the full story, as with a power filter it's best to first look at the step response before looking at the frequency response. With that said, here are the updated simulations which now include two decoupling capacitors at the load (both ceramic, one 100nF and other 10μF)


Chosen Pi-Filter Configuration

Here is the step and frequency response of the chosen pi-filter configuration. If you want to know how I came to this conclusion then see the following sections

Comparing no filter to pi-filter, note how there is no drastic phase shift and the attenuation is grater, with the -3dB point starting at 70kHz instead of 170kHz


Pi-Filter Step Response

For the step response I am using a current load configured with a pulse function, with the step/pulse looking something like this:

To help with comparison, below is what the step response looks like without any filter present

NOTE: This plot is a bit deceptive as it looks like the circuit is able to respond well to transients, HOWEVER if you also look at the frequency response (see next section) you will see that we can do better


Here is the initial pi-filter configuration I have chosen, a 10μF electrolytic capacitor, a 33Ω (@100MHz) ferrite bead, and a 10μF ceramic capacitor

NOTE: This is not my final configuration, if you have a look at the last section you will see that lowering the ferrite bead impedance drastically helps with step response


And here are some configurations that did not did not make the cut. Again, it's a bit harder to see why if you just look at the step response; if you also see the frequency response (see next section) you will note that some configurations have sharp phase shifts that lead to a "peaky" attenuation

NOTE: I realise that ELEC/CER & CER/CER configurations have a similar step response (with CER/CER actually having a better frequency response). However I am fairly certain that in the real world ELEC/CER will give better performance due to the relatively large ESR of the electrolytic capacitor, as with low ESR capacitors it's much easier to introduce oscillations/ringing with fast transients 


Pi-Filter Frequency Response

Same order as before, first we have no filter (to help with comparison). Note how we have a tolerable attenuation up to 10GHz where he see a drastic phase shift and the peak that comes with it (though I suspect we don't really care what happens after the 1GHz mark)


Here is how things look if we implement the chosen filter from the previous section. Note how there is no drastic phase shift and the attenuation is grater, with the -3dB point starting at 90kHz instead of 170kHz


And for completion, here are the frequency responses of the configurations that did not make the cut. The -3dB point for these (in order) is 230kHz, 170kHz, & 65kHz


Pi-Filter Step Response vs Ferrite Bead Impedance

From here on out I am trying to see what impact the ferrite bead impedance has on the filter performance, the results will shock you ;^)

As before, to make comparison easier here is the step response without any filter present


And here are our candidates. Note how drastic the difference is between the 8Ω (@100MHz) & 120Ω (@100MHz) ferrite beads. As you might guess, am leaning towards the 8Ω ferrite bead for the pi-filter


Pi-Filter Frequency Response vs Ferrite Bead Impedance

Again, to make comparison easier here is the frequency response without any filter present


And here are our candidates, the -3dB point for these (in order) is 70kHz, 90kHz, & 70kHz. Note how the 120Ω ferrite gives +2dB amplification (not attenuation) around 40kHz


Tips For Power Filter Simulation

Here are some things to keep in mind when simulating a power filter:

  1. Make sure to include parasitic elements in your simulation. This would be the parasitic resistance/inductance/capacitance of cables, connectors, tracks, planes, decoupling capacitors, relays...
  2. Include a series resistance in your AC/noise source when doing a frequency response. With my simulation is set it at 10mΩ. If you forget this element (or set it to 0Ω) then your simulation would show amplification before you see the roll-off, while in the real world you would not see a response like this as the source would have a finite series resistance (which I guess is a parasitic resistance)
  3. Know what a typical current transient you are bound to run into looks like for your circuit. For example, if you are switching a relay and you know the could current is 10A then you can better understand what sort of filter response you need
  4. In addition to above, see if you can figure out the constant current consumption of your circuit. Again knowing this will give a more authentic simulation
  5. It's useful to know the input/output impedance of the filter, as with this information you can figure out what filter topology will be best. For example, a pi-filter is designed to "match" a high input impedance with a high output impedance, whereas a T-filter is the opposite, a CL filter is high/low, and a CL filter is low/high