Friday, December 30, 2016


I know I wouldn't be where I'm at or know who I do without, struggle, hard work, or the many things that God has allowed. I have no reason to focus on weakness, but instead continue in faith. I'm learning to know Sir Tim Berners-Lee, who is arguably one of the most influential people of
the late 20th century. I'm also learning from the dedicated team around him.

I can't say I'm a failure, but instead on a journey. I can't say I lack uniqueness, or the capacity to contribute. I'm already doing that. I can't say I don't have awesome friends. This whole career ladder thing. Professional roles, what have you. Yeah, I can take things and run with them. I'm thankful for today, and look
forward to tomorrow. It will be a challenge. There will be roadblocks. Otherwise I'd be dead.

There are too many people to name that have been a positive influence in my life. Even those who have set up roadblocks have helped me.

Monday, December 19, 2016

Preliminary notes for Wes Tyler's December talk at okc.js

I was checking out the okc.js website, and I found Wes Tyler was giving a lightning talk on "Node.js document models with Joi and Felicity".

A quick Google search gave me: (Felicity --  Description: Javascript object constructors based on Joi schema.)
(Joi -- Description : Object schema description language and validator for JavaScript objects.)

A few guesses on related stuff: (JSON Schema) (JavaScript Object Notation)
Object Oriented JavaScript :
[Object Oriented JavaScript : , Modular JavaScript # 6 - Classical Inheritance & OOP with JS : ,
Modular JavaScript - Prototypal Pattern vs Classical OOP in JS , :
JavaScript object creation patterns tutorial - factory , constructor pattern, prototype pattern  , ]

Interesting tangent (b/c I want to draw graphs anyway) :
6.4: The Constructor Function in JavaScript - p5.js Tutorial ,] which is from 1-6: Foundations of Programming in JavaScript - p5.js Tutorial , ]

p5.js may be found here:


Saturday, December 17, 2016

Purchase of the CJ SHOP Obstacle Avoidance Sensor in place the OP-AMP and Potentiometer Circuit for the Photogate

We ended up purchasing the "C.J. SHOP® 5PCS IR Infrared Obstacle Avoidance Sensor Module for Arduino Smart Car Robot 3-wire"  on Amazon [1] for construction of our photogate.  To build our photogate, we will need two in tandem. These are represented as the red boxes in the illustration below:

The C.J. Shop Obstacle Avoidance Sensor Module looks like the op-amp receiver circuit and the potentiometer transmitter circuit , except that a comparator is used instead of an op-amp.

According to Wikipedia, the potentiometer works a bit better than an op-amp since the op-amp tends to have a bit more lag. 

In practice, using an operational amplifier as a comparator presents several disadvantages as compared to using a dedicated comparator:[5]
  1. Op-amps are designed to operate in the linear mode with negative feedback. Hence, an op-amp typically has a lengthy recovery time from saturation. Almost all op-amps have an internal compensation capacitor which imposes slew rate limitations for high frequency signals. Consequently, an op-amp makes a sloppy comparator with propagation delays that can be as long as tens of microseconds. "

Having the comparator is good because we would need to compare the voltage we sampled from the op-amp circuit when a potato is passing and when it is not. The comparator performs this function, outputs a binary 0 or 1 to the arduino (?), and since it allows for high frequency signals it may be able to measure things that happen quickly.

For further documentation for use with the Arduino, compare this obstacle avoidance sensor to the Sunfounder Obstacle Avoidance Sensor [2]. 

If the CJ Avoidance Sensor does not work well, try replacing the LED with a 940 nm IR LED:

Standard LEDs - Through Hole LED PMI 696-SSL-LX5099IEW

This uses the logic from the quote in Makezine [3]:

"Older remote controllers used gallium arsenide compensated with silicon (GaAs:Si). These LEDs emit at about 940nm, which makes them ideal for detecting water vapor, but they’ve become very difficult to find."

An ejected potato has a lot of water vapor.

We tried other LEDs like the ones from RadioShack (pictured on the side of the breadboad) and the ones from the Parallax SUMO Bot Kit (pictured in the circuit) . See below:

It may not be the LED that was the problem. It may be that we did not use a potentiometer on the transmitter LED and an op-amp or comparator on the receiving LED. The C.J. SHOP purchase provides us with this.




Potentiometer with and without a 555 timer

Following the led dimmer circuits in the Potato Gun Review for the LED transmitter:

we have for the most complex:

We can build the simpler circuits with parts from the most complex. A parts list for all possible combinations:

Description Mouser Part # Link
Aluminum Electrolytic Capacitors - Leaded 470uF 16V 667-ECA-1CM471
Darlington Transistors DARLINGTON TRAN 511-BD679
MOSFET N-Channel 50V 33A 512-BUZ11_NR4941
Potentiometers Sgl Unit Vert Flat Snap-in 10K Ohms 20% 688-RK09L1140A2U
Diodes - General Purpose, Power, Switching 100V Io/200mA BULK 512-1N4148
Diodes - General Purpose, Power, Switching 100V Io/200mA BULK 512-1N4148
Metal Film Resistors - Through Hole 2watts 1Kohms 5% 594-5083NW1K000J
Metal Film Resistors - Through Hole 1/10watt 47ohms .1% 50ppm 71-RN55C-B-47
Multilayer Ceramic Capacitors MLCC - Leaded 100000uF 200Volts 598-M30R104M2
Multilayer Ceramic Capacitors MLCC - Leaded 10000uF 50Volts 598-M15R103M5
Switch Mode Power Rectifiers 16A, 35 and 45 V MBR1635,MBRB1645,NRVBB1645
Standard LEDs - Through Hole LED PMI 696-SSL-LX5099IEW

The link describing the most complex 555 dimer circuit mentions the purpose of the 555 timer. It states that the 555 timer is not needed if you do not have more than one LED. Only a potentiometer is needed.

"Typically current is controlled using a resistor in series with the LED, or a current regulator circuit. Supplying more current to an LED increases its intensity, and reducing the current decreases its intensity. One way of dimming an LED is to use a variable resistor (potentiometer) to dynamically adjust the current getting to the LED and therefore increasing or decreasing its intensity. This works very well when just one LED bulb is involved."

"Unfortunately, all LEDs are not made equal – even those of nominally identical specifications from the same batch from the same manufacturer. Although this will not be apparent when strings of LEDs are being driven with the recommended forward current (e.g. 25mA for ultrabright LEDs), as the current is reduced some LEDs will turn off before others, and some will be dim when others are still quite bright etc."


So we could use this circuit instead:

With a subset of only these parts:

Description Mouser Part # Link
Potentiometers Sgl Unit Vert Flat Snap-in 10K Ohms 20% 688-RK09L1140A2U
Standard LEDs - Through Hole LED PMI 696-SSL-LX5099IEW

OP-AMP Circuit for Potato Gun Photogate

Following the OP-AMP Circuity in Makezine ( for using an IR LED as a light detector we have:

With the parts:

Thick Film Resistors - Through Hole 1M ohm 5% 660-RCR60CT52A105J
Ceramic Disc Capacitors 220pF 500V 10% Y5P 6mm LS 594-D221K20Y5PL63L6R
Standard LEDs - Through Hole LED PMI 696-SSL-LX5099IEW
Precision, Single Supply Op Amp LT1006 ,

Saturday, December 3, 2016

Potato Gun Review

We made progress, but we had some bugs. I found it useful to myself to write down what I had done and plan for what to do. I figured I'd share it since yes and no is not that interesting.

We were able to trip the circuit, and use the Arduino code to interpret it ( The speed calculation is built in on line 53. The inputs from the receiving circuits should be A1 and A2.

We used some parts from a Parallax sumo-bot kit as pictured in
and (
and pg. 45 - 49 of

I seem to recall, we may have had some occasional issues with sensitivity, so it was a challenge to trip them at times.

We never got the final setup with the pvc pipe and reflectors to work.
I do not think they ever were tripped.
( This appears to be putting the IR transmitter and receiver side by side with communication by bouncing off the reflector (compare photogate1.JPG to
It looks like we tried the sumo-bot parts. I may have been worried about transmission loss at the time and also how much a potato may shadow the signal by passing through the parachute shaped gates. The transmitter and receiver may need to face each other within the transmission and reception angle.

I may want to adjust the sensitivity of the receiver with an op-amp and the power of the transmitter with a potentiometer or pwm setup.

I'd like to go back and try it again with the infrared LED emitter and detector package from RadioShack
A skilled observer who acted as an electrician / EE consultant thought it was simpler than the sumo-bot circuit. Perhaps it will befriendlier to my partner and I. We got it to light, and our cell phone(?) cameras were able to pick up the emission
I think we should amplify the received signal to the two receiving diodes with an op-amp circuit and perhaps adjust the brightness of the two transmitting diodes with pwm or a simple potentiometer. The potentiometer setup already worked with the Sparkfun Redboard
( /11800522_10103322872952857_7659406262285231569_n.jpg)
which is an Ardunio knockoff.  I'm treating the receiving LED with the op-amp as a photodiode ( It might be worthwhile to apply the op-amp circuit and pwm / potentiometer to the sumo-bot parts too.

For the op-amp circuit and pwm/potentiometer circuits, I constructed some circuit diagrams in Fritzing (file names in parentheses) that were based off ones I found on the web.

I went online to find some op-amp circuits. I ended up going with this one:

I also found some led-dimmer circuits including or excluding a power rectifier and transistor (in order of more parts to less):

I constructed the circuit for the potentiometer in the video
(potlednove26_bb.pdf) It looks like I already built it with the
Sparkfun Redboard as the battery.

I think we can either use the potentiometer circuit or the pwm circuit
to adjust the brightness of the LED. The potentiometer circuit is a lot simpler. I'm not certain of its limitations. It is a variable resistor. It is all analog, and I recall from the web that it may only be good for a small number of LEDs (although I don't know why this is true). The pwm circuit adds a 555 timer, a few capacitors, resistors, diodes, and perhaps a power rectifier and transistor to the potentiometer. The 555 timer produces a square wave so I call it

I e-mailed myself with some parts (mostly from that matched the circuit diagrams I found at the links above. I need to construct a purchase order for myself, and make this thinking more formal, mainly so when I go back to Oklahoma I have something to do with my project partner.

My partner was also worried about the lack of a rigorous method for sizing the potato gun. The potato guns had previously been sized empirically and with inspiration from sources such as Burt Latke's studies. I built a spreadsheet to scale based on size ratios if I recall correctly. This is described in a quote from :

"Performance in terms of velocity of the potato gun was found to change as various ratios in the geometry changed. Performance was judged by the damage that the gun did to targets.The most damage was done when the chamber diameter was at least twice the barrel diameter with a ratio of length of chamber to diameter of chamber between 3 and 6. It was less apparent, due to limited experimentation, but the chamber volume was usually kept at 1.2 times the barrel volume. This was inspired by a website based on Burnt Latke's studies

We had no mechanism to measure the exact amount of fuel we put in other than our own sense of time when spraying the propellant. So, even if we got the photogate to work we may not measure a consistent speed due to variance in the propellant amount. If we fix the propellant amount,we might find the maximum speed for a particular potato gun.