Lab: South End Technology Center, Tent City
I am currently the Logistics & Communications Manager for The Fab Foundation. In this position, I am responsible for the purchase and deployment of equipment and materials for new and existing fab labs within our network. I also manage the Fab Foundation website and Facebook account.
I am a member of the Tunica-Biloxi Tribe of Louisiana. I assist our Language and Culture Revitalization Program with illustrations and online communications. My immediate family serves the Tribe as singers and legend keepers. We work to preserve our culture and heritage through our story and song tradition.
More about me:
http://about.me/jeanluc.pierite
Blog:
Fabmodules and Modela Gave Me a Bad Hair Day
I spent a bunch of time getting to the bottom of my MDX-20's self-destructive nature. After a few hours of experimenting, I ended up in a hair-raising situation!
Trace files gave some unexpected results and I feared that I may break a collet. I knew there was some kind of pattern to the results.
One possibility that I investigated was old milling jobs filling up the queue between my computer and the MDX-20. I noticed that the "Modeling" light was flashing rapidly.
After some research, I tracked down the Modela software that I thought I needed. I installed and ran the apps on Ubuntu through Wine. Still, I was only able to send jobs up to 6% of the way before the machine turned erratic.
I sent an email out to my remote guru and searched for clues in my inbox. That lead me to inspect the files for the compiled version of fabmodules from 2012.
With a bit more insight, I noticed that there was a difference in "flow" values passed between the two versions. In fact, I realized that the default value for flow passed from fabmodules.org conflicted with the profile that I set up for the MDX-20.
Should've paid more attention to the help text when I run, "python mod_serial.py":
command line: mod_serial.py port speed flow file
port = serial port
speed = comm speed
flow = flow control (none | xonxoff | rtscts | dsrdtr )
file = file to send
I was finally able to tame the MDX-20 and fabmodules! And, I was on my way to completing some past assignments.
FabModules works on my laptop!
It took a couple weeks and several tutorials, but I finally got FabModules.org to work on my laptop. So far, I have connected to the Epilog Legend 24TT, Epilog Mini, and Roland MDX-20.
I needed a reliable workstation for my projects at SETC. The computers in the Fab Lab are mostly iMacs with older solutions for connecting to the machines. I am currently on an HP Sleekbok 14 with Ubuntu 14.04. The Processor is Intel® Core™ i3-2377M CPU @ 1.50GHz × 4 with 3.8 GiB of RAM.
After several attempts at following the text tutorial, I came across Fiore’s video walkthrough of the install. There are several dependencies to be mindful of. These are inconspicuously listed on the bottom of mods.html.
Once the dependencies were installed, I created problems for myself by misunderstanding what was happening with mod_server.js. Instead of the ip address of localhost and the “wild card” port 12345, I edited the file for specific machines and the port that they listened to in the lab. I changed mod_server.js back to the default setting.
Once I got mod_server.js working, I attempted to send test files to the Epilog laser cutters in the lab. At that point, I got an unknown printer error from lpr. This was resolved by installing cups-bsd from the solution here:
http://serverfault.com/questions/364112/lpr-command-wont-recognize-cups-printer
Connecting to the Roland MDX-20
I connected to the machine through the serial to USB adapter. The goal to test this connection was to see if I could move to xmin, ymin and then home.
Make sure to set permissions for your user on Ubuntu. This is taken care of with Steps 1 and 2 here:
http://fabacademy.org/archives/2015/doc/millingPCBs.html
The rest seems to be geared towards the compiled version of fab modules.
Troubleshooting info for this connection is here:
https://github.com/FabModules/fabmodules-html5/wiki/Troubleshooting
I first ran into this error:
error: /bin/sh: mod_serial.py: command not found
I followed the instructions and made the file executable. I also prefixed the default send command on the interface with “./”
Whether or not you intend to mill, you still need to process PCB traces before sending commands to the MDX-20 on the fabmodules web interface.
I re-downloaded the FAB ISP traces png from this page:
http://fabacademy.org/archives/2015/doc/electronics_production_FabISP.html
After the setup, I demonstrate how the connection works:
Analog Design with Discrete Components
3.1.1 Switches
The main function of switches whether they are large or small is to interrupt or connect a signal current flow.
Poles - The number of switch contact sets that conduct current.
Throw/Way - The number of conducting positions: for single or double, “throw” is used; for three or more, “way” is used.
Momentary - Switch returns to its normal position when released. A spring is usually employed internally to accomplish this.
Open - The switch is in the off position, contacts not conducting.
Closed - The switch is in the on position, contacts conducting; there may be several on positions.
3.1.1.1 Momentary Switches
The simplest switch is the momentary switch.
3.1.1.2 Slide Switches
The point of a slide switch is that it’s not momentary, but stays in the position when you leave it.
3.1.1.3 DIP Switches
The word DIP switch stands for dual in-line parallel in the context of a switch; however, people will say “dual in-line package” as well.
You might be tempted to save the resistors and make the circuit work more intuitively by connecting each switch to +5. When the switch is on, there is a +5 or “1”; when the switch is off there is no signal, so a “0”-WRONG! When the switch is off, you have no idea what is going to happen; this is like an uninitialized variable in C/C++. You must set the voltage yourself, otherwise the system will “float” to whatever. In fact, it might even work until someone waves their hand over the circuit and creates a capacitive coupling to ground! So always complete the design and make sure all digital signals are set by you.
3.1.1.4 Rotary Switches
Rotary switches are used when you want to gate or send a signal from one (or more) sources to one of N possible destinations (old TV sets used to have these rotary switches, for example).
3.1.1.5 A Plethora of Switches
Hall Effect switches that switch or detect magnetic fields.
Mercury switches that turn on/off based on orientation and a floating glob of conductive mercury.
Reed switches that turn on/off based on the application of a magnetic field that effects an internal permanent magnet inside the switch.
Pressure switches that turn on/off based on air pressure or vacuum.
3.1.2 Potentiometers
Potentiometers (POT) are nothing more than variable resistors. Basically, there is a knob or slide on the potentiometer that allows you to adjust the resistance from 0 to the maximum value.
So if a potentiometer is rated at 10K ohms then the resistance between contacts 1 and 3 is always 10K ohms; however, the resistance between contacts 1,2 and 2,3 changes as the potentiometer is adjusted.
As a final note, potentiometers are mechanical and thus have a lifetime; you can’t turn them back and forth an infinite number of times. They are fine for adjustments, but if you used them to constantly change something they would wear out and break. Also they are nothing more than resistors internally, and thus have maximum power dissipation specifications in watt range usually.
3.2 Capacitor Circuits
Governing equation for capacitance is: I = C*dv/dt
This formula states that the current I, measured in amps, flowing in a capacitor is equal to the capacitance C measured in farads times the rate change of voltage measured in volts per second.
Electrolytic-Usually very bulky, very large values for capacitance. Cheap, high leakage, poor temperature stability. Used mostly for power supply filtering and decoupling. Low frequency applications.
Tantalums-High values, more stable, low impedance, reasonable stability. Used for decoupling and low to medium frequency applications. Very expensive.
You must place polarized capacitors in your circuit the correct way or else they will be damaged or may explode.
Surface mount or SMT (surface mount technology) are hard to build with. SMT parts use more advanced technology and thus you can have a 10μf ceramic capacitor in a grain of salt
Capacitors are used a number of ways. In digital circuits they have uses as well, in power de-coupling and interfacing to the real world, for example. But, at the end of the day a capacitor is an energy storage device. You charge the capacitor by applying a voltage, and it stores the charge and then later can generate a voltage.
3.2.1 Capacitor Models
The voltage on a capacitor is the integral or sum of the current over the time divided by the capacitance.
3.2.1.1 Charging
Once the capacitor is charged then it is free to discharge. There is an interesting side effect of this charging process, and that is that capacitors only pass AC, not DC currents. That is, the DC current must be charging for there to be current flow.
So using a capacitor we can strip away the DC component of a signal and simply obtain the change or AC component. For example, say you had an audio signal that was 5-6V, but your amplifier likes signals that vary from 0-1V. You could use an AC coupling capacitor to strip the DC component and only pass that AC; this would result in a signal from 0-1V only.
3.2.2 Capacitors in Series and Parallel
3.2.2.1 Capacitors in Parallel
The equivalent capacitance of a number of capacitors in series is the sum of their individual capacitance.
When placing capacitors in parallel, make sure that they are all placed with the correct polarity if polarized; also make sure they can handle the maximum voltage being applied. One of the specs for a capacitor is the maximum voltage that can be applied, usually anywhere from a few volts to a few hundred, with your typical design capacitors in the 25-50V range. As a rule, always overdesign by a factor of 100%, so if the design needs a capacitor to charge to 25V, be sure to use a 50V capacitor. Even if the capacitor will never see that voltage, running it at a max of 50% its tolerated voltage will increase its lifespan.
3.2.2.2 Capacitors in Series
Capacitance in series is a little more complex to derive, but the results are the same as resistors in parallel (two capacitors):
Ceq = (C1*C2)/(C1+C2)
3.2.3 RC Circuits
RC circuits simply refer to any circuit that has resistive and capacitive elements. To analyze that circuit:
1. How does the RC circuit charge?
2. How does the RC circuit discharge?
3. how do RC circuits respond to different frequencies?
The current Ic must be the same through the resistor as well as the capacitor, os we can write
Ic = C*dv/dt
Ic = (Vi - V)/R
Therefore the modeling equation
C*dv/dt = (vi - V)/R
The equation for V is simply a solution for the above differential equation; if you plug V into the modeling equation along with the derivative of V with respect to t, dv/dt = (-t/r*c)*A*e^(-t/r*c), then you will see that it’s a solution.
As you can see at t=R*C the circuit charges to 63% of the voltage Vi; if you follow this math a little further you come to the result that mathematically at infinity, the circuit charges to 100%, but in practical terms “infinity” is 5 RC time constants, so if you want to know how long an RC circuit will charge, basically t=5*RC is the answer.
5*RC is the generally accepted time that it takes for an RC circuit to charge to 100% in the practical sense.
3.2.4 Low Pass Filters
The previous RC circuit we analyzed was actually a low pass filter. This means that the circuit tends to pass low frequency signals and send to ground high frequency signals.
Forget about charging/discharging math of the RC circuit and simply think of the RC circuit as a frequency filter. As it filters out the higher harmonic sine components of our input signal it destroys the original square wave, and the square wave starts to look like a distorted sine wave.
Decibels are a measure of the RATIO of signals or power. Ratios are used since electronics usually deals with orders of magnitude; for example, you might say the gain or amplification of a signal is 10,000 time the input.
There are two main formulas: One is for power, one is for general signals, but both define decibels in terms of ratios of signals.
All the frequency domain means is that we discuss signals in terms of their frequency rather than their time varying descriptions; in filter analysis this is much more productive.
3.2.5 High Pass Filters
High pass filters are nearly identical to low pass filters except they pass high frequencies rather than low. And amazingly all you do is swap the R and C in a low pass filter and now you have a high pass filter.
3.2.6 POR-Power On Reset Circuits
When you power on your embedded system, most microprocessors and micro controllers have a reset line that must be pulled low or high for a good amount of time. These reset circuits are traditionally called power-on-reset or POR circuits.
3.2.7 Bypass and Power Feed Capacitors
When you have a digital system, it’s potentially switching millions to billions of times a second. The switching action causes “noise” and glitches on the data lines as well as the power lines.
Some rules of thumb: if your circuit is running from 1-10MHz then use .01μF-.1μF caps to bypass each IC with; if your circuit is running from 10-100MHZ then 100pF to .01μF capacitors will do. The bypass capacitors should be monolithic (non-polarized), 50V tolerant, and ceramic. Keep them as close as possible to the power contacts of each IC.
Use .01μF-.1μF for each IC and you will be fine. Additionally, for large ICs that have busses, add a 1.0-10.0μF tantalum cap for power feeding.
3.3 Inductor Circuits
Inductors simply store energy in a magnetic field. They are more commonly found in audio and video circuits or when designing complex filters.
3.3.1 Inductors Model
The inductor works simply by passing a current through the inductor: As the current flows, a magnetic field is generated.
3.4 Diodes
Diodes are semiconductor devices that allow current to flow in one direction, but not the other.
A diode is in either of one of two states: conducting or not conducting. If the diode is conducting then there is a current Id flowing through the diode from anode to cathode and a very small voltage drop over the diode of 0.5-0.7V. No matter how much current you drive through the diode, the forward voltage drop will remain 0.5-0.7V for the most part, so the diode can control the direction of current flow.
3.4.1 Rectifiers
Diodes are used to switch circuit elements on or off, so the first class applications are rectification.
3.4.1.1 Half-Wave Rectification
The half-wave rectifier, during the negative cycle the diode is not forward biased; therefore, the load resistor R1 has 0V across it. However, during the positive half-cycle, the diode conducts (once the forward voltage reaches 0.7 approximately) and a voltage is developed across R1 of V1.
3.4.1.2 Full Wave Rectification
During the positive half cycle of the AC input we get the output, and during the negative half cycle we invert and send the input to the load as well.
The diodes still need their forward conduction voltage of 0.5-0.7V met before they will conduct. The final output voltage will never be as high as the peak values of the input AC voltage; it will always be Vpeak - 0.7V roughly.
3.5 Voltage Regulation Applications
Diodes have the property that their voltage stays nearly constant while their current changes, we can take advantage of this to construct low voltage regulators.
3.5.1 Zener Diodes
Zener Diodes look like normal diodes (maybe a little smaller), but have a slightly different schematic symbol. Zener diodes are actually used in reverse direction rather than forward direction. The resistance of a zener is inversely proportional roughly to the current driven through it. The voltage across it for a small range of currents stays constant.
3.6 Transformers
We have assumed thus far that we have AC input to many of our circuits, but we surely can’t use 120V AC in our circuits, so we must find a way to step this voltage down.
3.6.1 The Step Up/Down Action
Transformer equation
Vout = Vin*N2/N1
If N@/N1 is equal to 1.0 then there is no change to the voltage; if N2/N1>1 then there is a step up; if N2/N1<1 then there is a step down. If a transformer steps up the voltage then it must step down the current output; you don’t get something for nothing. Many people who are new to transformers think they are perpetual motion devices—they are not; they simply transform power. The amount of power stays the same; just the voltage and current drive change relatively speaking. 3.7 Power Supplies 1. Battery power. 2. Buy a power supply. 3. Use a wall transformer and a voltage regulator circuit to derive the voltage you need. 3.7.1.1 Stage 1: Rectification and Filtering If you have a AC transformer then the first step is to rectify and filter it. 3.7.1.2 Stage 2: Regulation Linear Regulators - These are the standard 3-terminal regulators that are used most commonly; they regulate a higher voltage down to a smaller voltage. Switching Regulators - Switching regulators are more exotic and can either step down a voltage or step it up (and even invert it). These regulators usually come in surface mount packages and are highly efficient. Charge Pumps - Charge pumps are usually used to generate high voltages from small voltages and are usually DC-DC converters. They have very little current drive and thus are used in applications where very large voltages are needed, but very little current, such as LCD applications. 3.9 Transistor Basics In general transistors are used for two things; switching and amplification. Switching is more pertinent application in our case; amplification is a secondary concern. There are two types of transistors NPN and PNP. They look identical physically, but internally they are different inasmuch as the doping of the semiconductor material. 3.9.1 Transistor Properties and Rules 1. The collector voltage must always be greater than the emitter by approximately 0.2V. 2. The base-emitter and base-collector circuits in a transistor act like diodes. The base-emitter diode is forward biased and conducting when the transistor is operating. The base-collector diode is reverse-biased and not conducting. 3. Transistors all have maximum current and voltage ratings. Some of the values of importance are IB (base current), IC (collector current), IE (emitter current). Also there are the voltage VBE (base-emitter), VCE (collector-emitter), and so forth. 4. So long as the collector voltage is greater than the emitter voltage and we don’t exceed any of the voltage maximums, the transistor “action” will occur. 3.11 Clock Generators Nearly all digital computer systems are synchronous machines; they use a base clock signal and step through logic, programs, and states based on this clock. Computer clocks are from KHz to GHz these days. We are simply going to use pre-made oscillator systems: 1. Use a crystal with additional caps and inverters to build a clock circuit. 2. Use a single oscillator IC that you apply power to and it outputs a clock signal. 3. Use a programmable timer IC that uses a few passives to set the frequency. 3.11.1 The 555 Timer The 555 is a standard 8-Pin DIP. It’s not the most accurate thing in the world, but it has a lot of different modes of operation: astable, monoastable, time delay, etc.
Fixing Permissions for Wordpress to Update/Upgrade
Activated a new theme on my wordpress install on localhost. I had to make these changes:
1. follow the instructions: http://www.hongkiat.com/blog/update-wordpress-without-ftp/
2. Change the permissions for the wp-content and plugins folders:
sudo chmod 777 Your_wordpress_root_folder/wp-content
sudo chmod 777 Your_wordpress_root_folder/wp-content/plugins
3. Install the plug-in, it should work fine.
To change back the permission for protecting the wordpress contents and plug-in, otherwise you can leave it as is if the security is not a big concern :
4. change back the original permission :
sudo chmod 751 Your_wordpress_root_folder/wp-content
sudo chmod 751 Your_wordpress_root_folder/wp-content/plugins
Found the fix here:
https://wordpress.org/support/topic/core-or-plugin-update-could-not-create-directory-httpdocs#post-5602273
Using HTTrack to Rip HTML files from Wordpress
Download:
http://www.httrack.com/html/overview.html
Instructions:
http://null-byte.wonderhowto.com/how-to/hack-like-pro-clone-any-website-using-httrack-0152420/