Tuesday, August 30, 2016

NRF24L01+ PA LNA Power Consumption

NRF24L01+ with PA LNA Power Consumption




There is conflicting information about the power consumption of the NRF24L01+ PA LNA breakout boards. Perhaps some boards leave some circuitry powered on all the time even when the NRF24L01+ is sleeping while others do not. This little experiment was to determine current consumption for some of the radio's different states, especially during NRF and microprocessor sleep states, for the purpose of creating power budgets.

Setup was an Arduino Nano clone. 3.3VDC from an AMS1117 vreg to an NFR24L01+ PA LNA from Ebay (link). Meter was a UNI-T UT61E. TMRh20's RF24 library was used. 


Mode ... Current Consumption @ 3.3VDC

radio power up = 0.030 mA
radio power down = 0.00054 mA (0.54 µA)

stop listening = 0.031 mA
start listening = 20.7 mA
write (pa_max, 250kbps) = 140 mA


power on, no init, USB plugged into PC = 0.47 mA
power on, no init, atmega sleep, USB plugged into PC = .130 mA
power on, no init, USB plugged into charger = 0.43 mA
power on, no init, atmega sleep, USB plugged into charger = .06 mA

Sunday, August 21, 2016

Slow Moteino

2.7V BOD/8Mhz Int Oscl Moteino Variant
Put in the Moteino boards.txt
The "extended_fuses" has been changed from 0xFD to 0x05 because the USBASP throws an error when burning the bootloader.

Moteino2.name=Moteino2
Moteino2.upload.protocol=arduino
Moteino2.upload.tool=avrdude
Moteino2.upload.maximum_size=31744
Moteino2.upload.maximum_data_size=2048
Moteino2.upload.speed=57600
Moteino2.bootloader.low_fuses=0xE2
Moteino2.bootloader.high_fuses=0xDC
Moteino2.bootloader.extended_fuses=0x05
Moteino2.bootloader.path=Moteino
Moteino2.bootloader.file=DualOptiboot_V5.0_atmega328_BlinkD9.hex
Moteino2.bootloader.unlock_bits=0x3F
Moteino2.bootloader.lock_bits=0x0F
Moteino2.bootloader.tool=avrdude
Moteino2.build.mcu=atmega328p
Moteino2.build.f_cpu=8000000L
Moteino2.build.core=arduino:arduino
Moteino2.build.board=AVR_ATmega328
Moteino2.build.variant=arduino:standard

Sunday, May 1, 2016

ATTiny Nano Programmer, Part 3

Assembly





The boards* are in and ready to be populated with the proper components listed on the BOM whatever i can find in my scrap bin. For the very first assembly, I'm using female headers on the Tiny board so i can easily remove it from the Arduino Nano in case something goes wrong.







So I've exhausted my supply of female headers so the first assembly looks a little lame. But it works. And since it works, one should know that this board has no voltage regulation and no polarity protection diodes of any sort. So be careful!

Programming

The ATTiny isn't supported out of the box by the Arduino IDE, but MIT's hi lo tech has a handy-dandy tutorial for adding the ATTiny support and programming it.

To program the ATTiny, the Nano first needs to be programmed to be an ISP. The RST cap on the Tiny board is disabled by 1) moving the jumper to the position closest the USB connector or 2) removing the jumper altogether. The ArduinoISP sketch can be uploaded and the RST cap moved back to enable programming the ATTiny.

A note on clock settings and fuses: If you want your ATTiny to run at a specific clock speed, select the desired frequency under Tools - Clock and then under Tools - Burn Bootloader which sets the approriate fuses. Once the fuses are set, you can upload your sketch. If you switch the clock speed without "burning the bootloader" and upload a sketch, your timings might be off, e.g. a 1 second delay is now 8 seconds or vice versa.

Features

The red LED is for the ArduinoISP heartbeat and is a breakout of the Nano's D9 pin. The green LED is an onboard LED for the ATTiny and connected to D3 (not D1), see bright green highlight. This LED can be disabled by the nearby jumper. There's a 3.3/5Vvoltage selection jumper (blue highlight) for when this guy is attached to the Nano. Again, there's no voltage regulation/protection apart from the Nano's.

 

Testing

Tested
  1. Digital IO/Analog outputs
  2. V+/V- connections
  3. LED/RST Jumpers
  4. RST button
Not Tested
  1. Analog inputs
  2. 3.3/5V jumpers
  3. VIN header

Files

EAGLE files, PDF's here.

BOM

2x   3mm LEDs
2x   220 Ohm Resistors
1x   10uF Capacitor, Radial
1x   Momentary Tactile Switch
1x   ATTINY85-DIP (Digi-Key
AE10011-ND)

---------
*I used OSH Park's new 2 Layer 2oz 0.8mm Service because I'd never used it before. The board is nice and thin, alignment and silk both look great as usual.

Friday, April 8, 2016

ATTiny Nano Programmer, Part 2

So layout went rather quickly on this one because it's pretty simple and I have too much fun doing this. Actually, the board is already on order with OSH Park.

I took some (read a lot of) design cues from Kevin Rye's ATTiny Programmer. Among other things, I liked the LED disable jumper, the IO breakout headers and the idea to create a programming board that one can also use in a project. I elaborated on the IO breakout by adding V+ and GND headers. Maybe it will be useful, maybe not. I also added a jumper to selected 3.3V or 5V and another to enable/disable the 10uF cap on the Nano's RST pin. There's also a dedicated RST switch for the ATTiny.

The overall profile mimics the Nano's with an extension opposite the USB connector on the Nano.

So here's the final design ...



And the schematic ...




Now I play the waiting game ... and discover where I screwed up. Which was ignoring a poorly placed via and at least one silkscreen mislabel. In the meantime, I've learned how to cover the vias with soldermask using Masks tab in the DRC. The final-er design is below.