Sunday, June 28, 2015

Walking calculator.

This may not work with all calculators. Here is an interesting way to count footsteps and estimate how far you have walked.You need a cheap calculator, some foam or sponge, glue, foil, cellophane tape, and 2 long wires.


Then you will want to make a switch. To do that, drill or punch a hole in the sponge for the to the bottom.  Glue the foil to the top and bottom of the sponge.  The two foil pieces should not be touching. Connect the wires separately to each foiled surface.

Open up the calculator and connect each of the other wire ends to the top and bottom contacts of the "equals" aka = button. Put a piece of cellophane tape between the contract so that they do not connect. Close the calculator and make sure everything works normally. you would have to press the switch together for the = sign to work.  Attach the switch to the bottom of the shoe.


Now enter "1 + 1" into the calculator. Start waking and you will see the count begin to rise as you walk. When you are finished walking multiply the steps to the length of your stride and you will have your distanced walked.

Using your original xbox remote and sensor.

Try this at your own risk.


From the kodi wiki:

Follow this simple procedure:
  1. Open the receiver's plastic case using a small screw driver. Carefully pry around the case.
  2. Solder the wire to the receiver using the picture below
  • Note: This might damage the casing of the dongle.

1 Color Coded Pinout



  • If you're using a standard USB cable you should just be able to match the colors and solder away, but to be sure check your cable with a continuity tester according to the USB spec provided here
  1. Red = Positive Power (+5V DC)
  2. White = Data -
  3. Green = Data +
  4. Yellow = Unused
  5. Black = Ground (0V DC)  
Normal usb connections:


Pin Name Cable color Description
1 VCC Red +5 VDC
2 D- White Data -
3 D+ Green Data +
4 GND Black Ground

 

2 Lirc Config

/etc/lirc/hardware.conf:
#Chosen Remote Control
REMOTE="None"
REMOTE_MODULES="lirc_atiusb lirc_dev"
REMOTE_DRIVER=""
REMOTE_DEVICE="/dev/lirc0"
REMOTE_SOCKET=""
REMOTE_LIRCD_CONF=""
REMOTE_LIRCD_ARGS="-r"

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_SOCKET=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS=""

#Enable lircd
START_LIRCD="true"

#Don't start lircmd even if there seems to be a good config file
#START_LIRCMD="false"

#Try to load appropriate kernel modules
LOAD_MODULES="true"

# Default configuration files for your hardware if any
LIRCMD_CONF="lircd.conf"

#Forcing noninteractive reconfiguration
#If lirc is to be reconfigured by an external application
#that doesn't have a debconf frontend available, the noninteractive
#frontend can be invoked and set to parse REMOTE and TRANSMITTER
#It will then populate all other variables without any user input
#If you would like to configure lirc via standard methods, be sure
#to leave this set to "false"
FORCE_NONINTERACTIVE_RECONFIGURATION="true"
START_LIRCMD=""

/etc/lirc/lircd.conf:
 
# brand: Microsoft Xbox DVD Receiever (also works with generic)
# remote control: Xbox remote or any remote using RCA DVD player codes

begin remote

name XboxDVDDongle
bits 8
eps 30
aeps 100

one 0 0
zero 0 0
gap 163983
toggle_bit_mask 0x0

begin codes
LEFT 0xA9
UP 0xA6
RIGHT 0xA8
DOWN 0xA7
SELECT 0x0B
1 0xCE
2 0xCD
3 0xCC
4 0xCB
5 0xCA
6 0xC9
7 0xC8
8 0xC7
9 0xC6
0 0xCF
MENU 0xF7
DISPLAY 0xD5
REVERSE 0xE2
FORWARD 0xE3
PLAY 0xEA
PAUSE 0xE6
STOP 0xE0
SKIP- 0xDD
SKIP+ 0xDF
TITLE 0xE5
INFO 0xC3
BACK 0xD8
end codes
end remote
 
If using the Xbox DVD IR dongle, add this line to the bottom of /etc/modprobe.d/blacklist.conf:
blacklist xpad

3 XERC 


 The Sickmods XERC 2 XE works really well with an HTPC and the Xbox DVD dongle. It handles power-off and power-on via your remote. Here are some installation instructions for that.

Monday, June 15, 2015

From Hackaday: Single chip usb temperature sensor.

Have not tested this, so try at your own risk.




From Hackaday (http://hackaday.io/project/6258) Single chip  usb temperature sensor.
Description
I  (the Hackaday author) created this project because I wanted to learn about PIC microcontrollers and the USB protocol. I also wanted to see how simple I could make a USB device. I've gotten it down to two components: a PIC16F1455 microcontroller and the USB connector. The microcontroller acts as a USB serial device and will send the temperature as an ASCII string once per second.
Details
The PIC16F1455 is a relatively new microcontroller that can do USB without an external crystal. It also has internal pull-up resistors for the USB data lines. These things mean no extra hardware is necessary for USB communication.
I needed something useful to send over USB and I noticed that the PIC16F1455 has a Temperature Indicator Module. This peripheral will let you read the operating temperature of the silicon die over the ADC. It's not terribly accurate, but the silicon die temperature will be about equal to the outside temperature.

I carefully soldered a male USB Type A connector to the PIC16F1455's Vdd, Vss, D+, and D- pins. Then, using the M-Stack USB Stack from Signal 11, I wrote a program to enumerate the PIC16F1455 as a USB CDC serial device and send the temperature in ADC counts as an ASCII string at 1 Hz.
From the computer side, it's easy to connect to the USB temperature data logger like any other serial device, parse the incoming strings, and save the data to a file with a timestamp.
The last step is to map the ADC counts to a temperature scale. Microchip has an application note AN1333 with some equations. However, for a constant Vdd, the scale is pretty linear so it's easiest to record the ADC count at two known temperatures and interpolate between them.

Looks pretty straight forward.

Some code links:

 https://github.com/mogenson/USBTempLogger

 https://github.com/signal11/m-stack

Ancestry.


Return on investment aka ROI.

Return on investment.What is that exactly? Theory is that as you make an investment, the cost for you will diminish and you have a larger share of the profits to use. The longer you can use an investment, it is like putting dollars in the bank, because you do not have additional investment costs. When was the last time you heard a major software company mention their ROI for you? They just want to keep taxing you incrementally. .


Which of the two do you think you will get the best return n investment from?



Eventually you will want to upgrade equipment, but if you can delay those costs, are you not in a better position to bargain?

Friday, June 12, 2015

Baby steps to home automation, part 2

When it comes to home automation, you could use any number of systems such as a off the shelf turnkey solution such as Insteon.Check with your hardware store for more details. You could build it yourself. Unless you are experienced at it, I would let a professional do it, if for no other reason of safety to yourself and others.  If you do do it yourself, you will have to write the software to make it all happen. Though most of it may not be that hard, it can be daunting to the inexperienced. Again get a professional and a mentor. Also any drawings in this article are oversimplified and not to be used in actual systems.  What to do first? You want to make a plan of what you want to do including any budget considerations. (What is it going to cost?)




Home Automation – Requirements Checklist

Functional Areas:
    Controls
        Standalone time-based controllers
        Remote infrared or wireless (RF) controllers
        Local PC only
        Local PC w/Internet access enabled
       Optional telephone interface for status and control
  
    Security & Monitoring
        Alarm System Integration
        Standalone system with outputs
        Standalone system with auxiliary inputs/outputs
        Custom Alarm System
        Motion detectors (people or vehicles)
        Security cameras (archive motion triggered video clips)
        Zone intrusion detectors (infrared)
        Local siren alarm
        Alerts (pager or email or dial-out)
        Door/Window/Gate open sensor
        Barking dog deterrent
        Flood lights

    Activity Monitoring
        Cameras to monitor children or pets
        Pet feeders, pet doors, automatic cleaners, pet containment
        Electronic door latches
        Activity logs
        Disaster Recovery
        Sensors: water level, extreme temperatures, wind, smoke, rain
        Alerts (pager or email or emergency dial-out)
       
    Scene Lighting
        Everyday after dark lighting scheme
        Night time pathway lighting
        Event lighting scenes (parties, dining, mood settings)
        Dusk/Dawn sensor or calculation from latitude & longitude
        Motion triggered lights (i.e. front porch, backyard, interior rooms)
        Vacation schedule after dark lighting scheme with auto-variance
    Home Entertainment (A/V) Controls
        Room lighting: control drapes, blinds, dimmers
        Device power up sequence and configuration
        Play selection (CD, DVD, VHS, Cable, Satellite, Media PC)
        Channel/volume control
        DVD/VCR/DVR control (play, pause, stop rewind, fast forward, eject)
        
    General control
        Single control –simplified (macro commands)
        Remote programming control from the Internet (e.g. TIVO or other DVR)
        Home HVAC Controls
        Heating and cooling based on single/multiple internal thermostats
        Set Heating/Cooling temperature targets via program
        Control HVAC mode (Auto, Heating, Cooling, Off)
        Ceiling fan controls
        Send status on demand or periodic reports
        Monitor pool/spa water temperature
        Control window shades to lower room temperature

    Security
        Surveillance Cameras
            Stationary cameras with video cable plugs into TV or computer webcam
            Pan/Tilt/Zoom (PTZ) cameras (hard-wired or wireless)
            Continuous recording of video capture on motion detection
            Remote viewing from the Internet (live stream or capture files)
    Miscellaneous
        Sprinkler controls (rain detection shut off)
        Integrate custom systems (requires computer interface)
        Appliance controls (electrical water heater, other)
        Integrated Pool/Spa controls


It is apparent, you will need to do some research, not only potential products but, doing some price research. We will go into the above in more detail at a later time.



Now you do not have to implement everything, Maybe even one item is all you need. Now that we have that out of the way, Lets go back to the discussion.  Last time we said that home automation is basically being able to turn something on or off remotely. Let us refine that a little bit. We actually need something to be controlled, a device to do the controlling, and an interface to oversee the controlling.
Something to be controlled can be digital such as on or off like a light switch. That is pretty easy. In some cases though, we need to be able to adjust a device to a certain level and that is analog sort of like measuring with a ruler, light dimmer switch or even with a thermometer.



We need a way to control devices based on a pre-setup instructions which may or many not be dependent on the time of day or feedback from sensor devices,  We can send a signal to turn on an electronic switch as if you just simply turned on light switch or we could use an electronic valve like on a water faucet to adjust those things that are analog.  For example you may want to dim or brighten a lamp. We use a stepper motor that can turn in increments in two directions to adjust a light dimmer switch. This would be as if you were turning the knob on the dimmer. Of course you will want a light sensor to get feedback on how the lamp is doing.



If you build it yourself, you can use everything from a microcontroller such as the Arduino to a full fledged computer. The system will need to be able to output the current status and let you change it if need be. For a computer you will need to have some kind of web server installed. The Arduino has a simple interface to be able to ouput to the web if the ethernet shield is attached.


So now you have remote control via a simple web page. Next time we will spend some time in the big long list at the start of the article.

Tuesday, June 9, 2015

Pwm




From Wikipedia:
Pulse-width modulation (PWM), or pulse-duration modulation (PDM), is a technique used to encode a message into a pulsing signal. It is a type of modulation. Although this modulation technique can be used to encode information for transmission, its main use is to allow the control of the power supplied to electrical devices, especially to inertial loads such as motors. In addition, PWM is one of the two principal algorithms used in photovoltaic solar battery chargers,[1] the other being MPPT.
The average value of voltage (and current) fed to the load is controlled by turning the switch between supply and load on and off at a fast rate. The longer the switch is on compared to the off periods, the higher the total power supplied to the load.
The PWM switching frequency has to be much higher than what would affect the load (the device that uses the power), which is to say that the resultant waveform perceived by the load must be as smooth as possible. Typically switching has to be done several times a minute in an electric stove, 120 Hz in a lamp dimmer, from few kilohertz (kHz) to tens of kHz for a motor drive and well into the tens or hundreds of kHz in audio amplifiers and computer power supplies.
The term duty cycle describes the proportion of 'on' time to the regular interval or 'period' of time; a low duty cycle corresponds to low power, because the power is off for most of the time. Duty cycle is expressed in percent, 100% being fully on.
The main advantage of PWM is that power loss in the switching devices is very low. When a switch is off there is practically no current, and when it is on and power is being transferred to the load, there is almost no voltage drop across the switch. Power loss, being the product of voltage and current, is thus in both cases close to zero. PWM also works well with digital controls, which, because of their on/off nature, can easily set the needed duty cycle.
PWM has also been used in certain communication systems where its duty cycle has been used to convey information over a communications channel.

Most micro controllers have pwm pins on board, but you can easily generate or simulate pwm in software for systems without pwm pins. First you do not see the "1" and then you see more of it. Code compiled with freebasic fbc -lang qb [filename]


[code]
 cls
for x = 1 to 1000
    for y =1 to (1000 - x)
        locate 1,1
        ?" ";
    next y
    for a = 1 to x
        locate 1,1
        ?"1";
    next a
next x
?
end
[/code]


Here is another way using an actual led connected to the parallel port. Emu;ates the idea of the lights dimming and getting brighter.
out 888,0  turns all lights off
out 888,255  turns all lights on

[code]
cls
for x = 1 to 50
    for y =1 to x
        locate 1,1
        rem ?"1";
        out 888,255
        for z = 1 to 500000
        next z
    next y
    for a = 1 to 50 -x
        locate 1,1
        rem ?" ";
        out 888,0
        for z = 1 to 500000
        next z
    next a
next x
out 888,0
[/code]

or

[code]
cls
for x = 1 to 1000
    for y =1 to (1000 - x)
        locate 1,1
        rem ?" ";
        out 888, 0
    next y
    for a = 1 to x
         locate 1,1
         rem ?"1";
         out 888,255
    next a
next x
out 888,0
[/code]

Of course you can do it with single led's also.


Sunday, June 7, 2015

The arduino web server.

 
 
 
Minimal to use the Arduino as a web server and that is already in a sketch
that you can use. You need to edit the code so it will work in your network. 
 
[code] 
#include <SPI.h>
#include <Ethernet.h>


/******************** ETHERNET SETTINGS ********************/

byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0x85, 0xD9 };  //physical mac address
byte ip[] = { 192, 168, 0, 112 };                   // ip in lan
byte subnet[] = { 255, 255, 255, 0 };              //subnet mask
byte gateway[] = { 192, 168, 0, 1 };              // default gateway
EthernetServer server(80);                       //server port


void setup()
{
Ethernet.begin(mac,ip,gateway,subnet);     // initialize Ethernet device
server.begin();                             // start to listen for clients
pinMode(8, INPUT);                         // input pin for switch
}

void loop()
{
EthernetClient client = server.available();   // look for the client

/* a place for the code*/

delay(1);      // giving time to receive the data

/*
The following line is important because it will stop the client
and look for the new connection in the next iteration i.e
EthernetClient client = server.available();
*/
client.stop();
}
[/code]
 
 
Now for the code to do what you want the Arduino to do. Almost looks like
a type of cgi script. This goes in the middle of the script. Definitely 
some errors in this case.

[code]
client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connnection: close");
client.println();

/* 
This portion is the webpage which will be
sent to client web browser one can use html , javascript
and another web markup language to make particular layout 
*/

client.println("<!DOCTYPE html>");    //web page is made using html
client.println("<html>");
client.println("<head>");
client.println("<title>Ethernet Tutorial</title>");
client.println("<meta http-equiv=\"refresh\" content=\"1\">");

/*
The above line is used to refresh the page in every 1 second
This will be sent to the browser as the following HTML code:
<meta http-equiv="refresh" content="1">
content = 1 sec i.e assign time for refresh 
*/

client.println("</head>");
client.println("<body>");
client.println("<h1>A Webserver Tutorial </h1>");
client.println("<h2>Observing State Of Switch</h2>");

client.print("<h2>Switch is:  </2>");

if (digitalRead(8))
{
client.println("<h3>ON</h3>");
}
else
{
client.println("<h3>OFF</h3>");
}

client.println("</body>");
client.println("</html>");
[/code] 





This what the code might look like all put back together and have made 
a few changes.
 

 
[code] 
 
#include <SPI.h>
#include <Ethernet.h>
/******************** ETHERNET SETTINGS ********************/

byte mac[] = { 0x90, 0xA2, 0xDA, 0x0D, 0x85, 0xD9 };  //physical mac address
byte ip[] = { 192, 168, 1, 112 };                   // ip in lan
byte subnet[] = { 255, 255, 255, 0 };              //subnet mask
byte gateway[] = { 192, 168, 1, 1 };              // default gateway
EthernetServer server(80);                       //server port


void setup()
{
Ethernet.begin(mac,ip,gateway,subnet);     // initialize Ethernet device
server.begin();                             // start to listen for clients
pinMode(8, INPUT);                         // input pin for switch
}

void loop()
{
EthernetClient client = server.available();   // look for the client

// send a standard http response header

client.println("HTTP/1.1 200 OK");
client.println("Content-Type: text/html");
client.println("Connnection: close");
client.println();

/* 
This portion is the webpage which will be
sent to client web browser one can use html , javascript
and another web markup language to make particular layout 
*/

client.println("<!DOCTYPE html>");    //web page is made using html
client.println("<html>");
client.println("<head>");
client.println("<title>Ethernet Tutorial</title>");
client.println("<meta http-equiv=\"refresh\" content=\"1\">");

/*
The above line is used to refresh the page in every 1 second
This will be sent to the browser as the following HTML code:
<meta http-equiv="refresh" content="1">
content = 1 sec i.e assign time for refresh 
*/

client.println("</head>");
client.println("<body>");
client.println("<h1>A Webserver Tutorial </h1>");
client.println("<hr>");

client.println("<h2>Observing State Of Switch</h2>");
client.println("<center>");
client.println("<table border='1'>");
client.println("<td>");
client.println("<tr>");
client.println("<td>");
client.print("<h2>Switch is:  </h2>");
client.println("</td>");
client.println("<td>");
if (digitalRead(8))
{
client.println("<h3>ON</h3>");
}
else
{
client.println("<h3>OFF</h3>");
}
client.println("</td>");
client.println("</tr>");
client.println("</table>");
client.println("</center>");
client.println("</body>");
client.println("</html>");

delay(1);      // giving time to receive the data

/*
The following line is important because it will stop the client
and look for the new connection in the next iteration i.e
EthernetClient client = server.available();
*/
client.stop();

}
[/code] 
 
 
-------------
Felt should of added this information.

Hardware Required

  • 1 x Ethernet cable
  • 1 x Wi-Fi Router
  • 1 x Arduino Mega2560 (should work with regular Arduino.)
  • 1 x Ethernet Shield
  • 1 x Breadboard
  • 3 x Jumper Wires
  • 1 x 1k Resistor
  • 2 x 9V Adaptor
  • 1 x pushbutton
 
 
 

PC oscilloscope.

PC oscilloscope or how to save yourself hundreds of dollars before you buy an oscilloscope.



Sometimes when I build simple ttl (Transistor–transistor logic) circuits I like to see the results of the output. An example would be the pwm (Pulse-width modulation) that might control a robot motor. I do not have the money to buy an oscilloscope. so I am using this project to fulfill those needs.

Note I am assuming you know how to use this set up. If you are not sure, please get a professional to help. If you are unfamiliar with electronics do not do this without help of a professional. Improper probes could destroy your computer, what is connected to your computer, and as well as not be safe.

Step 1: Input probe.





You may want to build this input probe from the first diagram. http://nte01.nteinc.com/nte/NTExRefSemiProd.nsf/$$Search is a good place to go to get equivalent part numbers.  Also included are other probes that are not as system safe.

http://xoscope.sourceforge.net/hardware/hardware.html

Quote from linuxquestions
[quote]
I made a little progress....
I started first with using the line in jack. I made a probe with a 1 meg resistor inline. The tip of the stereo plug is the left channel or channel 1 on Xoscope display. So the ring is the right channel or ch. 2 on the display. I only used one channel to start with. I used the Sleve as ground. I found the line jack seems work a lot better "cleaner" than the mic input.
With xoscope running, trigger off, I opened Kmix and selected the red button under "line" and went over and selected the green button above "IGAIN" and set the gain mid way and it started to work. This was after much knob dicking and fiddling around without a clue.
I seemed to have bleed over from the other channel, but I think its just the setting of the scale I used 1/5 and the noise dropped way down. I think being familure with how it works will make it easier to use.
I think its possible to make a 555 timer oscillator maybe with some clipping diodes to create a voltage reference?
[/quote]

Step 2: Getting the software for ubuntu.















You will need two pieces of software. One for the scope software itself and one for the volume control. You can go to the synaptic package manager an get the two files or you can get them via the command line/ (requires an internet connection).

Xoscope - oscilliscope

Ubuntu
$ sudo apt-get install xoscope

Fedora 16
$ sudo yum install oscilloscope

Pavucontrol - soundcard control  (older systems may need to use the alsa utilities instead)
sudo apt-get install pavucontrol

Untested:
Fedora 16 32 bit
sudo yum install gtk+-devel pavucontrol
download and extract the xoscope archive
cd to the xoscope directory
./configure
sudo make
sudo make install

Step 3: Xoscope quickie manual.

NAME
       oscope xoscope - Digital Oscilloscope via Sound Card
                                    or Other Hardware

SYNOPSIS

oscope [oscope options] [file]
        xoscope [toolkit options] [oscope options] [file]
 

DESCRIPTION

Oscope  is  a  digital  real-time oscilloscope. It graphically displays
        signal amplitude or bit logic as a function of time.   Signals  may  be
        displayed,  saved, recalled, and manipulated by math functions.  Signal
        input devices currently include:
 
        /dev/dsp
             Audio sound recording via /dev/dsp.  Two 8-bit analog channels  at
             8000 S/s to 44100 S/s.  Left and right audio is connected to X and
             Y inputs respectively.  Use an external mixer  program  to  select
             which  sound inputs to record.  AC coupled, voltages unknown, 256K
             sample memory.
 
        EsounD
             Shared audio sound via the  Enlightened  Sound  Daemon.   This  is
             great  for  watching music but support for it is an option at com
             pile-time.  EsounD is auto-detected and preferred over /dev/dsp.
 
        ProbeScope / OsziFOX
             Radio Shack ProbeScope, Cat. No. 22-310 is also known as an  oszi
             FOX.   This  handheld  probe sends its data through a serial port.
             It samples one channel at 6-bits up to 20 MS/s with 128 samples of
             memory.  Real voltages are labeled in sample ranges from 1 volt to
             100 volts.  If a ProbeScope is detected, it is connected to the  Z
             input.
 
        Bitscope
             Bitscope (www.bitscope.com) is a mixed-signal capture engine which
             is accessed through a serial port.  It  simultaneously  samples  a
             digital  8-bit port and two analog channels at 8 bit resolution at
             up to 25 MS/s or more.  If detected, Channel A and B are connected
             to  X  and Y while the Logic Analyzer is connected to Z, disabling
             all sound input.  Bitscope support is currently under  development
             and not yet fully functional.
 
        See  the  -x  and -z options and the ENVIRONMENT section below for more
        details on how the above devices are detected.  Some  of  the  controls
        below apply only to the sound card and are labeled as such.  Oscope has
        no physical control over the ProbeScope/osziFOX which is controlled  by
        its  own  switches and built-in menus.  Please refer to your ProbeScope
        or osziFOX Owner’s Manual for operating  instructions.   Bitscope  will
        eventually be controlled through a separate dialog window.
        Oscope  is an interactive program and can be completely controlled from
        the keyboard at run-time.  In verbose key help mode, each available key
        is shown on the screen in (parentheses).  The following single key com
        mands are available:
 
        ?    Toggle verbose key help display mode.
 
        Escape
             Immediately quit the program.
 
        @    Load a previously saved file.  You are prompted for the  filename.
 
        #    Save  current  settings  and  memory buffers to a file that can be
             loaded later.  You are prompted for the  filename  and  asked  for
             confirmation to overwrite if it already exists.
 
        Enter
             Clear and refresh the entire screen.
 
        ^    Toggle  the serial input device on/off.  A serial device is turned
             on only if it is found active on a serial port.  This may be  use
             ful  if  the device was not detected at startup.  See the ENVIRON     
             MENT section below for more details.
 
        &    Toggle the sound card input device on/off.
 
        *    Cycle the sound card DMA divisor: 4, 2, 1.  The sound driver  will
             divide  it’s DMA buffer by this factor.  The value 4 usually gives
             the fastest display rate.
 
             Under EsounD, this value instead determines whether the connection
             to EsounD will block (4) or not (2 or 1).  Blocking mode is nicest
             to CPU usage but the oscope interface will not  respond  when  the
             there  is  no  sound  stream coming from EsounD.  Nonblocking mode
             will let oscope be responsive whether sound is available  or  not,
             but will consume all available CPU cycles.
 
        (/)  Decrease/increase the sound card sampling rate.
 
        9/0  Increase/decrease  the  Sec/Div horizontal time scale (zoom out/in
             on time).
 
        -/=  Decrease/increase the sound card trigger level.
 
        _    Toggle the sound card trigger channel: X or Y.
 
        +    Cycle the sound card trigger  type:  automatic,  rising  edge,  or
             falling edge.
 
        Space
             Cycle  the  trigger  mode of the sound card: run, wait, stop.  Run
             mode continuously acquires  and  displays  samples  after  trigger
             events.   Wait mode waits for the first trigger event and displays
             only the first set of samples; this is "single-shot"  mode.   Stop
             mode  suspends  the data acquisition and displays the current sam
             ples.
 
        !    Cycle the plotting mode: point, point accumulate,  line,  or  line
             accumulate.   In  the  accumulate  modes,  all samples stay on the
             screen; use Enter to clear them.
 
        ,    Cycle the graticule style: none, minor divisions  only,  or  minor
             and major divisions.
 
        .    Toggle  the graticule position: behind or in front of the signals.
 
          Decrease/increase the graticule color.
 
                 Toggle the manual cursors on/off.  When manual  cursors  are  dis
             played,  the  measurements between the cursor positions are shown.
             When cursors are not displayed, automatic measurements are  shown.
 
        "    Reset  both manual cursor positions to the sample just after trig
             ger.
 
        Ctrl-q/w/e/r
             The Control key held down in combination with  q/w/e/r  moves  the
             first cursor back or forward by 10 samples or back or forward by 1
             sample respectively.
 
        Ctrl-a/s/d/f
             The Control key held down in combination with  a/s/d/f  moves  the
             second  cursor back or forward by 10 samples or back or forward by
             1 sample respectively.
 
        1-8  Select the corresponding display channel.  Measurements  are  dis
             played  for the channel.  Channel 1 and 2 are used as input to the
             math functions so they can’t be used to do math.  By default, they
             are  connected to the X and Y input channels.  Channel 1 and 2 can
             also be used to display memory buffers or the Z  input  for  doing
             math  on  memory  or the alternate input.  Channel 3 through 8 are
             not restricted and can be used for any purpose.  By default, the Z
             input  is  connected  to Channel 3.  The remaining single key com
             mands operate on the currently selected channel:
 
        Tab  Toggle visibility: Hide or show the selected channel.
 
        {/}  Decrease/Increase vertical scale of the selected channel.
 
        [/]  Decrease/Increase vertical position of the selected channel.
 
             /~  Decrease/Increase number of logic analyzer  bits  displayed.   The
             default  of zero bits plots the signal as one analog line of vary
             ing amplitude.  Any other value plots multiple digital lines  rep
             resenting the least significant bits from bottom to top.
 
        ;/:  Increase/Decrease the math function of the selected channel.  This
             is not available on channel 1 & 2.
 
        $    Show the result of an external math command on the selected  chan
             nel.   You  are prompted for the command.  The command must accept
             samples of channel 1 & 2 on stdin and write a new signal  to  std
             out.   See operl, offt.c and xy.c in the distribution for examples
             of external math filter commands.  Not available on channel 1 & 2.
 
        A-W  Store the currently selected channel into the corresponding memory
             buffer.  Buffer X, Y  and  Z  can  not  be  used  because  they’re
             reserved as the signal inputs.  Memories are stored from time zero
             to the current display update position.  So it is best to STOP the
             display before storing to a memory buffer.
 
        a-z  Recall the corresponding memory buffer or input device to the cur
             rently selected channel.  Buffer X is the Left or A  input,  Y  is
             the Right or B input, and Z is ProbeScope or Logic Analyzer input.
             The rest of the buffers are available for signal memory.
        Xoscope adds mouse controls to menus or around the edges of  the  scope
        area.   These should be nearly self-explanatory.  They perform the same
        functions as the equivalent keyboard commands  above.   If  built  with
        GTK+,  a context-sensitive pop-up menu is available with right-click to
        select channels, change scale and position, recall  and  store  signals
        and  so  on.   Left  click  decreases  a  variable  while  right  click
        increases.  The manual measurement cursors can also be positioned  with
        the mouse.
        The  command-line  options  define the startup state of oscope and have
        reasonable defaults.  All options may be capitalized in case they  con
        flict  with  an  X  toolkit option.  These options are also recorded in
        text files saved by oscope.
 
        -h   Help usage  message  showing  these  startup  options  with  their
             default values, then exit.
 
        -# 
             Startup  conditions of each channel.  # is a channel number from 1
             to 8.  Code can have up to  three  fields,  separated  by  colons:
             position[.bits][:scale[:function  #,  memory  letter,  or external
             command]].  Position is the number of pixels above  (positive)  or
             below (negative) the center of the display.  Bits is the number of
             logic analyzer bits to display.  Scale is a valid  scaling  factor
             from  1/50  to  50,  expressed as a fraction.  The third field may
             contain a built-in math function number, memory letter, or  exter
             nal math command to run on the channel.  Using these options makes
             the channel visible unless position begins with a  ’+’,  in  which
             case the channel is hidden.
 
        -a 
             Active, or selected, channel.
 
        -r 
             Sound  card  sampling  Rate  in samples per second.  Current valid
             values are 8000, 11025, 22050, or 44100.
 
        -s 
             Time Scale factor from 1/20 to 1000 expressed as a fraction  where
             1/1 is 1 ms/div.
 
        -t 
             Sound  card  Trigger  conditions.   Trigger  can  have up to three
             fields, separated by colons: position[:type[:channel]].   Position
             is  the  number of pixels above (positive) or below (negative) the
             center of the display.  Type is a number indicating  the  kind  of
             trigger,  0 = automatic, 1 = rising edge, 2 = falling edge.  Chan
             nel should be x or y.
 
        -l 
             Manual cursor Line  positions.   Cursors  can  have  up  to  three
             fields,  separated  by colons: first[:second[:on?]].  First is the
             sample position of the first cursor.  Second is the  sample  posi
             tion  of the second cursor.  The final field is weather the manual
             cursors are displayed (1) or the not displayed (0).
 
        -c 
             Graticule Color, 0 - 15.
 
        -d 
             Divisor for sound card DMA: 1, 2, or 4.   The  sound  driver  will
             divide  it’s DMA buffer by this factor.  The value 4 usually gives
             the fastest display rate.
 
        -m 
             Graphics Mode to use.  For xoscope, use the more flexible  -geome
             try instead.  0 = 640x480x16, 1 = 800x600x16, 2 = 1024x768x16, 3 =
             1280x1024x16.  WARNING: not all modes are supported by  all  video
             cards; don’t use unsupported modes!
 
        -f   Font  to  use.   For oscope, these are listed in /usr/lib/kbd/con
             solefonts.  For xoscope, they’re  the  output  of  xlsfonts.   The
             default should work best.
 
        -p 
             Plot  type.   0  = point, 1 = point accumulate, 2 = line, 3 = line
             accumulate, 4 = step, 5 = step accumulate.
 
        -g 
 
Step 4: Additional sources

Mostly for MSWindows users:

http://www.zeitnitz.de/Christian/scope_en

http://www.picotech.com/picoscope-oscilloscope-software.html

http://www.tech-systems-labs.com/test-software.htm

http://www.electronics-lab.com/downloads/pc/index.html

http://www.brothersoft.com/downloads/oscilloscope.html

Several RPi;s.



Ideas on holding several Raspberry Pi's together,



or put them into individually stackable cases


Thursday, June 4, 2015

Not MSWindows 10 ready,

Guess I am old fashioned, but a computer is not a real computer if it does not have slots.This Pentium 1 is not MSWindows 10 ready. Who cares Slackware 14,1 runs just fine. Some computers may never die.

Free as in speech.


We don't need no stinkin license..


Tuesday, June 2, 2015

Not for me

Extend, embrace, and extinguish.


Baby steps to home automation, part 1,




There are many parts to home automation but the main need is to be able to turn something on or off. Without that the rest is meaningless. Let us start with a simple light switch that you can control manually. The off position we will call zero and the on position we will call the one state.




Of course the purpose of home automation is for you not to have to manually turn off or on a switch. So we can get an electronic part known as a switching transistor to do the job for us with the help of a computing device that we can program. These diagrams are way over simplified to make things simpler. We could ask the computer to turn off all the leds with a command like out 888,0 and if any leds were on, they would immediately turn off.




The again, we could issue a command to turn them all on with out 888,255



Then you would want to turn them off and on individually also. Then you would either write some code or have a pre-written program to do it for you and have appliances turn on or off at your will. Of course once you have your programming arranged, you can control the leds or any kind of home appliance or anything else at will. That is when interesting things can start happening if you want them to.



In the real world. you probably would not be building any electronics. You could purchase network based control boxes. Most of the devices would be controlled by the time of day or manually controlled like a remote stereo system.





Many single sensors are cause and affect such as a garage door opener where the system waits for the detection of the controller and the proper security sequence. or you could have multiple sensors that work independently but cause the same affect such as a fire alarm or a security system

 


But let use get a bit more sophisticated. you could add a variety of sensors, but the most common might be the temperature sensor for control of your heating cooling system. The same idea could probably be adapted to a sous vide cooking system.


Now things have become a bit more complicated with additional sensors and control devices required. Also requires more complicated programming. You can see where systems can become very expensive.

We have only scratched the surface when it comes to sensors. That is part 1 for now,