Etching your own stencils

How to etch your own solder paste stencils

by 



We’re kind of surprised we haven’t covered this concept before since it only uses techniques that are commonly avaialable for home PCB fabrication. [Ray] made this solder paste stencil out of a sheet of copper using the same etching techniques you would for a circuit board. He designed and printed a resist pattern, with toner everywhere except the places where there should be holes in the stencil. He transferred the toner to the copper using an iron.

The difference here should be obvious; this a thin copper sheet with no substrate. Because of that, you must protect the copper surface before etching. he covered the entire thing, both sides, in packing tape. After that it’s into the Cupric Chloride bath to dissolve the exposed parts. Once the tape and toner has been removed you can scree a precise amount of solder paste onto your boards.

This isn’t for everyone, but if you’re assembling many boards it’s not a bad approach. If the stencil is no longer used it can be recycled, but we do wonder how corrosion on the copper will affect the stencil’s performance.

The idea for this technique came to [Ray] from a guide that’s been around for years.

FCC OKs on-body medical networks


The agency passed rules for wireless systems that can stimulate paralyzed limbs
by Stephen Lawson, IDG News Service
Img-25

The U.S. Federal Communications Commission adopted rules at a meeting on Wednesday to allow wireless networks of microstimulators designed to treat paralysis and other conditions.

The agency approved the use of MMNs (medical micropower networks) in four blocks of the 400MHz spectrum band despite opposition from broadcast engineers who say they are concerned about interference. One of the frequency blocks is used by trucks that send live media reports back to TV and radio stations.

Microstimulators implanted next to nerves can stimulate those nerves through electrical charges, causing muscles to contract and limbs to move. MMNs can link dozens of those stimulators to devices that take in signals from the human nervous system, bypassing areas of the nervous system that have been impaired by strokes or spinal cord or brain injuries.

The Alfred Mann Foundation (AMF), which has developed prototype MMNs, sought access to the spectrum for these systems in 2009. It did not seek exclusive access to the frequencies and said the new networks could coexist with other users. In a press release on Wednesday, the FCC called the new rules an example of how "spectrum-agile" radios can make more efficient use of scarce spectrum.

In a related development, the agency's Office of Engineering and Technology issued an order allowing Second Sight Medical Products to sell a retinal prosthesis that uses wireless transmissions to restore sight to the blind through a miniature video camera mounted on a pair of glasses. The camera sends images to a video processing unit, and the video is then sent wirelessly to a neurostimulator implanted on the eye. It is designed for people with advanced retinal degenerative disease.

Speed up you uploads with the write boot option in Averdude


2 Second Arduino Bootloader
written by Noah Bedford  [permalink]

The Arduino "write bootloader" option is slow. Why?
When writing the fuses to the AVR for the first time, the bitclock needs to be at ~200KHz. 
After that, you can crank the speed all the way up to 4MHz.
The option for this is -B, and it's not particularly well documented; lfmorrison on the AVRdude forums says:
"note that the feature of setting SCK duration is only available in avrdude if you're using an AVRISP with 2.xx firmware. In that case, the SCK duration, in microseconds, is specified after the parameter -B. (eg. -B 1000 would be a request for a bit clock of 1000 microseconds, or 1 millisecond, or a SCK frequency of 1 kHz. The parameter closest to the desired frequency, without exceeding it, will be chosen.)

If you're using version 1.xx firmware, avrdude doesn't know about setting the bitrate. You'd have to either:
1) Use different programming software that does support setting the ISP SCK Duration parameter in version 1.xx of the firmware, or
2) Upgrade the AVRISP firmware to version 2.xx inside AVR Studio first, or
3) Modify the avrdude source code to attempt to adjust the STK500 ISP SCK Duration parameter using the -B command-line option, using the implementation from STK500v2 as a guide. (keeping in mind that the translation from SCK parameter to physical SCK frequency is probably different in the two firmware versions...)"
So we run:
avrdude -c avrispmkii -p m328p -B 5 -u -U lock:w:0x3f:m -U efuse:w:0x05:m -U hfuse:w:0xDA:m -U lfuse:w:0xFF:m -P usb
avrdude -P usb -c avrispmkii -p m328p -u -U flash:w:ATmegaBOOT_168_atmega328.hex -U lock:w:0x0f:m -B .2

Interfacing Arduino to USB GPRS modem



Cheap GPRS modem from Dealextreme

USB GPRS modem
by Oleg via Circuits@Home

Some time ago I started writing about connecting Arduino to cellular network. Using standard GSM AT commands, a program running on Arduino can place and take calls, send and receive SMS, shoot pictures, access the Internet while monitoring phone’s battery level, signal strength and connection status. For many of these tasks any old phone works quite well, however, there are times when a specialized piece of hardware is desired. Today I’m going to talk about one such piece of hardware which can be connected to Arduino board using USB Host Shield.

USB Tri-band GPRS Modem from DealExtreme is just an ordinary GSM cell phone minus keyboard, display, battery, and built-in microphone/speaker. What is left makes inexpensive (~$25), lightweight (25 grams) and compact (see title picture) GSM/GPRS module to use in DIY projects. It supports a standard subset of GSM commands as well as some proprietary ones. The modem is built around BenQ M23 GSM/GPRS Wireless module and uses Prolific PL-2303 USB-to-serial converter. As explained on this page, the PL-2303 in the modem uses non-default USB PID; make sure to grab the latest version of my library, which transparently supports both PIDs.
To explore the functionality of this device I wrote a simple program which is based on Xbee terminal. The program initializes the PL-2303 and waits for user input passing keystrokes to the modem and displaying replies to the screen. Let’s run it and see what this little modem is capable of.

The hardware arrangement is shown on title picture. During normal operation the system can be powered from USB; depending on your Arduino board you may need to disconnect the modem during programming. All interactions occur via terminal emulator running on a PC – I use putty on Windows and minicom on Linux. Using serial monitor built into Arduino IDE is not recommended. The modem needs activated SIM card to function, I use prepaid SIM from T-Mobile and also successfully used it with AT&T.
If everything is connected correctly sketch will output the following:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Start
PL Init
Addr:1
NC:1
0000: 09 02 27 00 01 01 00 A0 FA 09 04 00 00 03 FF 00
0010: 00 00 07 05 81 03 0A 00 01 07 05 02 02 40 00 00
0020: 07 05 83 02 40 00 00 Conf.Val: 01
Iface Num: 00
Alt.Set: 00
Endpoint descriptor:
Length:         07
Type:           05
Address:        81
Attributes:     03
MaxPktSize:     000A
Poll Intrv:     01
Conf.Val: 01
Iface Num: 00
Alt.Set: 00
Endpoint descriptor:
Length:         07
Type:           05
Address:        02
Attributes:     02
MaxPktSize:     0040
Poll Intrv:     00
Conf.Val: 01
Iface Num: 00
Alt.Set: 00
Endpoint descriptor:
Length:         07
Type:           05
Address:        83
Attributes:     02
MaxPktSize:     0040
Poll Intrv:     00
Conf:1
PL configured

The last message (line 38) shows that PL-2303 has been recognized and successfully configured. Type at on the keyboard and press Enter. If you see OK on the next line the modem is alive and answering.
...
Conf:1
PL configured
at
OK
Now let’s see if a modem is connected to a network. Type at+creg? and press Enter:
at+creg?
+CREG: 0, 1
 
OK
The second number in reply indicates the state of registration. My output (1) means the modem is happily registered with home network. Other numbers you may see are “0″ – no service, “2″ – searching for operator, “3″ – registration denied.
If modem is registered, it is possible to determine the cell operator:
at+cops?
+COPS: 0,0,"T-Mobile 260"
 
OK
When modem is online, we can do something useful. I’ve already sent several text messages to this number, let’s take a look at them by using +CMGL command:
at+cmgl=1 +CMGL: 1,1,,50 07912160130320F8040B919127163673F500001101814190044A23F3F61C6496BFDBA0F3FB7D6697152D503BACAFCBDF76C0B91D4EB35DE3771B +CMGL: 2,1,,57 07912160130320F5040B919127163673F500001101814124244A2B66F9BB0D3ABFDF677619447F83885850FB4D2EB7152D503BACAFCBDF76C0B91D4EB35DE3771B +CMGL: 3,1,,53 07912160130320F8000B919127163673F500001101817184554A26F4F29C0E9A81CCF2771B747EBFCFECB2A2056A87F575F9DB0E38B7C369B66BFC6E03 +CMGL: 4,1,,53 07912160130320F8040B919127163673F500001101817145154A26F4F29C0EA281CCF2771B747EBFCFECB2A2056A87F575F9DB0E38B7C369B66BFC6E03   OK
What you see is output in so-called PDU format. Many GSM devices have this format turned on at power-up. It is OK for computers but not so easy for humans. Luckily for us, this modem also supports SMS text mode, which can be turned on using +CMGF command:
at+cmgf=1
OK
at+cmgl="ALL"
+CMGL: 1,"REC READ","19725555555",,"11/10/18,14:09:40-36",145,35
sms from google- m...v@gmail.com
+CMGL: 2,"REC READ","19725555555",,"11/10/18,14:42:42-36",145,43
from google to DX modem - m...v@gmail.com
+CMGL: 3,"REC READ","19725555555",,"11/10/18,17:48:55-36",145,38
test 3 from google- m...v@gmail.com
+CMGL: 4,"REC READ","19725555555",,"11/10/18,17:54:51-36",145,38
test 4 from google - m...v@gmail.com
 
Sending messages is also easy. It is done using +CMGS command. The command takes recipient’s phone number as a parameter and outputs a prompt where a message can be entered. End of message is indicated by pressing Ctrl+z, make sure your terminal program passes this code unchanged to the modem (putty works correctly here). Here is an example:

at+cmgs="19725555555"
> test from T-Mobile to google
> +CMGS: 34
OK


There is much more that can be done with this little modem (or to any GSM phone for that matter). Some things, like placing or receiving calls, are pretty easy to do, while others, like accessing internet, would require some extra programming. In coming weeks I’m planning to develop code to support a cell phone in unattended mode; in the mean time, try to talk to your phone via terminal and let me know if you have any issues.

GPRS modem hack for use with standard prolific drivers


By Brody Radford

DealExtreme sells a USB GPRS modem for $25.35… good value. I bought one for my UAV project. It uses the BenQ M32 GPRS module (pdf) and Prolific PL-2303 USB-TTL UART bridge (pdf).

Too bad the device’s PL-2303 USB<->UART bridge has a custom PID (0609, instead of the factory-default 2303; the VID 067B is unchanged), and the supplied software and documentation that work with it aren’t much use. To be useful I need direct access to the device.

I tried modifying the driver, but Windows (7, x86) returned an error to the effect that it wasn’t going to work on my system. But there’s always another way, so… out with the toolkit. The device has an EEPROM which stores custom settings for the PL-2303, so disconnecting it would solve my problem, with the added benefit that if I reinstall Windows or plug the device into another machine it will work with standard drivers.

Hacking the GPRS modem
Time: 5 minutes
Tools:
  • Small Philips screwdriver
  • Soldering iron
  • Solder
  • A sharp pick or tweezers
  • Optional: solder wick to remove any stubborn solder
1) Toss out the supplied user guide and CD.
2) Open the case (three small Philips screws).
3) Locate the PL-2303′s external 24C02 EEPROM:


4) De-solder pin 5, shown below. I added a little solder for heat transfer, and pulled the leg up with tweezers.
Lift this pin on the 24C02

5) Download and install the PL-2303 driver from Prolific.

6) Plug in the device, wait for drivers to install.
7) Open a terminal program with the new COM port (check device manager if your terminal doesn’t detect it) at 115200bps (Update: supposedly the module has autobaud rate detection from 1200 — 115200bps, so others may also work… I can’t remember a specific reason for using 115200, so just try what suits) with other settings left to their defaults.]
8) Start typing AT commands to send SMS messages etc. Look here (PDF) for the command set.
Connecting to a microcontroller
To do this you’ll need to isolate/disable the PL-2303. Here are some ideas:
  • Remove the chip and solder to the TX and RX pads. Careful not to tear up the pads (flood each side with solder and lift, mop up with wick). This is the easiest in terms of soldering, but you can’t go back to USB so easily.
  • Lift the TXD pin (1) and solder wire to the pad. Solder directly to the RX pin.
  • Solder to the TX and RX pins and tie RESET_N to GND to tri-state the TX pin.
Tips
  • Don’t forget to connect GND between the two systems!
  • The M32 module TX & RX pins appear to be 3.3V logic, and may or may not be 5V tolerant… Be careful! If your microcontroller has 5V I/O, you’ll need to run it at 3.3V or convert logic levels.

Synapse Wireless


There’s a New SheRifF in Town and Their Name is Synapse Wireless

By skaterj10


It seems that we in the hobby industry have been a little naive as to think that Digi International’s reign as RF Networking King would last forever? Not only have Roving Networks under cut them on pricing with their new WiFi node but they now have some stout competition from Syanpse Wireless in the 802.15.4, 2.4 GHz node market as well. Many companies are closing the gap on Digi, and even surpassing them in some cases.


The 802.15.4 RF network node that I’d like to talk about is the Syanpse Wireless RF100PC6 RF Engine. These nodes are very unique in that they not only house a RF network transceiver chip but also a user-programmable microcontroller (uC) as well. The RF100 nodes are actually configured by uploading code to the uC in the form of SNAPpy scripts (a programming language that is python based) using the freely downloadable Portal Software. These scripts can very quickly uploaded to the nodes and will configure the network without the need for a serial monitor, API, or drop-down system. Although, in Portal they do include a drop down system if you’d like to program nodes that way.

One huge benefit is that the nodes can do self-healing mesh networking right out of the box and can also do an RPC (Remote Procedure calls) to make another nodes in the mesh toggle or generate a pulse on an unrelated pin and do transparent serial communication at the same time. This feature is like both Xbee AT and API modes at the same time. One other amazing feature is the massive transmission range, they can transmit even further than WiFi nodes.

Another benefit of the RF100 nodes is that they can be configured OTA (Over the Air) as long as you have a node that is fresh (meaning it’s been erased or has never been user-programmed yet) and hooked the PC/Laptop side via a COM port (or through a USB-serial device). So say you want to modify the code on a node that you just recently placed on the roof of a building, no worries, because it doesn’t even matter how it’s configured the Portal Software will pick it up (making sure you have a fresh node on the PC-side) and you can re-upload to it.

The RF100 nodes have several other interesting features and applications including, as we just recently found out, being able to wirelessly program the Arduino UNO when setup up as a transparent serial link (with other additions) and when using Arduino1. The SB Freeduino and Arduino Duemilanove can also be programmed wirelessly using the same SNAPpy scripts but with minor changes to the UART baud rate (from 115220 to 57600).

And for all the Arduino hateboys out there, the fact is that Arduino is just a Atmega328p with a serial bootloader that talks to a free and simple IDE. These Syanpse Wireless nodes can be used to program ANY uC with a serial bootloader and all that may be needed is an adjustment to the reset timing. Oh yes, and level shifting for the serial lines (Tx/Rx) would be a good idea if a 5V logic uC was being used with these 3.3V based RF100 modules.

Notable Specifications and Info

Power consumption: Down to 1.6 uA with internal timer running.

General purpose Input/Output Pins: 19 GPIO with 8 being available for 10-bit ADC (Analog to Digital Conversion).

Code space: 60kB programmable flash, with 20kB available free for user applications , the rest of the flash holds the code for the Self-healing mesh networking and other synapse features.

Range specs: 3 mile outodoor LOS (Line of Sight) Range, 1000 ft. indoor range with an F type PCB antenna. Note: even the newest 2.4 Ghz Xbee modules with external antennas can not meet this kind of transmission specification.

Operating temp: -45 to 85 degrees Celsius (a very healthy range for outdoor applications)

Other communication types: Has SPI and I2C capabilities but unfortunately they aren’t tied directly to the onboard microcontroller SPI/I2C lines, rather they are common I/O transmitting these signals that are bit-banged out which makes them more of a one way communication. The RF100s also have an extra UART for a second serial communication link to other devices.

Code examples: Along with many code examples included with the Portal Software, Synapse Wireless has also sponsored an open source repository of SNAPpy scripts.

Warning: Because of their increased transmission range there’s a silver lining which is that you’ll have to be aware that Synapse nodes do have an FCC warning that they should not be within 20 cm of the body when active.

Purchasing Options: Currently there are only 2 places in the world to buy these modules, Future Electronics and the Open-source Hardware and BEAM robotics company Solarbotics. I’m not sure why all the nodes have “Call for Pricing” at Future, but at Solarbotics pricing is available.

I think this up and coming company Synapse Wireless is definitely going to give Digi a run for their money in the industrial and hobbiest communities.

Using the ATTiny85 instead of the UNO


Programming the ATTiny85, Arduino Style
by Thatcher
This is a sort of a continuation of the last post. In the last post,
I showed how to load the ATTiny85 cores into the Arduino IDE.
If that worked for you, cool! This how to actually program the chip. 
If it didn't work... put a comment somewhere. I'll try to help.
Anyway, programming the ATTiny is very easy. 
The only thing you really need to do is set up a target board. 
This is either a breadboard, perfboard, or PCB circuit that interfaces 
the ATTiny to an Arduino board. The circuit should have
these connections:

This is called ISP circuit. The chips communicate over
SPI via this configuration.

  























What this circuit does is connect the ATTiny to power and ground,
but it also has four wires for communication. It does this using a 
protocol called SPI. The four connections are SCK (clock), 
MISO and MOSI (communication), and Reset (resets the chips 
when it is done). That circuit connects the SCK, MISO, and MOSI pins
of both chips to the corresponding one on the other chip. 

The reset pins of the two chips are not connected, however. 
The Master (Arduino in this case) has a digital pin connected to the 
actual reset pin of the slave (ATTiny85). On the Arduino Uno and 
Duemilanove (and some other ones of the same shape), SCK is pin 13,
MISO pin 12, MOSI pin 11, and reset pin 10. The ATTiny85 pinout is below.

ATTiny85 pinout, showing the uses of all the pins.
   







The breadboard programmer above isn't the only way making
a target board.I made one out of a small piece of perf board, 
a DIP 8 socket, a five-pin header, and a bunch of wires.


That one wire that shoots off in both pictures is going to power.















It is is the same circuit as the breadboard, only more permanent. 
Same connections, though.

Actually Programming the Chip
 
Once you have one of these target boards, either on a breadboard or
perfboard (or something else), we can actually program it. 
The first thing to do is upload the ArduinoISP sketch onto
the Arduino board. You find it here:

File/Examples/Arduino ISP
 











And then upload it. What it does is a couple of things: the first thing it 
does is emulate an AVRISP programmer. The computer asks what
it is, and it says it is a AVR programmer instead of a more
generic serial device.

The computer sends it the program (in hexadecimal form) and then it 
goes to its second function. It loads the program hex file onto the 
other chip via SPI and then relays whether or not the operation 
worked to the computer.

So connect your target board, make sure everything is connected,
and (IMPORTANT!) set the Tools/Board Menu to ATtiny85
(w/ Arduino as ISP). Note: you may have to put a 110 ohm resistor
between reset and power on the Arduino board. Then you can upload
your program. I used this one. It is for the board that I fixed in the
last post!

int toast = 0;

void setup(){
  pinMode(0, OUTPUT);
  pinMode(1, OUTPUT);
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  PORTB = B0000100;
}

/*

0 - H
1 _ H
2 - L
3 - H

*/

void loop(){
  PORTB = B0001011;
  delay(int(random(2000))*10);
  toast = int(random(4));
  for(int i = 0; i <= int(random(5,12)); i++){
    delay(int(random(30, 60)));
    digitalWrite(toast, LOW);
    delay(int(random(30,60)));
    digitalWrite(toast, HIGH);
    delay(40);
    PORTB = B0001011;
  }
  //delay(10000);
}

That should do it. You'll get this message in the bottom window:


If another set of text appeared, something is wrong. Here is a 
good site for finding out what the errors mean. Otherwise just
Google it. Now you can test the chips on a breadboard or a
PCB or something... I really hope this helps people. I just
love the ATTiny chips because they're so small yet can still
do many of the same things as a normal Arduino. Remember,
though, not every function works. 

Hacked Cassette Adapter


Bluetooth Cassette Adapter

I've been looking for a new car recently and one feature that I really want is a sound system with Bluetooth connectivity. For ages I've played music in my truck from my phone using a cassette adapter but I hate dealing with the wires. Then inspiration struck. What if I had a cassette adapter with Bluetooth connectivity? Brilliant!

For a starting point I went to eBay and found a cheap pair of Bluetooth headphones for about $15

Opening up my old cassette adapter, this is what I found. The gear drive will need to be kept intact, otherwise the tape deck will think that the tape is at its end. Unfortunately this dramatically cut down the amount of space that I had to work with. Fitting everything into the cassette form factor was the biggest challenge of the project.

This is what the electronics of the headphones looked like after teardown. The electronics are pretty straight forward. I'll need to keep the PCB and the battery. To get the adapter to play through the tape deck I took the leads from the speakers and soldered them to the tape write head from the cassette adapter.

It looks like I got lucky. The Bluetooth PCB will fit along the side of the cassette without having to cut it down or move components. I cut out one corner of the cassette to make space for the mini USB port that is used to charge the device.

To mount the circuit board I cut out a slice in the cassette housing to hold one end and secured the other end with a tiny screw.

 Here is how I arranged the electronics in the cassette. There was just barely enough space, but everything fits, and the gear drive still works.


All that was left was tricky task of reassembling the cassette. Here is the final product. the button on the top is used to turn the system on and off.

The cassette adapter works great! The gear drive is more noisy than it used to be but if you are playing music you don't notice it. I've been driving around with my new adapter for a few days now. It seems like I get about 6-7 hrs of music time between charges. I had originally hoped to be able to charge while playing but the  design of the tape deck in my truck interferes with the cable. Anyway, I'm pretty happy with the results.