NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Project Help and Ideas » Prototyping Progress

June 13, 2013
by pcbolt
pcbolt's Avatar

I've been working on this little project off and on for a little while now and got to the point where I needed to test out the range of a Bluetooth connection. Since I wasn't sure what the final product would look like I ddn't want to commit to an enclosure just yet so I just had to use items at hand to use as a box. (Thought you guys might get a kick out of the use of the Pololu and Omaha Steaks boxes).

In Action

This takes data from sensors sent over a LAN connection and sends it via Bluetooth to a stand alone display. The proto boards worked really well and I think I'm going to use them for the finished product (the first one anyway).

Here are the guts...

Master Unit

Slave Unit

June 14, 2013
by Noter
Noter's Avatar

Looks good! What compass are you using and how long do your batteries last? More info on your LAN connection would be interesting too. Do you connect to a hub or peer-to-peer with your PC?

June 14, 2013
by pcbolt
pcbolt's Avatar

The compass module is the HMC5883L which communicates over the I2C lines...fairly simple to use since it measures magnetic field strength in 3 dimensions so all you have to do is convert those readings to an azimuth output. The batteries are Li-Ion and are rated for 2200 mAh, so I'm guessing I pull an average of 50 mA making for about 44 hrs of continuous operation.

The ENC28J60 ethernet board connects to a hub (or cross-over cable) to the PC. I have to handle ARP (Address Resolution Protocol) packets, ICMP packets (pings), and UDP (User Datagram Protocol?) packets. I found some code to get me started but after diving in, it was very interesting how it all works and to code accordingly. The ENC28J60 has user defined MAC and IP address so you can really get down into the nitty gritty of networking if you need to.

June 14, 2013
by Ralphxyz
Ralphxyz's Avatar

pcbolt, what mcu are you using?

Ralph

June 14, 2013
by pcbolt
pcbolt's Avatar

Ralph -

I'm using the 328p on each unit, but the code for both can fit on a 168. Since I'm not using a TCP/IP stack (just UDP), the code for the ethernet portion is only about 2.5K. I haven't looked at any TCP/IP code for the Atmega's but I think with some reduced functionality you could get a TCP/IP stack on the AVR without too much overhead.

June 14, 2013
by Ralphxyz
Ralphxyz's Avatar

Thanks, that makes sense. I used to know that stuff but haven't touched it in 20 years.

Ralph

June 15, 2013
by esoderberg
esoderberg's Avatar

PCBolt,

Nice project; pulls some interesting elements together.

Eric

June 17, 2013
by pcbolt
pcbolt's Avatar

Thanks Eric. You're right...pulling the elements together was pretty educational. I2C compass, SPI/LAN interface, USART Bluetooth mostly driven by interrupts...makes for a fun project. Next step is to build the enclosures. I don't think metal will work (bluetooth interference), so I'm thinking of using plastic or acryllic. I'm trying to make one of the boxes as weatherproof as possible since it will be working outdoors. I'll try and post pics when I get it built.

June 18, 2013
by esoderberg
esoderberg's Avatar

PCBolt,

It may be old fashioned but you might consider wood for your enclosure. I made a few enclosures this way and then sprayed them with Plasti Dip to make it water tight; I just had a much easier time working with wood (drilling, cutting, bonding) than with acryllic or aluminum.

Eric

June 18, 2013
by pcbolt
pcbolt's Avatar

Eric -

That was my original intent...MDF and PlastiDip (or a fiberglass resin compound). What got me thinking about acryllic or plexiglass was This Video about solvent welding. I knew I'd at least need a clear window for the LCD so after looking into ways to waterproof plexiglass I found that. I'm curious how it will work so it should be interesting figuring it all out. I'm going to test it with some scrap pieces and actetone as a solvent. If it fails miserably I'll go back to wood.

Post a Reply

Please log in to post a reply.

Did you know that the Timer/Counter modules on the microcontroller can be configured to output a PWM (Pulse Width Modulation) signal? Learn more...