Nothing brings joy to a nerds heart like smashing two hobbies together and getting something amazing out. I do a bit of photography, mostly astro stuff with a telephoto lens. Not the best set up but you use what you can. If you want to take nice long exposures of deep sky objects you need a tracking mount to account for the earth's rotation otherwise you get star trails. Sometimes that's cool but if you want a pic of the Orion Nebula it's a pain.
Switching gears, I like stepper motors. As in REALLY like them. No idea why. A lot of my ideas feature them and these projects are the ones I think about a lot. So, the plan is to build a small car/ute trailer mounted computer controlled portable tracking observatory for my camera. Basically a pan/tilt stepper kit connected to a computer in order track stars and control the camera. The idea is that I could drive out to somewhere dark and clear and set this thing up in the back of the ute or on the roof and sit in the nice warm car and control everything from there. Maybe have some other gizmo to adjust the focal length of the lens and control a green laser mounted on the flash shoe to help me pin point an object. Oh the possibilities!!
In regards to my heat pump remote project, I've kinda stalled. Haven;t had much progress. Mostly trying to find a nice IR transmitter circuit for the arduino. /END MESSAGE
Showing posts with label Arduino. Show all posts
Showing posts with label Arduino. Show all posts
Monday, June 27, 2011
Wednesday, June 1, 2011
Decoding
Progress progress progress. Since my last post I received my order from Little Bird which contained the IR receiver. Time to start decoding IR signals. I've read the heater remotes tend to send large multi byte "Status Packets" which, rather sending a signal to increment or decrement the temperature, waits for the user to set a temperature and other settings then sends all the settings in one big lot. This is great for my project as it means I don't have to know what the heater is currently set to before I set a new temperature.
The down side of this is that any signals are going to be big fat things full of info. In order to cut my teeth on decoding IR signals I decided to have a crack at a TV remote. Fortunately I had access to a TV with a remote! Yay! So I plugged the IR receiver into my trusty Pickit 2 and fired up the logic analyser software and got to work.
Gibberish. IR gibberish. In my research I'd come to believe that most IR signals were sent with Manchester encoding which indicates 1's and 0's by a rising or falling edge. Seems simple enough. Until you try to decode it by eye. The problem I was having was that I didn't know how long a clock pulse was. This is a problem as the Manchester signals use 2 clock pulses per bit. Not knowing the boundaries of the bits made it tricky. I also didn't have an easy way of overlaying a grid to divide the bits using the clock pulses I didn't have. I could have used Gimp or Photoshop but I am unapologetically lazy. All in all this gave me a headache and many other things suddenly seemed more important and interesting than this project of mine.
Then one day a week or so later I was surfing the intertubes and came across a great blog post that showed the process a certain dude took when he was decoding IR signals. In his case a 1's and 0's were indicated by a short high pulse followed by either a long or short low. The high pulses marked the boundaries between bits and the lows indicated a 1 or 0. The "aha" moment came when I realised that his logic captures started low. When I was setting up the trigger for my logic analyser I had to set it to a falling edge as the signal from my receiver started high. I didn't even click. After that I took another look at my data and for the hell of it flipped the image in Gimp.
Holy crap! It looks almost exactly like the other guys data, a high preamble, high pulses and long/short lows! Woot! It all made sense now. The signal was not Manchester encoded, it was just upside down! Now it's so much easier to read. I haven't done any actual decoding yet, or set up a spreadsheet with all the signals in it, but it's on my list. I'll probably be ordering some more stuff from Little Bird soon to build a transmitter.
It may seem like an obvious mistake to some but that is the whole reason I'm doing this project! I don't know jack and want to learn in a practical way and have a cool gadget to play with at the end.
The down side of this is that any signals are going to be big fat things full of info. In order to cut my teeth on decoding IR signals I decided to have a crack at a TV remote. Fortunately I had access to a TV with a remote! Yay! So I plugged the IR receiver into my trusty Pickit 2 and fired up the logic analyser software and got to work.
First capture. Head scratching ensued |
Gibberish. IR gibberish. In my research I'd come to believe that most IR signals were sent with Manchester encoding which indicates 1's and 0's by a rising or falling edge. Seems simple enough. Until you try to decode it by eye. The problem I was having was that I didn't know how long a clock pulse was. This is a problem as the Manchester signals use 2 clock pulses per bit. Not knowing the boundaries of the bits made it tricky. I also didn't have an easy way of overlaying a grid to divide the bits using the clock pulses I didn't have. I could have used Gimp or Photoshop but I am unapologetically lazy. All in all this gave me a headache and many other things suddenly seemed more important and interesting than this project of mine.
Then one day a week or so later I was surfing the intertubes and came across a great blog post that showed the process a certain dude took when he was decoding IR signals. In his case a 1's and 0's were indicated by a short high pulse followed by either a long or short low. The high pulses marked the boundaries between bits and the lows indicated a 1 or 0. The "aha" moment came when I realised that his logic captures started low. When I was setting up the trigger for my logic analyser I had to set it to a falling edge as the signal from my receiver started high. I didn't even click. After that I took another look at my data and for the hell of it flipped the image in Gimp.
Victory! |
Holy crap! It looks almost exactly like the other guys data, a high preamble, high pulses and long/short lows! Woot! It all made sense now. The signal was not Manchester encoded, it was just upside down! Now it's so much easier to read. I haven't done any actual decoding yet, or set up a spreadsheet with all the signals in it, but it's on my list. I'll probably be ordering some more stuff from Little Bird soon to build a transmitter.
It may seem like an obvious mistake to some but that is the whole reason I'm doing this project! I don't know jack and want to learn in a practical way and have a cool gadget to play with at the end.
Wednesday, May 11, 2011
My first project
So basically I'm a nerd with a whole bunch of undeveloped interests, electronics, programming, digital art, photography, astronomy, bull riding and moon walking. Well maybe not the last two. What I need is a project that will motivate me to actually start learning the deeper parts of some of these interests.
To that end I have come up with an idea hat will allow me to at least cover some of the electronicy parts.
My flat has a Daikin heat pump, and for no reason at all I thought it would be cool to build a web based remote control for it so that I can control it via a web page on my phone and also get some basic info about the room, temp, light levels and random things like that. It will be a micro controller hooked up to a router and communicates with the heat pump via IR.
The first thing I'm going to have to do is figure out how to build and IR receiver so that I can begin to reverse engineer the IR protocol that the remote uses. I'm assuming that it uses a 38khz carrier wave with manchester encoding as every other website about IR signal decoding says this is what they use. I hope the assumption is correct as I've ordered that parts accordingly.
I will be prototyping everything on the Arduino as it's easy to use and I can be very lazy as a lot of other people have been very hard at work writing libs and schematics for me to leech off of. Eventually I want to run it all using a PIC but all in good time. Hopefully more pictures to come.
Things I need to learn/do:
To that end I have come up with an idea hat will allow me to at least cover some of the electronicy parts.
My flat has a Daikin heat pump, and for no reason at all I thought it would be cool to build a web based remote control for it so that I can control it via a web page on my phone and also get some basic info about the room, temp, light levels and random things like that. It will be a micro controller hooked up to a router and communicates with the heat pump via IR.
The first thing I'm going to have to do is figure out how to build and IR receiver so that I can begin to reverse engineer the IR protocol that the remote uses. I'm assuming that it uses a 38khz carrier wave with manchester encoding as every other website about IR signal decoding says this is what they use. I hope the assumption is correct as I've ordered that parts accordingly.
I will be prototyping everything on the Arduino as it's easy to use and I can be very lazy as a lot of other people have been very hard at work writing libs and schematics for me to leech off of. Eventually I want to run it all using a PIC but all in good time. Hopefully more pictures to come.
Things I need to learn/do:
- Learn to decode IR
- Map Daikin remote protocol
- Learn how to make an IR transmitter
- Transmit working IR codes
- Learn how to connect an Arduino to the intertubes
- Learn php or java or whatever and make a website for the arduino to connect to
- Learn how to optimise a website for cell phones
Subscribe to:
Posts (Atom)