Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

For general Flowcode discussion that does not belong in the other sections.
chipfryer27
Valued Contributor
Posts: 2090
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 465 times
Been thanked: 695 times

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Post by chipfryer27 »

Hi

How do you know you are actually transmitting valid signals for your receiver to receive?

Have you tried just testing the display itself, perhaps just displaying 8888 or the like?

Regards

ELECTRONICA67
Posts: 232
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 40 times
Been thanked: 11 times

Flowcode v11 Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Post by ELECTRONICA67 »

Hi

Yes... I assigned a fixed value to the variable—`Lectura = 12`—regardless of whether data was actually received, just to test the display hardware. Then, I tested the RC5 in a loop: if it received any data, it would turn on LED A2. This way, I could test both components simultaneously and individually; however, neither worked in either case.

Saludos

chipfryer27
Valued Contributor
Posts: 2090
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 465 times
Been thanked: 695 times

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Post by chipfryer27 »

Hi

Without an analyser or scope testing is a little more tricky and will need to be done a step at a time.

I see you are using a PIC 16F1847 set for a 4mHz external crystal, and I see you have both Program Memory Code Protection (CP) and Data Memory Code Protection (CPD) enabled. This will mean you will need to bulk erase the chip to make any changes. I only enable when I'm sure my coding is complete.

The 1847 can run on an internal oscillator very reliably which would perhaps free up pins.

In your post above, you say that neither the LED or display works as expected with the IR receiver, so what I would do to check is the following.

1) Flash-test. Create a simple loop that switches the LED on / off every second. Many examples in the forum. This, although a very simple and basic test is probably the most useful one to ever do as it proves your oscillator is set correctly which is extremely important. It also proves connections.

2) Once you can flash the LED successfully I would test the 4-digit display. After you loop your LED a few times perhaps then move on to include code to set each digit to "8". Just have it display the digits, don't have it switching off or anything. Just display the digits and keep them active. This checks that connections are correct including power to the display and that the data / clock signals haven't been reversed or such like.

Once you can do the above I would then move on to the IR receiver, but lets see how you get on with the above first.

Incidentally a quick test you can usually do to check if an IR transmitter is transmitting is to look at it with a digital camera (e.g. your phone camera) whilst it is transmitting. You will usually see a bright light from the transmitter when active. Note that this does depend on your camera and can only tell if it is transmitting, not what it is transmitting.

Regards

ELECTRONICA67
Posts: 232
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 40 times
Been thanked: 11 times

Flowcode v11 Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Post by ELECTRONICA67 »

Hi,

In fact, this circuit does much more than that and works correctly; these components are an addition to the circuit. I tried getting them to work by adding them, but since they didn't respond, I separated them from the main assembly. I want to get them working first so I can add them with the confidence that they function properly. I am keeping the PIC configuration the same so the components operate in the same environment. I think verifying that the components work individually is the best approach; once that is achieved, I can add them to the system. If they don't work then, I would suspect a timer conflict or some other issue, but at least I would be certain that the components themselves are working correctly.

I also performed the tests mentioned in points 1 and 2, and I ran the cell phone camera test as well; the IR LED is indeed transmitting a signal, but—as you said—I have no way of seeing it.

I find the macros for the RC5 and TM1637 4-digit display components quite simple to use; they don't require C code and should work with a basic example.

Is there any way someone from the MATRIX team could verify that these components work with the Microchip family—ideally with the specific PICs I'm using? If it turns out to be a bug, I could spend a year trying to get them to work without success.

or if you send me corrected files, I can run the tests myself without any issues.

I would appreciate it if you could take a look and help me out. If the error is on my end, I apologize, but if it is a bug, you would save me from wasting time trying to make them work when it simply isn't possible.

Best Regards and Thanks
Enrique

chipfryer27
Valued Contributor
Posts: 2090
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 465 times
Been thanked: 695 times

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Post by chipfryer27 »

Hi

I might have a display somewhere in my Evil Lab. If so I will check with a PIC.

Won't be until later tomorrow or Monday though.

Regards

chipfryer27
Valued Contributor
Posts: 2090
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 465 times
Been thanked: 695 times

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Post by chipfryer27 »

Hi

According to amazon orders I should have one of the modules. Where though is another story...:)

I'll update once / if I find it.

Regards

ELECTRONICA67
Posts: 232
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 40 times
Been thanked: 11 times

Flowcode v11 Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Post by ELECTRONICA67 »

hI,

I appreciate the help; count on me to assist in any way I can to save you trouble and expense, Speaking of components, I have some materials on hand, and I have PCBs ready for testing.

Thanks

chipfryer27
Valued Contributor
Posts: 2090
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 465 times
Been thanked: 695 times

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Post by chipfryer27 »

Hi

Fairly certain I don't have your 8-bit PIC but I have many others and they pretty much work the same, so if the display works for me should work for you too. Can't test the IR receiver though as I don't have one.

Quite glad I got involved as I had forgotten I had one of those displays. Quite a handy little module to display time as a countdown.

Regards

ELECTRONICA67
Posts: 232
Joined: Wed Dec 02, 2020 3:59 pm
Has thanked: 40 times
Been thanked: 11 times

Flowcode v11 Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Post by ELECTRONICA67 »

Hi,

I felt the same way; I needed to keep a count, and an LCD display consumed too much power, whereas the TM1637 4-digit 7-segment display was more suitable and looked better. I liked its appearance and chose this component—plus, it was inexpensive.

Saludos y Gracias

chipfryer27
Valued Contributor
Posts: 2090
Joined: Thu Dec 03, 2020 10:57 am
Has thanked: 465 times
Been thanked: 695 times

Re: Modulo Ky-022 Sensor Receptor Infrarrojo Ir Pic

Post by chipfryer27 »

Hi

Replied to this in Bug Reports.

Regards

Post Reply