-
Interface & data logging
08/20/2014 at 05:37 • 0 commentsThe interface is now hooked up! I also got data logging working for humidity & temperature - something I was not expecting to get done by the Aug 20th deadline. I also rewrote large parts of the node.js app to make it way more reliable.
I did some simple range tests & am very impressed. With the spoke at one end of my house and the hub at the other, there are very few packets that fail - meanwhile, my wifi signal struggles to reach that far.
-
User interface
08/18/2014 at 06:02 • 0 commentsI've finished the first mock of the web-based user interface. I used font-awesome for the icons.
-
We have data link!
08/17/2014 at 22:53 • 0 commentsI now have firmware for both the hub and spoke. The hub can tell the spoke to power on the AC (which it does!) or ask the spoke for a status report. Right now, this report only includes the current humidity. This is a landmark, though. I have the air conditioner being controlled over a radio link. Yay!
-
NRF24 radio lessons learned
08/16/2014 at 21:11 • 0 commentsI finally have ping firmware running on the hub & spoke breadboards that can talk to each other. This was a painful process. I ended up having to refer to a third party library for a couple gotchas but the core of the pain was missing that I had typo'd one operating to be a register WRITE than a register READ.
The IR LED for the spoke is on pin 5 (OC2B). OC2A is pin 17 (MISO). I found that whenever I had the timer set up, the SPI hardware would always read a low on MISO (verified this with a logic analyzer) - even if I had cleared COM2A0:1 "OC2A set to normal operation". Resolved this by basically cleaning up *all* timer code once the IR is sent. In a future, I'll move the IR LED off this timer - maybe to OC0A (pin 12). I wish I knew why this was happening, though.
EDIT: I actually found a forum post that describes exactly the behaviour I am seeing, but on ATxMega32E5. Atmel told this person that it is a hardware flaw in the device. I'm unsure if the same truth applies to my situation, but the symptoms are identical.
-
Power snafu
08/15/2014 at 05:22 • 0 commentsI realized I put a LM3490 3.3v LDO on the board rather than a LM3940. The 3490 is a smaller SOT-23 device delivering 100ma of current. The 3940 is a SOT-223 device delivering up to 1a. I'll have to figure out a way of putting the larger regulator on the spoke board (maybe using header pins as stilts?).
Luckily, the hub board hasn't been sent to the fab house yet. And it looks like it's time for rev 2 of the spoke board.
-
rev1 again
08/12/2014 at 01:01 • 0 commentsSince rev1 never even went to the fab house, I ... revised it.
* Dropped the ATM2501 EEPROM from the spoke schematic
* Using a real regulator IC rather than a divider for the radio power
* Using a resistor array for the status LEDs and IR LED
In other news, I have submitted to Oshpark!
-
rev1 spoke pcb!
08/11/2014 at 05:51 • 0 commentsI have completed the first revision of the PCB for the Spoke. I switched a lot of pins along the way in order to simplify routing - I need to update my breadboard version, confirm it all works, then submit this to Oshpark!
-
Codin'
08/10/2014 at 16:52 • 0 commentsI've started serious work on the code for the Spoke. Currently "done", and on Github.
* SPI framework
* AT25M01 SPI EEPROM
* DHT11 temp/humidity sensor
* Serial IO for debugging
Today, my aim is to get IR Output working. This will involve using one of the AVR timers in CTC mode to generate the 38khz carrier wave, then modulating that.
Remaining drivers to be written are for the NRF24L01+ radios and the ENC28J60 ethernet interface. I've saved the hardest for last.
UPDATE:
I got IR send working. I spent most of the time trying to get the CTC mode of Timer2 working - I didn't realize that even if you're outputting to OC2B, you still set the overflow value in OCR2A.
Also wrote some test functions that will be optimized out if they're not used.
Here's the implementation: https://github.com/rixth/aurai/blob/cef81dd1febec0986922c590f0a62e921f61ded1/firmware/spoke/src/IRSend.cpp
-
Schematic Bits
08/07/2014 at 02:24 • 0 commentsNow that I've started drawing the schematics for the receiver, I've noticed that I don't have parts for all of them. It seems like I'll have to make a part for the AT25M01 EEPROM. The initial rev of the schematic is also going to use a female header socket for the DHT-11, and 5x2 pins to connect to the NRF24L01 radio.
I've never made parts in EAGLE before, but it seems like Sparkfun have a pretty good tutorial.
-
Breadboard rebuild
08/06/2014 at 22:35 • 0 commentsI tore down the breadboard today and rebuilt on smaller 30 row units. I also got an order of ATMega328Ps today too so I prototyped the controller board too (which really, it just the AVR + radio + eeprom).
Didn't hook up the ethernet breakout yet - this part of the project really worries me because it's not the oft-used Wiznet chipset, documentation for this one is a little thinner.
I'm starting on the schematics. Follow along on Github.