2011
07.31

It has been rumored that the local AM station in my hometown was not dropping its power or changing its pattern at night, a clear violation of their license grant.  Since the neighboring co-channel stations and the FCC don’t care about rumor or my “opinion”, I wanted a way of automatically logging the field strength of a broadcast station.  This also paves the way for propagation studies and watching for band openings.

I had been eyeing the Silicon Labs line of receivers on a chip for some time but they come in a hard to work with surface mount package.  Finally SparkFun Electronics came out with a board based upon the SI4735 chip, which does everything… AM FM Shortwave and Long Wave. It does RSSI (received signal strength indicator) as well as digital audio (not HD radio unfortunately) and RDS or RDBS.  And its on an Arduino shield!!

si4735 Shield

I’ll say a few negative things about this shield…

  1. It did not come with pins to mate with the Arduino.  Fortunately I had something that would work temporarily until I can get the proper ones in.
  2. The library code is riddled with “not working yet” comments.  I have some work cut out for me getting simple things like -Get Frequency- working.
  3. The status response was coming back with all zeros.  I found a couple solutions in the SparkFun comments, I had to add a delay, but the status response was still nonsensical.  I found a thread in the Arduino forum describing a pretty serious design flaw.

So far that is all I’ve found -wrong- with the board.  I was able to tune around the FM and AM bands and surprisingly, was pulling in a station in New Haven, Connecticut, about 11 miles distant, with no antenna, just the traces on the board!  See the board in action and a map of the path below.

httpv://www.youtube.com/watch?v=zaA6CzmilAs


View larger map

So with that said, I think I’ll make a proper 3.3v to 5v converter for the D12 line and begin programming the board shortly.

Share
2011
07.31

I was chasing a problem with an Arduino / Ethernet Shield / TMP421 temperature sensor combination.  The Arduino would write to the online database with the USB hooked up but not when powered by the external supply only.  I could not tell this as, well, the USB was not connected, so I couldn’t see the failures in the serial window.

Probing around, I was assuming the Ethernet Shield was deriving some of its power from the USB chipset, or some such, but no… I found 3.6 V on the 5 volt rail.  I found a perfect 3.3 on the 3.3 rail.

I found with all the losses through the polarity protection diode, the regulator itself, and the USB vs. external supply decision circuitry, was dropping my Vcc voltage to 3.6.  I turned up the 5 volt supply feeding it to a perfect 5 and then up to 5.3-ish with no joy.

Ultimately I switched the Arduino supply to the +12V supply that is driving other circuitry in the project and the Ethernet Shield is happy again.

That is all… don’t feed an Arduino a perfect 5V supply unless you want to bypass all the regulation and USB vs. external supply decision circuitry.

Share
2011
07.27

I got tired of the mess in my garage so I’ve undertaken a cleanup!

Garage photo

Garage facing back

 

Garage Photo

Garage, facing forward

I have a great deal of work ahead of me but it’s slowly coming along.  One thing I needed in there was a workbench.  Inspired by a book I have regarding 2×4 furniture, I set out to design and build something based on that and plywood.  The following is what came out.

 

Workbench In Progress

Workbench In Progress

Workbench Complete

Workbench Complete

The bill of materials is:

6 2 x 4 x 92 framing studs $2.43 ea
2 2 x 4 x 1/2 ply wood $10.67 ea
1 box 4″ coarse exterior grade drywall screws $8.47
1 box 1 1/4″ coarse exterior grade drywall screws $8.47

 

The approximate cost of the bench is $50.  I will provide a cutting list and detailed photographs in a further update.

Share
2011
07.12

Have a building at the other end of your property not served by cable/phone?  Need to cross another’s property to get internet access to your remote building, a WiFi wireless bridge might be the answer.

I work part-time at a radio station on Cape Cod and they needed to add internet connectivity to their transmitter site.  This site is about 550 feet distant, across a road and several other properties so a direct run of Cat-5 or 6 was impossible.  Also we did not want the added expense of a second ISP subscription so enter high power routers and the dd-wrt open source software.

 


View larger map

 

It was decided early on to use panel antennas and high power routers compatible with the dd-wrt software suite.  The Luxul X-Wav Surefire flat panel antennas were already purchased by the station owners, but proved to be pretty good.  The router, as recommended by the dd-wrt organization were Buffalo WHR-HP-G54′s.  They have one detachable antenna, a built in antenna and are switchable, so that all the available power and receive sensitivity can be directed to either or both.

 

Luxul Panel Antenna

Luxul Panel Antenna at Transmitter

 

After installation of the dd-wrt software, configuration of the routers was problematic, but not for lack of capability, but rather hard to read documentation at the dd-wrt wiki. This entry is intended to alleviate some of that difficulty.

First and foremost, get as much of the network working on the bench, across the room, then across the yard, before deploying the equipment in the field. This simple action will save you alot of trips when you inevitably lose control over either end and have to visit it personally.

The originating, local end is referred to as the “Primary Router”, the remote location, the “Remote Router” or “Bridge Router”. In our particular configration the Primary Router is not the master network router, but is simply used on the network as a workgroup switch locally and as one end of the WiFi path.  As a result, many features are turned off.

After installing the dd-wrt software, there is not much configuration on the Primary router and will vary depending on your installation.  You must have the wireless security set to be WEP or WPA-aes (WPA2-Personal works as well).  In my case I had shut off the internal (left) antenna directing everything to the outside (right) panel and had shut off DHCP as the Primary router would be handling that.  Finally, I set the IP to 192.160.0.50, something outside the DHCP range but easily remembered.

On the Secondary router, perform the following steps.

  1. Perform a “30-30-30″ reset on the router.  Hold the reset button for 30 seconds, keep holding the reset button and power down the router for 30 seconds, and while continuing to hold the reset button, power up the router and continue holding it for another 30 seconds.  A watch or stopwatch will be helpful.
  2. Connect a cable from your computer to one of the LAN ports on your router (one of the group of 4).
  3. Configure your computer to have a static IP address in the same subnet (192.168.1.9 in my case).
  4. Point your browser at 192.168.1.1 and open the dd-wrt webgui.
  5. You should be asked to change your password and username. Carefully type these in. If you aren’t asked for a password and username, do a hard reset, this time doing it properly! Hit change password.
  6. Go FIRST to the wireless tab, wireless security and enter the security type and key that matches your primary router. You must use WEP or WPA2-aes to have dd-wrt work reliably.  In my case, WPA2-Personal worked fine with a simple passphrase.  Hit SAVE then APPLY Settings.
    NOTE: You may wish to do the rest of this setup with wireless security disabled.  Then enable it as your last act.  This will require access to both sides. 

    dd-wrt primary wireless security screen dd-wrt secondary wireless security screen
  7. Go to the Wireless/Basic Settings page and change the wireless mode to Client Bridge.
  8. Your wireless network mode, channel and encryption should be set to the same as the primary router.
  9. If you are using N only or Mixed with N, set your wireless channel width to match your primary.
  10. Set the wireless network name to exactly the same as your primary router. Make sure spelling and capitalization match.
  11. Hit SAVE at the bottom. Then hit APPLY.
  12. Check to make sure all the configurations, including the mode, saved and the mode is still client bridge. If any changed, fix them, and save again.
    dd-wrt primary wireless mode screen dd-wrt secondary wireless mode screen
  13. Goto Setup/Basic Setup and enter a router local IP address of something not already occupied on your network and easy to remember (I chose 192.168.0.254 The client bridge must match the subnet of the primary router) Leave subnet mask at 255.255.255.0.
  14. Set the Gateway IP to your primary router. (192.168.0.50 in my case)
  15. Leave Local DNS blank.
  16. Check Assign Wan port to a switch, if you wish to.  (this will give you one more LAN port)
  17. Change your timezone and DST to match where you are.
  18. Hit SAVE at the bottom. Then hit APPLY.
  19. dd-wrt primary router basic settings screen dd-wrt secondary router basic settings
  20. Set your browser to the router’s new IP (192.168.0.254 in my case) and login to your router.  You may need to restart your browser.
  21. Goto Security, Firewall. Under Block Wan Requests, uncheck everything but “Filter Multicast” (Leave Filter multicast checked).
  22. Hit SAVE at the bottom. Then hit APPLY.
  23. Disable SPI Firewall (I also disabled the firewall on the primary router as it is not directly connected to the internet, I let the main router handle this function).
  24. Hit SAVE at the bottom, then hit APPLY.
    dd-wrt primary firewall screen dd-wrt secondary firewall screen
  25. Go to setup/advanced routing and change the operating mode from “gateway” to router.
  26. Hit SAVE at the bottom, then hit APPLY.
    dd-wrt primary routing screen dd-wrt secondary routing screen
  27. In my case, I routed the receive and transmit antennas to the outdoor panels (‘right’ antenna is the connecterized external antenna).  To to Wireless/Advanced and set TX Antenna to Right and RX Antenna to Right.  Also at this time, I increased my TX power to 175, too high and the amplifier will eventually die.
  28. Hit SAVE at the bottom, then hit APPLY.
    dd-wrt primary advanced wireless screen dd-wrt secondary advanced wireless screen
  29. Go to Status/Wireless and hit Site Survey, and Join the appropriate wireless network. The access point table should show the MAC address of your primary router, along with signal strength. (SSID Broadcast MUST be enabled on your primary router).  Note: you cannot do this from the Primary side, your bridge is not visible, its not an AP.  All we get is a nice list of the neighbors.  The Secondary router, or the bridge, has no other neighbors.
  30. dd-wrt primary site survey dd-wrt secondary site survey
  31. You should now be able to ping various machines on either side of the bridge.
  32. After some time, you should have nice healthy packet numbers at Status/Wireless.  A few bad packets are normal, I currently have 159815 good / 0 bad receive, and 440968 good /71 bad transmit on the Primary router and 118674 good / 0 bad receive and 63801 good / 26 bad transmit on the Secondary router (different uptimes).
  33. If everything is working as expected, as a final act, on the Primary side of the bridge, log into the Secondary router (192.168.0.254 in my case), go to Administration/Backup and hit BACKUP.  Rename this file to something memorable.  Do the same (or similar if not dd-wrt) on the Primary router (192.168.0.50 in my case).

It should be noted, I have experienced some minor packet loss (missed pings) and some served pages timing out (the remote end has equipment with small webservers integrated).  I believe this is due to the Windows ARP cache becoming confused.  The wireless MAC address is not rewritable by the dd-wrt firmware, so each IP address at the Secondary end will have the same MAC address.  I have not tested this with other OSs but I believe Mac and Linux will be more forgiving.

For further reading check out the dd-wrt Wiki

Share