-
Electronics 101 : screenshots
10/02/2016 at 07:53 • 0 commentsScope
Ac/DC
Amplitude modulation
Astable Multivibrator circuit
Bode plots
Capacitance measurement
Capacitor Discharge
Experiment Designer
Diode Clamping
Diode Clipping
combination clipping
series clipping
Diode IV characteristics
simple diode study
Sound FFT
Piezo buzzer response
Fullwave rectifier
Distance Measurement
Inverting Op-Amp
LDR speed
Monostable multivibrator
Multiple Feedback filter
NJFET characteristics
Summing Junction
-
Wireless Nodes : Battery powered intelligent subunits
09/05/2016 at 12:38 • 0 commentsWireless subunits use a PIC16F18345 along with an NRF24L01P transceiver, a rechargeable Li-ion coin cell, charging circuitry, and a neopixel.
Its features include:
- Unique 3-byte address
- 10 bit ADC. Capture mode
- Battery Level monitoring
- Automatic detection
- 2Hz to 8MHz frequency counter. 1% accuracy
- I2C bus . Integrated with sensor communication classes
- SPI bus
- 5-bit DAC
- Up to 10 WS2812B RGB LEDs in daisy chained form
- Broadcast mode to simultaneously address multiple nodes
Prototype #1
Prototype #2
-
Really tiny stepper motors
07/18/2016 at 10:59 • 2 commentsMicro stepper motors over at aliexpress are super cheap ( 50 for a few dollars! ) . Plenty of shops sell these, but there's hardly any mention of what they're used for. Maybe to adjust lenses inside digital cameras?
Here's what one looks like :They're 4-wire, 2-phase steppers, and can be driven in half/full step modes using 4 push-pull digital I/O. From a science perspective, I need to figure out where these might come in handy. Maybe this biologist can use it to manipulate his subjects into selective interaction.
-
Using phototransistors for pulse sensing
07/18/2016 at 08:10 • 0 commentsHow to make a pulse sensor with a phototransistor, and a bright LED.
The SEN input of the SEELablet is connected to a 12-bit voltmeter, and is also connected internally to 3.3V via a 5.1Kohm resistor. A photo-transistor connected between SEN and GND can be used to measure the amount of incident light.
In order to measure and visualize heartbeats, place a finger placed between a bright light source and the phototransistor, such that the light has to pass through the finger to get to the phototransistor. The body's pulse causes the opacity of the finger to change momentarily, and this is reflected in the amount of light received by the sensor.
In order to record these fluctuations , open the data streaming utility , and set the command to 'get_resistance()' . This will start plotting the resistance of the phototransistor as a function of time
The phototransistor was connected to the SEN input, and its resistance was plotted against time. To do this with a regular voltmeter, simply pull-up the phototransistor's collector to the supply voltage via an appropriate resistor (5K1), and monitor the collector voltage.
A bright light source was aimed at it with a finger placed between the two, such that the light has to pass through the finger to get to the phototransistor. The body's pulse causes the opacity of the finger to change, and this is reflected in the amount of light received by the sensor.
-
Testing and Software Updates
07/17/2016 at 13:54 • 0 commentsUsers should be able to fetch the latest set of experiments with minimal technical know-how and effort.
Debian packaging is standard, and will make it to the next release (stretch) .
However, in the short term, I have a bunch of fully assembled units that need to be installed with the latest deb files
A short script that fetches them from a computer running apache on the local networksudo apt-get remove -y libseelablet URL='http://192.168.1.2/public_html/' LIBNAME='libseelablet-1.0.0.deb' APPNAME='seelablet-1.0.0.deb' wget $URL$LIBNAME -q --show-progress -O lib.deb wget $URL$APPNAME -q --show-progress -O apps.deb sudo gdebi --n lib.deb rm lib.deb sudo gdebi --n apps.deb rm apps.deb
The version numbers are hardcoded in the filename because I haven't figured out how to use regex with wget. (target systems don't have Curl installed )
With slight modification,URL='http://seelablet.csparkresearch.in/debs/'
this script can be used to fetch the deb files from the company website.
In order to test the individual units , some interconnects between outputs and inputs of the device must be made, and a python script handles the rest. Screenshot of the GUI: -
Quick Reference / Layout & specs
07/14/2016 at 10:16 • 0 commentsA small brochure that goes into the shipment box.
Edits:Frequency Counter : 10Hz to 16MHz . Amplitude minimum +/-50mV
Digital Inputs : 5V tolerant . Do not exceed
CH3 : +/-3.3 Volts . 1MOhm input impedance. It passes through a non inverting, unity buffer, and its gain can be controlled by connecting Rg to GND via a resistor.MIC : +/-15mV signal. 200x gain stage inside.
-
Remote access / publishing : ThingSpeak & PubNub
07/12/2016 at 10:12 • 0 commentsbeing able to remotely access the instrument and connected sensors opens up several new possibilities such as weather monitoring systems.
From an implementation point of view, I tried out two platforms.A ) Thingspeak.com : This allows uploading sensor data to your channel, and their website auto-generates nice plots that you may embed on websites. You can also retrieve the data, all through http requests. There's a restriction of 15 seconds between successive uploads of datapoints, so you're limited to monitoring slow parameters.
In the above example, I created a channel called HMC5883L , and uploaded a few datapoints to it. The plot is available here .
result = I.get_voltage('CH1') # upload a voltage reading params = urllib.urlencode( {'field1': float(result), 'key':<your key here>}) headers = {"Content-type": "application/x-www-form-urlencoded","Accept": "text/plain"} conn = httplib.HTTPConnection("api.thingspeak.com:80") conn.request("POST", "/update", params, headers) response = conn.getresponse() print response.read()
B) PubNub :
With PubNub, one can send and receive data on predefined channels. Simply bind a callback function to a channel(string) , and the PubNub thread will automatically invoke it whenever a message is received over a subscribed channel. The free accounts are limited to 1 million messages.
Figure : Utility to access devices remotely
pubnub = Pubnub(publish_key = <your key>,subscribe_key = <your key>) # Create a pubnub communication thread def callback(msg,channel): print msg,channel pubnub.subscribe('C1',callback = callback) #subscribe to a channel called C1, and specify the callback function pubnub.publish(channel = 'C1',message = 'hello') #send a message over C1 . Anyone listening over C1 will be able to read it.
Figure : Thingspeak publishing.
get_voltage('CH1') is executed every 15 seconds, and the data is pushed to the cloud.
-
Response time of an LDR
07/12/2016 at 08:42 • 1 commentLight dependent resistors are known to be slow to respond. We'll find out just how slow they are by using an LED connected to a square wave, and measuring the resistance of the LDR using the scope.
Response to an LED driven by a 47Hz square wave. The resistance is measured by connecting the LDR, and a 5K1 resistor in series between 3.3V and Ground. By monitoring the midpoint of the two, and using the known values of either ends(3.3 , 0 ) as well as 1 resistor(5K1), one can calculate the resistance of the LDR.
-
Laser grid for projectile detection
07/12/2016 at 08:34 • 0 commentsObjective : Calculate the value of acceleration due to gravity by measuring the time between succesive bounces of a ball.
This can be done in a couple of different ways:1) make a plastic ball bounce on a hard surface, and use a microphone with high gain so that the sound of the bounce clips. Connect it to the digital input, and measure time between rising edges.
2) make a laser beam bounce back and forth between two mirrors, and finally stop at a light sensor(photo transistor : G2 )
We're trying to make the second one : The design file for laser cutting is hereThe mirror remains to be cut and assembled for the laser grid. However, the simple photogate featured in the center, works well enough for measuring RPMs of small fans, and time periods of pendulums.
-
Electronics 101 experiments :Diodes, BJTs , Op-Amps, FETs...
07/11/2016 at 16:34 • 0 commentsArmed with a few odd basic instruments such as power supplies, voltmeters, and maybe a scope , there's quite a bit of electronic behaviour one can study.
Some simple schematicsSlightly more advanced topics
Sample Code for measuring a transistor's common emitter output characteristics
from SEEL import interface I=interface.connect() #PVx are power supplies with various output ranges. #set_pvx sets a voltage, and returns the actual set voltage ( corrected for least count ) pv2 = I.set_pv2( 1.0) # Bias the base via a 200K resistor. base_voltage = I.get_voltage('CH3') base_current = (pv2-base_voltage)/200e3 # Use Ohm's law to determine current CollectorCurrent = [] CollectorVoltage = [] for a in np.linspace(0,5,100): pv1 = I.set_pv1(a) CollectorCurrent .append( (pv1 - I.get_voltage('CH1') )/1e3 ) CollectorVoltage.append(pv1) from pylab import * plot(CollectorVoltage,CollectorCurrent ) #Plot and try a different base current show()
Halfwave rectification using an LED.
The high forward threshold voltage of the LED causes the output voltage to be very low for an input waveform of 3.3VExample results :