#77 Forget buttons - use Infra Red! VS1838B first look

  Рет қаралды 6,324

Ralph S Bacon

Ralph S Bacon

Күн бұрын

Пікірлер: 53
@brucewoods9377
@brucewoods9377 7 жыл бұрын
Great video. As I am very NEW with Arduino I am finding your video series quite educational
@RalphBacon
@RalphBacon 7 жыл бұрын
Excellent, Bruce, that you're finding the videos helpful, as it is beginners that I'm aiming them at, mostly. If there are any areas that I have not covered don't be backward in coming forward and suggesting ideas - you never know, there may be a video idea on my backlog that you could influence in being made sooner! Thanks for the feedback, it's good to know the videos are useful.
@omaoda4462
@omaoda4462 7 жыл бұрын
I really enjoy and love ur videos. Awesome lerning and very relaxing at the same time, as well as well dokumentation. Top. Keep doing it! Thank u Ralph
@RalphBacon
@RalphBacon 7 жыл бұрын
I'm very glad you like my videos, Oma, and thank you for telling me that! The fact you learn something along the way is great. I most certainly will keep doing it as long as I have an audience!
@artbecker5618
@artbecker5618 7 жыл бұрын
It's a lot of fun breadboarding the iR receivers that you have and testing all the iR transmitters, using a basic Arduino sketch. Label the transmitters with what type they are (most will probably be NEC). A free and easy way to test your iR transmitters is with a smartphone camera, or webcam. iR shows up as visible light in the viewing screen. I was quickly able to determine why one remote wouldn't do anything when I pressed the VOL- key. Viewing the transmitter through a smartphone camera display showed that all the buttons except that one worked OK. Bonus: no need to swap the battery first to see if that's why the remote doesn't work. Thank you for another great video, Ralph.
@RalphBacon
@RalphBacon 7 жыл бұрын
That's a great tip, Art, and a nice piece of lateral thinking on diagnosing malfunctioning remote controllers. When my TV remote plays up I just give a good smack and it starts working again but perhaps I should be following your example and be a bit more scientific about the whole thing! And cleaning out the stale crisps, peanuts and general detritus that seems to accumulate behind the rubber keys would probably be good too. Thanks for posting that tip, I'm sure others will read it and learn from it too.
@artbecker5618
@artbecker5618 7 жыл бұрын
Talk of iR reminds me of the fun we used to have hacking universal TV remotes, 10 to 15 years ago. If the remote had a 6 pin connector (2x3) visible when you took off the battery cover, you were golden. If there were just 6 holes (2x3) you could solder in a connector, but also had to solder in a 24C16 EEPROM (don't panic, as they are 10/$1 with free shipping from AliExpress). Rather than needing a separate cheap remote for each Arduino iR project you are building, from Ralph's video, you can control all your iR Arduinos (Ralphuinos) from a single controller (possibly as well as your TV, etc, or maybe even Alexa skills). Keep in mind that the remotes mentioned are obsolete, meaning don't expect newer remote codes to be programmed into them. However, that's what the 6 pin connector lets you do, via free PC software. You take any existing listing (TV, DVD, etc.) from the universal remote, and reprogram it to whatever you want. At least in theory. I remember the popular URC-6161, Radio Shack 15-1994 & some Cinema 7 universal remotes as being easy to hack. However, do not rush right out to buy one without determining that they will still work for whatever you want. Lots of them are still available on eBay and even Amazon, with lots of complaints that they don't work on newer stuff. Well, that's where the hacking comes in. Start with this 2003 article from Nuts & Volts www.hifi-remote.com/nuts-volts.shtml then check out www.hifi-remote.com/jp1/ One key concept to understand is "punch-through device." On the universal remote, or through the JP1 software, you select one device to control volume, no matter which other device you are using. That means the TV can still control volume, even while you are using the DVD player functions. Final warning: I haven't done this for over a decade, and I have no idea if it still even works. You get the fun of figuring it out. Plus I am not going to answer questions -- use Google search, where you will find plenty of information.
@RalphBacon
@RalphBacon 7 жыл бұрын
Fascinating stuff, Art, I can feel you retrieving this from the memory archives. But there is an easier (dare I say simpler) method to create a universal remote. The library I use here (IRRemote) will transmit whatever you want on whatever protocol you want too. So if you have a Sony TV but an LG digibox you can just tell the library to transmit the correct manufacturer's code with the value (Hex code) you have determined to turn up the volume (or whatever). Some sort of membrane 12-digit pad (or an old remote you have repurposed) could then provide the keys to trigger the output. Do you want to read a funny story? Let me begin. Back on the 1980s I rented a colour TV. At the time it was all very new as it also had teletext (en.wikipedia.org/wiki/Teletext_systems). Basically you could scroll through umpteen simple text pages of news, sport and most importantly TV channel listings. A precursor to the web, maybe? One Tuesday I noticed that the teletext pages were just scrolling in a frenzy without stopping on each page allowing me to read it. They just scrolled and scrolled. Too quickly to read. Next day all OK. Until the following week when the bizarre behaviour repeated. I phoned the rental company who came and looked at it the following day - all OK. They agreed to come back the following Tuesday and could not believe their eyes as they saw page after page whiz across the screen as though you were sitting on the TV remote pressing "Next page" every 1/10th of a second. They could not diagnose the fault. Every Tuesday the system went bezerk. All other days it was fine. Finally they attributed the fault to my close location to the airport, as they might be testing some new fangled radar or something. Hmph. Likely story. Anyway, they replaced my lovely TV with an even newer model and the problem never reappeared. Nor did they ever come back to me with a proper explanation of that problem. That's the story. Stranger things happen at sea, but not much stranger.
@artbecker5618
@artbecker5618 7 жыл бұрын
My two part funny story involves the first telephone company ADSL line I had installed at my house. Every night at 6 p.m. it would shut down until sunrise. I tracked the problem down to the motion-sensor security light above my neighbor's garage door. When it powered on, even in stand-by mode, after daylight went away, it had so much RFI that it overpowered my DSL line, maybe 30 feet away. I bought a new motion detector light, installed it for him, and that problem went away. I had other problems with the DSL line, and the phone company finally sent someone out. He tested the line, found problems, and called the central office and had them switch my service to a different wire pair. When he connected his test equipment to the new pair, my DSL service didn't work at all. He was ready to call the central office back to have my connection returned to the original configuration, when he remembered that he sill had the test equipment attached. Once he took it off, the new connection worked great. So, I came "that close" to having the fix un-fixed. As for your suggestion of whacking your TV remote when it misbehaved, believe it or not, that was the official IBM fix for their original PC keyboard, if it had problems. My similar theory for fixing things is that if the fix doesn't work, then get a bigger hammer. I've had keyboard problems with spills, and it is easy enough to pop the keytops off, and clean out the gunk with q-tips and alcohol. The only warning is to never remove the space bar, as it often takes special equipment to install it. One quick fix that often works with TV remotes is to take off the battery cover, and use your thumb to roll the batteries around a little bit. That can remove whatever minor tarnish that is causing extra resistance in the circuit. This trick can work a few times before you have to finally replace the batteries for real.
@RalphBacon
@RalphBacon 7 жыл бұрын
Art, rolling the remote batteries comes as second nature to me now (and every time I think: I will have to clean up those contacts tomorrow morning. Next morning comes, forgotten all about it. Wash, rinse, repeat). Your ADSL problem and neighbour's light is weird but logical. My TV rolling text pages was never resolved. Perhaps the airport *was* testing some interesting radar stuff but then you would have thought other TVs in the area would have been affected on Tuesday nights! Talking of washing and keyboards, I've washed (under running, softened water) many a keyboard that has stuff all over and in it, including getting a washing up brush (and liquid) right into the keys to remove all the gunk. OK, I'm not immersing it or anything, and not deliberately soaking it, but there is a fair amount of water there. Drain it off, leave in airing cupboard (or somewhere *really* warm) for a couple of days and ensure there is absolutely no water or dampness left lying around. Guess what? 100% success rate, so far! I'm not recommending this, just mentioning it in passing on the basis that if I ruin my yukky keyboard then I will have to buy another. The things we do...
@juanherrero911
@juanherrero911 7 жыл бұрын
Great video Ralph. Yes, you'll find the NEC is the most common protocol, specially in no name kit. Its 32 bit packet is structured as: 1 byte device address, 1 byte inverse of that address as checksum, 1 byte command and 1 byte inverse of the command acting as checksum too. In projects I just compare or switch on the numerical command value if the address matches. Thanks to you an the other viewer for the heads up of the MOSFET, will order some.
@RalphBacon
@RalphBacon 7 жыл бұрын
Sounds like you are ahead of the game here, Juan, so thanks for that info on the NEC protocol. And I'm glad the the info about those MoSFETs is being put to good use. Good to hear from you.
@casholsen5848
@casholsen5848 7 жыл бұрын
Not too take away from the IR subject but the function is not necessary to update the RTC clock. Arduino Processing can be queried for the system time through the serial monitor to update the RTC in your project.
@RalphBacon
@RalphBacon 7 жыл бұрын
Hi Cash! Indeed the Arduino can query via the Serial Monitor but only when it's connected, of course. What do I do when the project is running in my bee hive, for example, and I don't want to connect it to my PC to update the time (or get stung)? But good to remind us that there is always more than one way to do things so thanks for posting, appreciated.
@ste76539
@ste76539 5 жыл бұрын
I got mine from an old broken DVD player, and another from an old laptop. Both work a treat with Arduino once I'd figured out which pin was which.
@RalphBacon
@RalphBacon 5 жыл бұрын
Excellent, and eco-friendly too, repurposing that old component, well done.
@Roy_Tellason
@Roy_Tellason 4 жыл бұрын
I have a similar module, not marked as yours, which came as a part of that "37 sensors" assortment I got from Banggood a while back. It appears to be the identical part on the board, not quite mounted straight. :-) Another source for such parts is scrapping a vCR, I'm sure that I have a number of these from doing that. I can think of a few uses for such a device, along with the IR emitter (LED) that came as a part of that assortment, and which can also be salvaged from a lot of places. For example, to read the codes that a given remote is putting out, then you can emulate it with an IR LED. We have a situation with one dish receiver in a room with a TV, and there's another room that I'm going to be setting up as an office, which will also have a TV in it. Having both connected to the dish receiver by way of a splitter (or using different outputs) I can fool the remote receiver on the dish box into doing what I want from another room. Also, I've occasionally had trouble with remotes, one died on me and getting a "universal" unit to work was a bit of a pain. Or, sometimes the buttons can get a little wonky. If you record the codes, it's easy enough to fake them with something else...
@RalphBacon
@RalphBacon 4 жыл бұрын
IR can be such fun, both to read and emulate. My TV remote died last week. I'm still struggling to get it apart, even though I did it with the previous version no problem. Some Sony remotes send the code three times (just to be sure?). Good luck with your new home office, now that we are all working from home (ie watching KZbin) your dish will be at your beck and call!
@michaelstevens630
@michaelstevens630 7 жыл бұрын
Hi Ralph as we know Philips RC5 and RC6 use an IR sensor frequency of 36KHz. I did a published project with a friend in Brisbane using Sony SIRCS to control a home designed eight channel video and audio switcher with preview before TX. Worked very well, apart from us trying to find a common code page (I believe these are called) from cheap universal remotes. These you key in what you want it to be from a large sheet of supplied paper. We kept both coming up with different HEX values for keys. So really how universal are these cheap £1 handsets... So I think you are on the right track of using a cheap specified small remote to enable IR Control of projects. Hope Benny is also well, not seen him in your videos for a while. Keep up your nice educational videos for us.
@RalphBacon
@RalphBacon 7 жыл бұрын
Now if you had been paying *close* attention, Michael, you would have *heard* Benny a couple of times in this video but I just kept going before he made me read out all the spec sheet details line by line! He says he definitely wants a cameo in the next video though. Yes, these cheap IR controllers could find a place in many projects, I'll certainly demo one when it's been done here. Thanks for that background info on your experiences; for our Arduino purposes I don't suppose we care what hex code is generated for what key as long as it remains constant. Thanks for your post, good to hear from you and Benny says hi too.
@grahamwise5719
@grahamwise5719 7 жыл бұрын
I have a GPS module on the roof and a RS485 serial that goes in to a serial port on an arduino and Nixie clock. You have to do the summertime as GPS is UTC that doesn't change.
@grahamwise5719
@grahamwise5719 7 жыл бұрын
it was done a coule years ago, a DS1307 looses about 20 seconds a day, I update at midnight as the rtc day count changes, keep an old count and just read the RTC and test if a new day. then if have valid GPS then udate the RTC. If the RTC was fast it will happen in the next loop. Used RTClib, Time, TinyGPS++. ........ DateTime now = rtc.now(); //RTC Midnight past? save rain and min max temperatures //this can enter multiple times at midnight depending on drift of RTC if (now.dayOfTheWeek() != Yesterday) { //update GPS to RTC. //depening on RTC drift may be two goes. if (gps.date.isValid() && (gps.time.isValid())) { Serial.print("GPS update"); // January 21, 2014 at 3am you would call: // rtc.adjust(DateTime(2014, 1, 21, 3, 0, 0)); rtc.adjust(DateTime(gps.date.year(), gps.date.month(), gps.date.day(), gps.time.hour(), gps.time.minute(), gps.time.second())); Serial.println(F("###################")); } .... Summertime use European Daylight Savings Time calculation by "jurs", to test if is some time, this can have time zones. to calculate the day from the date, use ....//function to return date and time string int Fdow(int y, int m, int d) { unsigned int dayInt = pgm_read_word_near(daySet + m - 1); //static int t[] = {0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4}; y -= m < 3; //return (y + y/4 - y/100 + y/400 + t[m-1] + d) % 7; return (y + y / 4 - y / 100 + y / 400 + dayInt + d) % 7; }.....
@roberteliassen5020
@roberteliassen5020 7 жыл бұрын
Graham, I have a GPS on the roof as well and it feeds my NTP server with PPS. It's only a cheap NEO-6M, but the accuracy is quite good. In the ballpark of 50 us.
@RalphBacon
@RalphBacon 7 жыл бұрын
A great solution you have there Graham, just the sort of thing I'm interested in. Although I think you'd find that if you replaced that DS1307 with a DS3231 it would lose next to nothing each day. That said, as you're updating it daily anyway it makes no difference! Thanks for sharing this. very interesting.
@RalphBacon
@RalphBacon 7 жыл бұрын
And interestingly, Robert, my cheap NEO-6M has arrived and I will be testing it soon for the same purpose, as you probably know if you watched my Ublox video. And here's me thinking I was being in some small way unique... nothing new under the sun, that's for sure.
@roberteliassen5020
@roberteliassen5020 7 жыл бұрын
It's easy to get the time and date from a NEO-6M, but it's quite a challenge to take the PPS (Pulse Per Second) and make it into something useful. It goes from low to high at the start of a second and that transition is accurate to a few microseconds. In theory, and with expensive GPSes, the PPS accuracy is down to nanoseconds. And by the way, the time from the serial port (NMEA) can be off by half a second or even more of you use slow speed. One persons 'awful' may be another persons 'awesome'... One second accuracy could be 'excellent' compared to an RTC which drifts 20 seconds a day. The problem is the jitter. One second would be fine if it was one second all the time. Time from NMEA is notorious unpredictable because you cannot tell exactly when the NMEA sentence was received. Or rather, the time of transmission is unknown/unpredictable within a second.
@willofirony
@willofirony 7 жыл бұрын
I had just (yesterday) ordered one of these IR kits. It was for a slightly different purpose: a DVR R/C which has one of those annoying "rocking cross switches" for up, down etc. This switch doesn't have bounce prevention and a non-positive switching action. So, I was going to use the kit to bypass the errant R/C. I admire the way you can simplify a problem that could so easily end up complex, going down the rabbit hole of elegance creep and over egging the pudding. I had considered the accurate update of an RTC; even thinking along the lines of having the fastest cpu in the time capture system one had concocted to decipher the time (be it UTC or Unix) into BCD. This was so that the device receiving the time would just pump these bcd bytes up the I2C bus to the RTC chip, thus ensuring the millisecond accuracy of the RTC. An excellent example of creeping elegance. You, on the other hand, simply looks at the clock and presses the buttons on a remote control. Sublime! Oh! wait, did the Sublime text editor come up with the solution for you??
@willofirony
@willofirony 7 жыл бұрын
Further to above: RTC aside, these kits could solve so many UI problems and leave a nice clean gadget as a result. Thanks for the heads up on the IRL44Ns. They were less than halve the lowest price on Ebay.
@RalphBacon
@RalphBacon 7 жыл бұрын
You're welcome, Michael on all counts, and thanks for the feedback (and puns). Spooky that you ordered the RC probably on the day I was editing that very video... And those MOSFETS are really a good price and performance. I should be asking the seller for commission! Thanks for posting, interesting to see how developers can sometimes stand back from a project and think "Stop! There must be an easier way!". Sublime indeed.
@roberteliassen5020
@roberteliassen5020 7 жыл бұрын
Thanks! Nice video indeed! And another English idiom added to my collection; "damning it with faint praise".
@RalphBacon
@RalphBacon 7 жыл бұрын
Thanks for your feedback Robert, good to hear you liked both the video and the English lesson too. You certainly get value-for-money on this channel, don't you think? Good to hear from you again.
@almecozzi9237
@almecozzi9237 4 жыл бұрын
I am using a Arduino UNO pin 7. The Demo.ino compiled and uploaded without errors. But there is a problem. The Serial Monitor (9600) continuously scrolls: "The function decode (&results)) is deprecated and may not work as expected! Just use decode() without any parameters." Making this change solved the continuously scrolling message but resulted in only 0's for each button press on the four remotes I tried. What is causing this? Al
@RalphBacon
@RalphBacon 4 жыл бұрын
It sounds like a library has been updated. I would look carefully at the examples in it to see how it now should be done (successfully). That's all I can suggest really. I can't even try this out as all my stuff is packed up ready for my house move.
@almecozzi9237
@almecozzi9237 4 жыл бұрын
@@RalphBacon You are right. The demo sketch in the examples works. All the other sketches that did not work were found by searching the Internet. I should have looked closer to home.
@aspectcarl
@aspectcarl 7 жыл бұрын
ah now this video has got me thinking, I want something close to this, I want to use an arduino with a touch screen to simplify the supplied remote control to my AV amplifier via IR
@RalphBacon
@RalphBacon 7 жыл бұрын
Touch screens are a bit different to IR, Carl, but I had a little success a year or so ago experimenting on this topic. I might have to resurrect that as it would be perhaps even better (no knobs or switches to clutter the panel but still give all the functionality). I shall add this idea to my backlog and see when I can complete it, thanks for posting and the nudge!
@MultiRdh
@MultiRdh 6 жыл бұрын
Can you make video on triac controlled by arduino using serial commands
@RalphBacon
@RalphBacon 6 жыл бұрын
"Triac" usually involves mains electricity, which I'm always a little wary of encouraging others to play with. What project did you have in mind? A dawn (sunrise) lamp alarm, perhaps?
@michaelbreslin9116
@michaelbreslin9116 6 жыл бұрын
Any chance you could do something similar but with RF plug, control from arduino? Thanks for your good videos. They've helped me a lot.
@RalphBacon
@RalphBacon 6 жыл бұрын
Well now, Michael, you could control a relay from either an Arduino with Ethernet shield or just use an ESP8266. First off, look at video #107, which is a rubbish product, but I've now rewritten the code for the ESP8266 and the phone app too which I'll publish in due course to make it work. However, if you want to control the relay from another Arduino (rather than your phone), then, as I say you'll either need to use an ESP8266, or an Ethernet module (see video #74) with an Arduino. Have a look at that video (and ignore how rubbish the product as-supplied is!) and see if this is the sort of thing you want to do. Thanks for the kind words and I'm glad the videos have helped you.
@michaelbreslin9116
@michaelbreslin9116 6 жыл бұрын
Thanks Ralph for reply. I'll check those out. It might sound odd, but I'm still trying to clarify what I actually want. Need to know what's feasable before I try and do it myself.
@KJW648
@KJW648 7 жыл бұрын
Info on the clear LED you receive with this kit ? Is it a IR transmit LED ?
@RalphBacon
@RalphBacon 7 жыл бұрын
Hello Kuk! Yes it is. In fact it comes with both receive (dark) and transmit (clear) LEDs. I didn't cover transmitting custom codes using that LED (I suppose that could be a "part 2", especially as I have a real need for such a project). The library that I used allows the LED to transmit codes so in the interim you can have a look to see whether there is an example sketch included with that library that does it. I'll add this to my list of things to do! Thanks for the post.
@willcalltickets
@willcalltickets 6 жыл бұрын
I am working on a project to reduce the number of remotes lying on my coffee table. Currently I have 4 and would like to whittle it down to two. I am using an old tv remote with plenty of function buttons as my second remote that will take the place of my current tv, soundbar and roku remote. The cable remote has too much functionality that I would rather not redo - at least until I feel confident with the new pending environment. My environment is RPI3 with node and I am able to read button press events from my "new" universal remote, but am having issues transmitting. At this point, I am not sure that the IR emitter is working properly. I am looking for recommendations on an actual part (and where to buy) as well as methods to determine if the emitter is emitting. I have tried detecting this with my iPhone 6 cameras (both front and back), but no luck. What other methods can I try? I know your environment is mostly Arduino - but thought I'd give it a shot. Maybe someone in your audience uses the same equip that I do. Thanks!
@myazemmour9843
@myazemmour9843 7 жыл бұрын
first comment first like you are the best
@RalphBacon
@RalphBacon 7 жыл бұрын
Thank you for your support! If you like what you see (and there are now over 75 videos) you might like to consider subscribing so you don't miss any future videos! Thanks for posting.
@myazemmour9843
@myazemmour9843 7 жыл бұрын
Ralph S Bacon yess i do subsc (y)
#76 MPU6050 3-Axis Accelerometer Gyro - First Look
18:27
Ralph S Bacon
Рет қаралды 21 М.
#81 eBay Goodies Update
16:28
Ralph S Bacon
Рет қаралды 4,1 М.
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
#79 IR Rain ☂️ Sensor, Soldering Irons (and more!)
15:57
Ralph S Bacon
Рет қаралды 4 М.
3 engineers race to design a PCB in 2 hours | Design Battle
11:50
Predictable Designs
Рет қаралды 566 М.
Bizzare Shifter
18:04
upir
Рет қаралды 449 М.
Build Your Own Drone Tracking Radar:  Part 1
20:08
Jon Kraft
Рет қаралды 623 М.
#65 Arduino EEPROM Basics - easy to do and useful to implement
26:07
#67 Vibration and other switches for your Arduino
34:57
Ralph S Bacon
Рет қаралды 7 М.
Experimenting with Buses and Three-State Logic
18:43
Sebastian Lague
Рет қаралды 630 М.
#49 MORE PINS PLEASE! PCF8574 Arduino Pin Extender (Easy)
27:45
Ralph S Bacon
Рет қаралды 50 М.
#257 Wireless Serial Comms⚡for your Arduino (or other μController)
29:40
Tuna 🍣 ​⁠@patrickzeinali ​⁠@ChefRush
00:48
albert_cancook
Рет қаралды 148 МЛН