Miscellaneous – Neil's Log Book https://nrqm.ca What could possibly go wrong? Mon, 01 Aug 2011 04:49:30 +0000 en-US hourly 1 https://wordpress.org/?v=5.4.1 Sure enough, ReplicatorG reads 123D-generated STL files at 1/10 scale https://nrqm.ca/2011/06/sure-enough-replicatorg-reads-123d-generated-stl-files-at-110-scale/ Thu, 09 Jun 2011 00:43:07 +0000 https://nrqm.ca/?p=590 Update: 123D beta 5 uses the proper units for exporting STL files, so the scaling operation is no longer necessary.

As I noted previously, objects in STL files created by Autodesk’s new 123D CAD program are not correctly scaled when loaded into ReplicatorG (at least not for me, I’m using the public beta from a few weeks ago).  Eyeballing it, I guessed the object in RepG was about 1/10 the size defined in the 123D model.

To test this hypothesis, I designed a rectangular prism, 50 mm by 25 mm by 10 mm (yes, the temptation to go 90x40x10 was strong).  Results follow:

Calibration object designed in 123D.

Calibration object designed in 123D, 5 cm long, 2.5 cm wide, and 1 cm high.

I saved this object in 123D as an STL file, loaded it into RepG, and applied a 10x scale.  I printed it on a Makerbot Thing-O-Matic:

123D calibration object printed.

123D calibration object printed.

(You can see the final layer didn’t finish, because I forgot to put more feedstock into the printer; fortunately there was enough to print all the layers)

I measured the printed object with my digital caliper, and the ground truth dimensions (maximum) are: 49.7 mm in length, 25.0 mm in width, and 10.2 mm in height.

Pretty darn good!

]]>
The Schmitt trigger https://nrqm.ca/2010/12/the-schmitt-trigger/ Fri, 03 Dec 2010 05:06:11 +0000 https://nrqm.ca/?p=327 Schmitt trigger example

Simulation of a Schmitt trigger. The yellow sine wave is the input, the purple square wave is the output.

I was looking for a way to convert an analogue signal into a digital signal, and came across the Schmitt trigger.  This is a great little circuit that you can build with a couple transistors or with an operational amplifier.  I tried to build a transistor-based simulation in Simulink, but it didn’t work right away.  My op-amp simulation did work, so I stuck with that.

The principle is simple: if the trigger input rises above a certain threshold, then the output saturates to the op-amp’s positive power supply voltage.  When the input falls below another threshold, the output saturates to the op-amp’s negative power supply voltage.  If the input lies between the thresholds then the output doesn’t change from whatever it was before.

This is incredibly useful.  To the left you can see a 0.3 V sine wave being converted into a 5 V binary signal (actually a 4.5 V signal, since I added a diode in series with the output to keep it from going down to -5 V).  It also effectively filters out any input jitter that doesn’t cross the threshold needed to change the output state.  Microcontrollers have Schmitt triggers on their digital inputs.  For example, an AVR microcontroller being powered by 5 V typically considers a 0 logic level to be under 1.5 V and a 1 logic level to be over 3 V.  If the input sits between 1.5 V and 3 V then the digital state remains whatever it was before the input entered that region.

Alas, it’s not a perfect circuit.  I used an online calculator to figure out what resistances I needed for my project.  Configurations that worked in the calculator and in simulation didn’t work in reality, either producing no output or something more like a sawtooth wave than the square wave I expected.  It’s probably a limitation in my op-amp—maybe the signal is too high-frequency, I didn’t investigate very deeply.

]]>
World falling apart https://nrqm.ca/2010/11/world-falling-apart/ Sun, 14 Nov 2010 22:43:42 +0000 https://blizzle.cybertavern.net/?p=240 Digikey sent me a bunch of LM395T power transistors instead of 20 V regulators.  Oh no!  I don’t know who to trust any more.

Update Nov 15 – they let me keep the transistors and quickly dispatched a new set of regulators.  Thanks Digikey!

]]>
First post https://nrqm.ca/2010/10/first-post/ Sun, 31 Oct 2010 06:57:21 +0000 https://blizzle.cybertavern.net/?p=5 First!

]]>