CircuitGizmos

Electronic Products for Creative Minds

  • Home
  • Gizmo Store/Products
  • Documentation/Datasheets
  • Projects/Libraries
  • GizmoBlog
  • Services/Contact
    • Design
    • Contact Gizmo!
  • Your Gizmo Cart
    • Your Account

June 28, 2010 by robert Leave a Comment

Computer control of AC devices

An Instructables published a week or so ago:

If you have ever wanted to control electronic devices from your computer to control or regulate your environment, this instructable will guide you. In this example of computer control, a USB relay device (USBmicro http://www.usbmicro.com – U451) will control two 60 watt light bulbs from a PC program.

Visit this instructable for more information.

Filed Under: Uncategorized Tagged With: Home Automation, output, relay, RobotBASIC, u451, uln2803

April 23, 2009 by robert Leave a Comment

Command-line Output Tool

I created a tool that runs on the command line or “DOS box” that lets you use a U401 or U421 (output) in a batch file or other type of PC script. This is output only. You can set or reset the lines on the U401 or U421 using this executable file.

The program is called usbmout and can be downloaded (it is in a zip file with the USBm.dll included too) for free.

stunninggraphic

That little graphic is about as boring as it gets, isn’t it?

But it is a quick example of controlling a U401 or U421 via command-line.

The syntax for the command is reasonably straight forward.

usbmout 0 set 2

The program name is “usbmout”. The first argument is the U401 or U421 device that you want to address. 0 is the first USBmicro device found on your PC, 1 is the next device, etc. (It is a zero-indexed list).

The word “set” is the command that you want to give to the U401/U421. It is a command that sets an output bit (one of the 16 lines) of the U401/U421 device. If you think that another command to reset that bit would be “reset”, you would be right. 2 is the bit that you wish to set or reset. Again, this is zero-indexed so the 16 output lines are numbered 0 – 15.

Example:
usbmout 0 set 1

This looks at the first U401/U421 that it can find (because of the 0) and sets bit 1 (on).

Example:
usbmout 3 set 9

This looks at the fourth U401/U421 that it can find (because of the 3) and sets bit 9 (on). You you can control any number of U401/U421 devices that you have connected to your PC. The first device is 0, the second is 1, etc.

Example:
usbmout 0 reset 1

This looks at the first U401/U421 that it can find (because of the 0) and resets bit 1 (off).

The set and reset commands give you the ability to turn single U401/U421 lines off and on. Two more commands let you write a full 8 bits to the port at once. The commands are “porta” and “portb” and the value that follows them is the value (decimal) copied to that port.

Example:
usbmout 0 porta 9

This looks at the first U401/U421 that it can find (because of the 0) and sets bit 0 and 3 of port A (on) and turns off the other bits.

With the usbmout.exe program (and the DLL in the same directory) you can control a U401 or U421 that in turn controls LEDs or relays or what-have-you. You can turn things on and off from the command line. If you have batch files, scripts, program macro languages, programs like AutoHotKey, or any program that will call command line programs, you can control a U401/U421 and CONTROL THE WORLD.

Or at least control your little part of it. 🙂

Filed Under: Uncategorized Tagged With: AutoHotKey, Home Automation, LED, output, programming, relay, u401, u421

March 23, 2009 by robert Leave a Comment

Mail Light – Part 4 – Rotary Lights

The Mail Light hardware could easily be modified to turn on some rotary warning lights, such as these lights from Woot.com.

The example pictures below show the modification of a set of these lights to be driven by a U401 which works just as well as the U421:

wootlight1

Inside the lights:

wootlight2

Modifications to drive the LED and motor on their own:

wootlight3

Light attached to a development board that contains a U401:

wootlight4

U401 and driver wired up to operate the rotary light:

wootlight5

Filed Under: Uncategorized Tagged With: email, LED, output, programming, REALbasic, u401, uln2803

  • 1
  • 2
  • 3
  • Next Page »

A Ton of Documentation

Open all | Close all

Projects made by Gizmo, Friends, and Members

open all | close all

Recent GizmoBlog Musings

  • Altair 8800 using a ColorMax!
  • Re-energizing the ColorMax, Pt. 3

Visit us!

  • Facebook

Electronic Products for Creative Minds

CircuitGizmos is your source for electronic products that help you create your embedded projects. Here at CircuitGizmos.com you will find a friendly store filled with creative products and all of the documentation that you need to use these gizmos.

We create devices that we believe make electronics fun, but we also know that our products are used for professional designs. For decades we have designed products for commercial, military, and medical industries. Our gizmos here are great for engineers and hobbyists alike.

Copyright © 2008+ CircuitGizmos, L.L.C. All rights reserved

Image already added

Recently Viewed Products

Copyright © 2023 · Generate Pro Theme on Genesis Framework · WordPress · Log in