Author Topic: DigiSpark and Xbee series 2  (Read 4149 times)

atrueresistance

  • Newbie
  • *
  • Posts: 11
DigiSpark and Xbee series 2
« on: December 22, 2012, 07:07:42 pm »
Hello all, this is my first post here. I don't have a lot of microcontroller/engineering experience at all. I just graduated college and work in vb.net.

For my first project I've been working on building is brewpi (www.brewpi.com). I might be a little bit over my head, but might as well start off right. So far I have a doner fridge that the thermostat went out on and to the point of hooking up the solid state relays.

My DigiSparks are going to be a little while yet and I got to thinking of improving this design by adding xbee wireless modules with the DigiSpark as the microcontroller in the fridge, battery powered of course.

I'm currently half way through Building Wireless Sensor Networks: with ZigBee, XBee, Arduino, and Processing by Robert Faludi and have learned quite a bit so far.

I remember reading 4 pins are required for XBee (don't quote me), which leaves one for two ds18b20 temp sensors, and one for compressor relay. I would be 1 pin short. A workaround could be to utilize XBee pin for internal light control for heat. This would all be connected to a central raspberry pi. Of course if the pi crashes heat would be disabled, but the fridge should maintain close temp even though pi crash.

Is this even plausible? As the library is over 7kb
http://code.google.com/p/xbee-arduino/

Is there another lightweight library? Am I even correct on the theory of this?

#electronicnoob
« Last Edit: December 22, 2012, 07:07:42 pm by atrueresistance »

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
DigiSpark and Xbee series 2
« Reply #1 on: December 26, 2012, 07:26:36 pm »
The biggest issues you\'ll run into here are
1) Library size - it needs to be under 6k to fit
2) The xbee uses UART and the Digispark does not have a hardware UART - software UART would have to be used and it\'d take some work to make that work

I\'d suggest you look at the RFM12B which uses SPI, works with the Digispark and the Pi, and leaves you at least two of the six pins for your sensors and control.

BTW: Xbee only needs 2 pins for communication, the other two are 3.3v and GND I believe.

I\'d think if the Pi crashed you\'d just have the Digispark hold the last temp.

Also I\'d power it with a 5volt adapater, batteries seem like pain for an application that is close to an outlet anyway.


Bluebie

  • Sr. Member
  • ****
  • Posts: 486
DigiSpark and Xbee series 2
« Reply #2 on: December 27, 2012, 04:39:29 pm »
Batteries will behave weirdly in a fridge - output voltage maybe lowered too far.

jetdillo

  • Newbie
  • *
  • Posts: 2
Re: DigiSpark and Xbee series 2
« Reply #3 on: January 26, 2013, 11:32:05 am »
Hmmmm. I'm wondering if a USB host cable might be useful. that way you could connect one of the many different carrier boards from SparkFun or Ada or Seeed directly to the Digispark.