Blog

BrushBot Comm board IR communications

I’ve been doing some experiments with the IR transmitters and receivers used on the comm board.  One outstanding question is what the value of the series resistors (R1 and R2) for the transmitter should be.  We want the message passing distance to be fairly short in order to keep the communications mainly between pairs of bots.  But the IR power should still be sufficient to give reliable communications. Another question is whether or not the voltage from the batteries we are using will be sufficient for the IR receiver.

I made up the following test setup:  For the receiver side, I took one of the IR receivers that we are using on the comma boards and mounted it in a solderless breadboard to make it easy to try resistor values.  I also hooked up a variable power supply and used an ATMega328 LillyPad Arduino to drive the IR LED.  The LillyPad was the only thing I had handy which would run at 8MHz and low voltage.  The power supply was set to 2.75VDC which is pretty much as low as you can go with a 328 running at 8MHz and is around the voltage that the batteries can put out.  I used a test program from the IRremote library (http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html) to repeatedly send out 0XD10 which is the Sony code for the ENTER key.

On the receiver side, I used a comm board hooked up to a variable power supply to test how the receiver coped with different voltages.   Monty had written a test program for the receiver side which recognizes Sony ENTER and blinks the LEDs in a particular pattern (although the key codes in irrx.h need to all be decremented by one to be correct).  With this program it is possible to move the comm board around and watch the LEDs to see where successful IR transmission occurs.

As a baseline test, I put in a 100 ohm resister into the IR transmitter circuit which gives about 20ma drive to the IR LED.  Using 5VDC for the receiver, the IR transmission works successfully at quite a long distance (probably across a room).

However, lowering the receiver voltage to 2.85VDC or below results in a failure of the IR receiver to work.  It still registers that an IR transmission is occurring but is unable to recognize the code.  Since the batteries put out more like 2.72VDC, this is a big problem.  After discussing it with Monty, we decided to short out R5, the resistor on the Vcc line into the IR receiver to try to get as much voltage into the receiver as possible.  Fortunately, this seems to work and allows the receiver to work down to 2.53VDC.  So I then hooked up the battery board to the comm board and (with R5 shorted) the receiver works.  The rest of the result below are all done with battery power for the receiver.

I then examined how changing the transmittter series resistor affected the range:

1K ohm            18 inches
4.7K ohm        5 inches
10K ohm         2.5 inches

These distances are for on-axis communications.  I’ll do some more experiments to see how the off-axis accuracy breaks down and update the table.

BrushBot Comm board ISP programming

As I mentioned in my last post, I think ISP programming of the BrushBot Comm boards is the way to go.  What’s more, it should be possible to get double-duty out of an ArudinoISP based programmer and use it as a serial link for debugging.  This requires hacking the ArduinoISP sketch and setting up some sort of serial comm between the BrushBot Comm board and the ArduinoISP.

Since the tiny44 doesn’t have a UART, we could either use the SoftwareSerial library to big-bang serial on any pin, or we could make use of the SPI hardware support provided by the tiny44’s USI module.  The former is prone to timing problems, but is probably easier to setup.  The latter makes sense because the necessary SPI comm pins are the same as that used for ISP programming, and thus are already cabled, and the hardware comm support should reduce the flash and resource usage in the tiny44.  I’ve started down the SPI route and am adding USI SPI support to the BrushBot core that would more or less replicate the functionality of the HardwareSerial code found in the Arduino core.  This will allow “print” statements to work over SPI.

In order to do both the ISP programming and debug comm with a single device, we’ll need to use an Arduino rather than Atmel’s AVRISP.  I picked up a handful of cosmetically defective but fully functional Teensy 2.0‘s at Monday’s DorkBot at a very reduced price that will fit the bill.  If you need an Arduino to use for programming, then see me at Saturday or Monday’s meeting and get one for what I paid for it.

Monty

BrushBotComm Arduino support

Good news!  The latest version of Arudino (0018) makes it relatively easy to target the tiny44 we’re using on the BrushBotComm boards.   I’ll get the necessary files up tomorrow.  This update won’t include a bootloader though.  Given the limited program space of the tiny44, we’d be better off using ISP programming anyways, and obtaining a cheap ISP programmer just got a bit easier with the ArduinoISP example sketch include in Arduino 0018!

Also, if you have the smaller BrushBotComm board (w/o the transistors), hold off on installing the 5-pin programming header if it’s not too late already.  It turns out that a 6-pin header can be easily installed with the tail of the extra pin bent over such that it can be soldered to the V+ pin on either the switch or D5.  This will allow the small board to match the pinout of the big board, and allow either board to be powered by the programmer.  I’ll trade your 5-pin connectors for 6-pin connector the next time we meet.

Monty

Update 3/26/2010:
Arduino support code and instructions added here: brushbotcomm-board-software

BrushBotComm board build follow-up Monday

The bRainSilo remodel progress is looking good for a group project meeting on Monday, so we’ll follow-up on the BrushBotComm board build we started a couple Saturdays ago.  We’ll continue assembling boards for those that didn’t get theirs built last time, and hopefully we can start programming them.

Time: Monday 3/22, 7:00pm
Location: bRainSilo: http://brainsilo.org/wiki/Location
Bring:

  • BrushBotComm boards if you already have them, built or not
  • Money if you haven’t paid for boards/parts yet
  • Soldering iron — if you have a decent one with a fine tip.  We still need to solder up some programming cables.
  • Desk lamp if you can — we didn’t really have enough light last time
  • Vision enhancement devices — I’ll bring my stereo-microscope and what magnifiers I have, but I think we could have used more last time

See you Monday!
Monty

Meeting Place. What would happen….

What would happen if we had swarm board development at BackSpace on a day other than Dorkbot Monday. Granted, lead and food don’t go together. There is not a lot of exposure to lead.  The meeting at the University was low key enough that I don’t think anyone would mind too much if we did the same thing on a slightly smaller scale. Limit people placing parts on boards to 4 and “baking” to 4 at the same time.  And, the process is close to smoke free. That might allow more people access to the venue without much hassle.

Next Meeting – March 6, 2010

Beginner CTL: TBD

Advanced CTL: Surface Mount Circuit Board Soldering (Scott Dixon, Jim Larson

Announcement: the rules for the new PARTS Indoor Challenge are posted. Get your robots ready for the April 3rd Meeting!

After the main meeting, the group build of the BrushBot controller will take place.  Those not participating in that may want to go watch the rest of the Autodesk Oregon Regional FIRST competition at the Memorial Coliseum.

Group Project Meeting Cancelled Today (Only)

Owing to the lack of meeting space (TechShop closed, bRainSilo being renovated) as well as the fact that Monty won’t be ready for us to do a group build of the BrushBot PCB, we’re going to cancel today’s meeting.

Instead, this would be a great time for people to contribute to the Wiki and start writing code for the BrushBot.

If you are active in the group project, please sign up for an account at http://colab.portlandrobotics.org. We’ve been tweaking the permissions for new users, so hopefully you will be able to edit and contribute to existing group project pages. If you have trouble, please contact me.

BrushBotComm board update

The BrushBotComm boards and parts have arrived and the first couple boards are blinking their LEDs!

One is shown with the battery holder board; the other has a connector for external power.

Yesterday I got together with Scott and Jim, the guys behind the “Extreme Surface Mount Soldering” Instructable, and we soldered a couple boards up using their IR-thermometer enabled PID-controlled hot-plates.  This was a test run in preparation for the group build that will be happening soon, but not next Monday as originally planned (more on that in a bit).

We had most of the parts for yesterday’s hot plate soldering, but I didn’t get the Mouser parts until this evening’s DorkBot meeting.  So, I came prepared with soldering iron and tweezers to add the MOSFET’s, IR receiver and battery holders right there in Backspace.  Unfortunately there’s still one missing component — the catch diodes for the MOSFETS.  Looks like I left them out of the order… doh!

The boards powered up and programmed using ISP and Atmel’s AvrStudio with no problems.  The hot-plate reflow worked great and no rework was required.  I’m excited for everybody else to try the hot-plate method of soldering — it really opens up what you can do with surface mount on your own.

Originally the plan was to assemble all the boards at this coming Monday’s project meeting, but the logistics aren’t going to work out.  The bRainSilo is undergoing some work to fix it up, so I’m not sure what state it’s going to be in next Monday, and as it is now, I’m not sure there is enough usable table space to do the assembly.  There’s also a bunch of parts preparation that’s not going to happen by then.  So, I’m thinking either the following project meeting, or maybe even as part of March’s general meeting.  The latter would be nice because there’s more table space, but I’m not sure what Pete has planned for that meeting (Pete?), and the different time (Saturday morning versus Monday evening) might not work for all…  What do you all think?

Meanwhile, consider coding up some routines for the tiny44 to have ready to try out:
IR remote control receiver code (i.e. light up an LED when a remote control code is received)
IR transmitter code (i.e. modulate the IR LED at 38kHz and encode a command to turn off a TV)
IR message-passing code

Monty