Author Topic: Wireless on Digispark?  (Read 9969 times)

chickenturd

  • Newbie
  • *
  • Posts: 15
Wireless on Digispark?
« on: July 18, 2013, 12:05:44 pm »
I was wondering if anyone has any experience with adding a wireless module to the digispark? I would like to have my digispark talk to the digiX when that comes in. I also see that nRF24L01+ modules are dirt cheap. I just don't really know where to start with this project.


Is the digispark's Attiny85 + 8k flash enough to run the nRF24L01+ with a mesh networking library?
Also, it looks like the wireless module required 4 pins, leaving only 2 free on the digispark, not enough to drive a RGB led :(

DeuxVis

  • Full Member
  • ***
  • Posts: 107
Re: Wireless on Digispark?
« Reply #1 on: July 19, 2013, 02:30:10 am »
You can run some RGB leds with a single pin - a bunch of them actually - they just need to be somewhat more intelligent.

See http://digistump.com/board/index.php/topic,991.0.html

MichaelMeissner

  • Full Member
  • ***
  • Posts: 166
Re: Wireless on Digispark?
« Reply #2 on: July 19, 2013, 05:26:16 am »
One possibility is to use something like RadioBlocks which have a co-processor on the board, and have an I2C interface, so you can use a common bus with other I2C devices: http://www.coloradomicrodevices.com/the-radio-block/


The RadioBlock with its LPC1114 processor, has much more computing power than the DigiSpark has, but it is more convenient to program the Spark.


I must confess to buying two RadioBlocks during its original kickstarter campaign, and never using them, so I can't say how well they work in practice.  I glanced at the forum, and it didn't seem particularly active.
« Last Edit: July 19, 2013, 06:44:01 am by MichaelMeissner »

chickenturd

  • Newbie
  • *
  • Posts: 15
Re: Wireless on Digispark?
« Reply #3 on: July 23, 2013, 11:09:23 am »
thanks yall, this information is very helpful. I think smart LEDs might be the trick except it adds a bit to the cost.

Bluebie

  • Sr. Member
  • ****
  • Posts: 486
Re: Wireless on Digispark?
« Reply #4 on: July 23, 2013, 06:59:15 pm »
WS2812 LEDs only cost about 20¢ each on strips on aliexpress, or you can even buy the little modules individually for under 50¢ each on ebay and aliexpress and the likes. I was previously paying much more for bare RGB LEDs and I had to mess about with resistors and pwm settings and stuff.. this is so much better ^_^

CBcracker

  • Jr. Member
  • **
  • Posts: 80
Re: Wireless on Digispark?
« Reply #5 on: July 29, 2013, 09:18:58 am »
I was wondering if anyone has any experience with adding a wireless module to the digispark? I would like to have my digispark talk to the digiX when that comes in. I also see that nRF24L01+ modules are dirt cheap. I just don't really know where to start with this project.


Is the digispark's Attiny85 + 8k flash enough to run the nRF24L01+ with a mesh networking library?
Also, it looks like the wireless module required 4 pins, leaving only 2 free on the digispark, not enough to drive a RGB led :(


You should be able to provide the CSN and and SCK signals from one pin on the digispark.  From the SCK line, connect a diode followed by a small capacitor (I'd try at least 330pF) going to a transistor gate.  Us a pullup resistor to pull the CSN line of the nRF high, with the transistor pulling it low when it is on.  Before sending the SPI command, put the SCK pin in output mode high for a few microseconds to charge the capacitor and thereby pull CSN low.  Then change the pin for SCK out, and send the SPI command.  The SCK clock will keep the capacitor charged for the duration of the command.  After the clock stops the transistor gate leakage will discharge the capacitor, turn off the transistor, and then the CSN line will go high.  It would be best to do the RC calculation based on the transistor gate leakage rather than my off-the-cuff guess of at least 330pF.  I've attached a (very rough) circuit diagram.

Another cheap wireless option is 433Mhz.  I've seen 10 xmit/receive pairs selling for $20 on aliexpress.  Only 1 pin required for tx and one for rx (or you could even multiplex tx/rx with a couple of diodes).  They supposedly work with the virtualwire library.

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Wireless on Digispark?
« Reply #6 on: August 12, 2013, 11:00:02 am »
@CBcracker - any interest in testing this CSN/SCK from one pin idea? I'd be happy to send you some parts and Digispark if you're willing to test it out and share the results (it could have some great implications for an (original) Digispark shield) - if you're interested drop me an email support@digistump.com

CBcracker

  • Jr. Member
  • **
  • Posts: 80
Re: Wireless on Digispark?
« Reply #7 on: August 12, 2013, 11:21:35 pm »
@CBcracker - any interest in testing this CSN/SCK from one pin idea? I'd be happy to send you some parts and Digispark if you're willing to test it out and share the results (it could have some great implications for an (original) Digispark shield) - if you're interested drop me an email support@digistump.com
Sure! I already have a digispark on order, but a second would be great.  I considered buying two in case I blow the first one up; modern electronics are much more fragile than when I first got into it.  Back then you were more likely to burn yourself touching an overdriven component than you were to burn out the component itself.  The first day I was playing with my pro mini clone I fried it by connecting 12v to vbus instead of the vraw (regulated) pin!
I'll drop you an email shortly...

sketchy

  • Newbie
  • *
  • Posts: 1
Re: Wireless on Digispark?
« Reply #8 on: October 21, 2013, 12:39:55 pm »
How did this work out?  I wish to explore the DigiSpark + nRF as sensor nodes (w/ mesh network library).

martyn_w

  • Newbie
  • *
  • Posts: 5
Re: Wireless on Digispark?
« Reply #9 on: December 11, 2013, 01:28:16 am »
I'll drop you an email shortly...
Hi CBcracker, your idea sounds brilliant, I too would be very interested in hearing whether you got it working or not.  I'm wanting to get the nRF sending data from the digiusb, which uses 2 pins, so I really need to get the nRF working using just 4 pins or I'm stuck (see http://digistump.com/board/index.php/topic,1200.0.html).  Thanks.