ESP8266 Arduino Pro Micro 

I was looking everybody’s favorite online store for Atmega32u4 based MCUs for a friend and stumbled upon this little guy:

http://ebay.com.au/itm/191890522764

It sure as heck isn’t a 32u4 but it is rather interesting !

It looks like it’s an esp8266 module in the form factor of an arduino pro micro, I’m a bit put off by the $20~ price tag but it would be interesting to see if they have routed the pins to the corresponding ones as for the pro micro. 

Then you could use it as a drop in replacement without even having to change the code, except you would suddenly have the option to add wifi to your project! 
IoT is definitely getting much easier these days to implement than when this blog first started! Hahaha
No more fumbling around with an Arduino Uno with Ethernet and then little dodgy radios talking to other Unos with the same radio…..

Oh man that was hell 

hugometer

starting pitch

hugometer

an led bar graph, an arduino, and a bluetooth module. (RTC module too?)

the arduino scans for a bluetooth mac address (the mac of the phone belonging to the person the cuddleometer will respond to)

it will measure the time it is within proximity of that mac address and proportionately raise and lower the bar graph based on time since it sees the mac and time since is SAW the mac.

this allows it to “recharge” when you are with your significant other, and to “discharge” when you are away for them.

once the graph gets low, an additional led could flash indicating dangerously low cuddle gauge levels. and requesting a recharge.

this allows couples to keep track of the cuddle levels and ensure they always stay at a safe level.

additional thoughts

-gsm module to allow for e-cuddles
-wifi to allow proximity based cuddles / pausing cuddle drain when at home
-analog meter support for base station cuddle-o-meter
-a decided upon name
-a add on device that can be activated when a physical hug is engaged that speeds up the recharge process significantly

hardware

gsm – http://www.ebay.com.au/itm/251728140941
mcu – http://www.ebay.com.au/itm/371535922801
bar – http://www.ebay.com.au/itm/151775473664
led – http://www.ebay.com.au/itm/171371213386
wifi – http://www.ebay.com.au/itm/161849472764
btle – http://www.ebay.com.au/itm/191736126745
batt – http://www.ebay.com.au/itm/191547561905
usb – http://www.ebay.com.au/itm/172143472382
rtc – http://www.ebay.com.au/itm/131523900632

HamShield Motion Sensor

I am in need of a motion sensor for something, and I have this HamShield that I got from KickStarter recently.

 

heres some code I have mashed together that *MIGHT* make the radio send an SSTV image when motion is triggered..

 

I have to rest it and refine it first! its just mashed code from examples!

[su_expand more_text=”Code:” less_text=”Close Code.”]/* Morse Code Beacon Test beacon will transmit and wait 30 seconds. Beacon will check to see if the channel is clear before it will transmit. */ // Include the HamSheild #include #define PWM_PIN 3 #define RESET_PIN A3 #define SWITCH_PIN 2 // Create a new instance of our HamSheild class, called ‘radio’ HamShield radio; int calibrationTime = 30; boolean sensorActive = false; boolean previousSensorState = false; int pirPin = 4; //the digital pin connected to the PIR sensor’s output // Run our start up things here void setup() { // NOTE: if not using PWM out, it should be held low to avoid tx noise pinMode(PWM_PIN, OUTPUT); digitalWrite(PWM_PIN, LOW); pinMode(pirPin, INPUT); digitalWrite(pirPin, LOW); // prep the switch pinMode(SWITCH_PIN, INPUT_PULLUP); // set up the reset control pin pinMode(RESET_PIN, OUTPUT); digitalWrite(RESET_PIN, HIGH); // Set up the serial port at 9600 Baud Serial.begin(9600); // Send a quick serial string Serial.println(“HamShield FM Beacon Example Sketch”); // Query the HamShield for status information Serial.print(“Radio status: “); int result = radio.testConnection(); Serial.println(result,DEC); // Tell the HamShield to start up radio.initialize(); radio.setRfPower(0); // Configure the HamShield to transmit and recieve on 446.000MHz radio.frequency(145570); Serial.println(“Radio Configured.”); Serial.println(“Sensor Calibration in Progress”); Serial.println(“——————————“); for(int i = 0; i < calibrationTime; i++){ Serial.print(“.”); } Serial.println(“”); Serial.println(“Sensor Calibration Completed”); Serial.println(“Sensor Reading Active”); delay(50); sensorActive = false; previousSensorState = false; } void loop() { // takes the pin value and saves it to the sensorActive boolean value if(digitalRead(pirPin) == HIGH) { sensorActive = true; radio.setModeTransmit(); // Turn on the transmitter delay(250); // Wait a moment radio.SSTVTestPattern(MARTIN1); // send a MARTIN1 test pattern delay(250); radio.setModeReceive(); // Turn off the transmitter } if(digitalRead(pirPin) == LOW) { sensorActive = false; delay(250); } // performs action if the state of the sensor changes // since this is a loop, here is now it works: // if the sensor pin goes HIGH (on) after it being LOW (off), the sensorActive value changes from the previousSensorState value. // it then turns on the LED. when the pin goes LOW (off) it will do the same thing but opposite values. // it also prints status to serial. it will print the time of triggering by providing the number of seconds that have passed since the program started. if(sensorActive != previousSensorState) { if(sensorActive == true) { previousSensorState = sensorActive; Serial.println(“—“); Serial.print(“Motion Detected At: “); Serial.print(millis()/1000); Serial.println(” Seconds”); delay(50); } if(sensorActive == false) { previousSensorState = sensorActive; Serial.println(“—“); Serial.print(“Motion Stopped At: “); Serial.print(millis()/1000); Serial.println(” Seconds”); delay(50); } } } [/su_expand]

Potential idea for a reconfigurable, portable, HF antenna ?

So I just had an idea, see this:

Portable HF Antenna Idea

Maybe, just maybe, this would work.

you’ll need an antenna tuner because reasons, and probably extra strain relief, but think about it.

need a 10/20/40m antenna?
hook up two 10m cat5 lengths!

you could keep it in a bag, and go off camping or to a field day, forgot your cables?
no prob! head to a nearby electronics store and grab some ethernet of the length you need!

where the cat5 jacks connect to the pl-259, all wires are used in the cat5.

 

JUST DONT GO PLUGGING THE OTHER END INTO ANYTHING HAHAA

pfSense update

About a month ago, I set up pfSense on an old PC, and switched it to my main router around a week later once I had gotten the hang of it.

I turned our Asus DSL-N55u to bridge mode, and then pfSense was controlling the ADSL as well!
And with the Meraki MR18 handling WiFi, everything was taken care of.

now, Everything was running fine except a few things..

I have it set up with a squid cache, with max item cach size of 1gb. because it has a 500gb disk in it so I figured why not?

occasionallyyy, the i.imgur website will get weird errors and a few reloads are necessary ?
This seems to be remedied after a reboot of the cache, but im still not sure why it was doing this. maybe time sensitive cookies or something?

 

The other thing is this:
APPLE DEVICES ARE STUPID

I had my private DNS server in the list that DHCP hands out,
now one would expect as it isnt the ONLY DNS server that clients handle this just fine, so if they need to find testing.stupidurl they check them all, the public DNS say no, but mine says yes!

for the windows and android machines in the house this was very much the case.

 

but for the apple devices…. THEY KEPT *ONLY* SEARCHING MY DNS SERVER!
This meant that many actual websites and services kept reporting a DNS lookup error whenever people tried to use them.
Everybody in my house except me use apple devices so I have had to remove my DNS server, which has remedied the problem, and not too big a problem as I can just add it to my devices myself.. but still, why didn’t the apple devices query all the DNS servers and pick a working one ? =_=

The problem was consistent across Mac OS X, iOS 7, 8 on iPhones and iOS 8 on iPads….

 

Oh well… Heres a screenshot of pfSense for anybody interested:

pfsense

 

And one of the APs local page:
AP

Neopixels, ESP8266, NodeMCU and Arduino IDE

Hello everyone!

Another update on the ESP8266!

Recently, an Arduino compatible IDE was released for the ESP and I’m super keen to try it out. I’ll download it later today and give it a go, ideally I want the adafruit neopixel library to work as then I can connect my coaster to the internet!
More on that in a minute.

Yesterday two things arrived in the post, my 16 neopixel ring, and my NodeMCU dev board.

image

Both very exciting!
Maybe I can combine the two? 😉

image

The dev board is because ive had difficulty flashing the ESP chips in the past so I was hoping to have better luck with a breakout board with inbuilt USB TTL and a flash button. I did! It flashed the latest NodeMCU firmware right away!

image

Node MCU is an alternate firmware for the ESP that has a runtime for Lua 5.1.4 inbuilt! So this is the excuse I’ve needed to learn a bit of lua!

image

I’ll also be using this later with the Arduino IDE and I’ll make up an image for cross referencing pins.

The neopixel ring is to be used in my ongoing quest for the most amazing coaster ever.

It will make my drink disco!

I’ve had a prototype in the past using a single RGB LED, then another using a disc of them, and this one is a ring, but they’re addressable!

What I’m hoping to get is a sort of rainbow flowing effect happening.

Ive got the code at a good starting point, for effect testing.
All I did was modify the example sketch that goes through a bunch of possible modes 😀

I’m driving it from a digispark board, and in the final build it will use a 3.7v lipo for power.

image

The LED ring does seem extremely bright, and gets a little hot during normal operation so I better look at dimming the LEDs as I only need enough light to light up my drink! Not the room Hahaha

There’s a few different sized ones too. The one with 16 and the one with 60 LEDs cost the same! D: sadly I don’t need that many though it’s far too big for my purpose hahaa

Maybe I can find a use for 60… Hehehhhh..
Oh and they come in strips too and individual of course! And boards… THERES LOTS OF CHOICES OK?

Anyway,

That’s all for now, I’ll keep y’all posted!

Bonus: it sticks to the wall of the train lol

The eero Wireless thing

eero10

Just a little post to voice my opinion about the eero wireless device that surfaced overnight,

From what I have read about this device, it is a mesh networking device that is simple to use down to the point of needing almost no user interaction.

In fact, I believe they are claiming that after the initial setup there is no specific need for human interaction at all, it should take care of itself, including rebooting if the DSL/net drops out (straya m8) |

My first impression is that it looks like a poor mans Cisco Meraki,
which is what I use at home (one station, MR18)

I do feel they are going to have a hard time becoming popular though as they are asking a lot of money for them!
For the discounted pre-order price of the eero ($125 each or three for $299) you can already get a high end wireless router, and probably even a decent wireless repeater on top of that considering you would probably want more than one to take full advantage of the purpose of the device!

 

I would also like to note im a bit sceptical about its claim to be able to fix WiFi problems automatically, what if the DSL drops out?

It cant reset the DSL modem ?
The eero itself is just a router..

 

but oh well, I haven’t actually used the device.

I may send them an email about getting a unit to loan out and review properly.

DIY Project: Home Automation

Update: This project died when I got a job and can afford off the shelf automation stuff :’)

It might come back when I start adding stuff like blinds and air conditioning control!

 

This project is basically me wanting to be able to automate my house but not wanting to fork over heaps of money for pre made systems.

I’m a bit lazy with details so if there’s any questions you have please comment below!

Newer Update v2.5

Ok, so it just occured to me that I could have bent the antenna down flat so that I wouldn’t have had to make any holes….

 

image
As you can see its all in a box now because reasons plus annoying bright light

I got around to making a few changes, I’ll let the images do the talking for me:

image
Used spare LEDs to attach the fan, deal with it. Box had a USB 125khz RFID reader in it heh
image
Melted the hole for the antenna with soldering iron, then cleaned tip and sliced off excess plastic with stanley knife
image
single channel relay board now in use to save space
image
my god i did a crappy solder job on this one D:
image
dem pro cut outs
image
don’t tell me how crappy the fan cut out is. i know.
image
cables kept getting caught in the fan so i fixed them.
image
close-up of ParaShield with the fan header, and RF module shown.
image
the area that I cut out of the proto shield to fit it over the ethernet jack
image
used a resistor leg for GND to the RF module, now i can tap into GND from that line as well B)
image
blob of blue tack was used to hold things in place while i soldered
image
finally, a nice and snug fit, that looks not like shit! xD

 

A few notable things, white LED on ParaShield (I’m calling it that now) has been replaced with a less bright red one. Transmitter repositioned and wired a little nicer, Ethernet hole cut (Stanley knife, metal cutters and pliers).
Proper helical antenna added to both units, Rx unit now has single channel relay.
Also, I shoved it all in a box and added a 12v fan running off 5v from the ParaShield (may add fan controls/monitoring later) so nothing goes wrong with summertime here.
I’m just waiting for the other 433mhz things to add a manual light switch, and the infrared control unit. Codes all ready but need the RF receiver D:

.

Also, on the app side of things,
I added an all on/off section so when this projects complete, I’ll be able to stand out the front of my house, say something awesome, hit a button, and the whole house lights up or goes dark 😀 XD

image

image

New update V2
So I discovered this thing:
http://www.ebay.com.au/itm/291262467339

I remember reading about this a while ago but didn’t care for arduino or anything much then.
But now I’m looking at this and seeing
This+Relay+PSU = self contained without need for base controller!
Plus, did I mention ITS FOUR FREAKING DOLLARS
how could I NOT order two!

When they arrive I’ll have a play around see if I can figure out how to control them 🙂
Will post here when I do!
In other news: I ordered proper 433mhz antennas for the things, and found the PS move squigy ball.
Will get a box soon for it all haha,
I’m also preparing some LED strip on the front veranda to be controlled by my UI. And I’m developing an android app (will design a tablet version later)
Using Tasker app factory!
Early screenshot attached!

image
Other photos:

image
the two channel relay is sooo bigg D:

Newer update:
I found chunks of a broken PlayStation move controller, for now I’ve soldered some resistor legs to the rgb led breakout board, and have the rgb led on the base station for reasons,

Hopefully further down the track I’ll be able to turn on a mood light fading through, (although once it starts fading how do I stop it…?)

Or even notifications for things!

It also acts as a status light,
On sending an on command it flashes green twice, the off command has two red flashes.
An unused but implemented command gives three orange flashes.

I need to figure out how to flash an error if an unrecognized command is received…

Also I hope to find the sphere from the PS move. And to mount the led on the proto shield, maybe move the rf transmitter to make a cut out for the Ethernet jack,
And then try my luck at designing a special case for it all.
Either adapting an etherten case, or making a shitty one from scratch.
YouTube video showing on/off light
Signal light: http://youtu.be/ejXlYe17N8U

————————————————————-

New update: I got it working again 🙂
Not sure what was wrong but I rewrote the code and now it works hahaha

image

 

image

Its a bit slow probably because of the speed I have the radios set to, but oh well doesn’t matter.
I soldered everything together into a little clump, minimising wires, and made a shield for the transmitter so it sits neatly atop the etherten.

image

I’ll be able to add other things to the proto shield later 🙂

Also. Found a leostick under my bed but I’m having issues uploading code to it. Going to use it to make that light switch if I get it working 😀

LOOK AT ME I BROKE IT SOMEHOW
Went for a trip to jaycar and bought some supplies, and a smaller soldering iron
When I got home I took down the roof unit, attached shorter cables so it would fit in the little box, and put it back together,
But just my luck, it’s not working now!

I send commands but it doesn’t trigger the relay….

I’ll have to connect it and look at serial monitor to see if it’s getting the command

I’ll also add some code and an LED that blinks when it gets a command….
Oh, and maybe the code to light that emergency light if a pin goes low?

I should probably remove all the pin headers and solder right to the board actually…

Or to a proto shield….

The current state of the project consists of an arduino pro mini clone, that listens on the 433mhz band for a command, and turns on a relay depending on the command.

There is a Freetronics Etherten acting as base station, connected to my LAN, and a 433mhz transmitter, this responds to http requests by sending various commands to the ceiling unit.

Its easy to add additional remote units and set up controls for them, which I plan on doing  when I get blinds for my windows.

image

image

I also have a raspberry pi running Rasbian that listens for a button press, which is wired to our 20 year old retro doorbell, when the button is pushed the Pi sends a pushover notification to my phone/pebble, as well as plays a doorbell sound throughout the house  directly connected speakers.

I’m also going to be setting up Asterix or something on this to add Cisco VoIP phones around the house.

I have plans for an analog control panel too, that has physical buttons connected to an arduino, to send commands to the various other arduino around the house.

For example, a light control panel, push one button to send off commands to all lights in the house, or indivuaul etc.

I also will be adding a sensor to the mailbox, probably solar powered, that sends a command in to the house when mail goes in, either emailing me, maybe a photo?
Sending my pebble/phone a notification, or just lighting up an LED on the control panel to indicate new mail!

image