EBM018 Colour Sensor Module

Tips, Tricks and methods for programming, learn ways of making your programming life easier, and share your knowledge with others.

Moderators: Benj, Mods

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8287
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2372 times
Been thanked: 3379 times
Contact:

EBM018 Colour Sensor Module

Postby medelec35 » Sun Apr 05, 2015 2:41 am

Equipment required:
EBM Colour Sensor Module plugged on (either way around) to S1 of EB090
EB090 Mother board connected to port B of EB006 PICmicro multiprogrammer.
EB006 PICmicro multiprogrammer with PIC16F1937 microcontroller.
EB007 push-to-make switch board connected to port A of EB006 PICmicro multiprogrammer. (only using SW5 = RA5)
EB005 LCD board connected to port C of EB006 PICmicro multiprogrammer.
PSU suitable for EB006 PICmicro multiprogrammer. (9V for EB006V8 and greater, 12-14V for EB006V7 or earlier)
Flowcode V6 Home or above.

At the time of writing, EBM018 Colour Sensor Module is available for £13.50 + Vat
You will also require a Sensor board(EB090) which is a mother board for the EBM sensors Range
The Mother board must have two supplies connected to it.
+5V for +V & +9 to 14V (depening on PICmicro multiprogrammer version) connected to VPWR
The Flowchart including all simulation components used was originally created LeighM, Steve M and Paul so they deserve most of the credit.
I have modified it in order to add some improvements.
1) Added Automatic (default ) or manual mode
2) Added a count down to sample timer:
simulation.png
simulation.png (101.63 KiB) Viewed 6589 times


When power is first applied, hardware is in automatic mode.
So the white LED's on the sensor will light, LCD will show the time counting down to end of sample readings, LED's will go out then LCD will display Red, Green & Blue values of sample.
After 3 seconds has elapsed the process is repeated all over again automatically.

If you hold SW5 (long press mode for about a second) down until LCD will show Manual Mode, then every time you press and release SW5 (Short press) a sample will be taken the same as it is in automatic mode.
However after the countdown has finished the R, G & B values will remain until SW5 is short pressed again.
Every time you long press SW5 mode will change.

Note:
If you run the simulation, then since interrupt is running extremely fast then you may not see the seconds counting down.
Attachments
EBM018_-_Test_Program V2.fcfx
(22.89 KiB) Downloaded 451 times
These users thanked the author medelec35 for the post (total 4):
kersing (Sun Apr 05, 2015 12:15 pm) • jgu1 (Sun Apr 05, 2015 2:23 pm) • LeighM (Tue Apr 07, 2015 9:35 am) • Benj (Tue Apr 07, 2015 9:36 am)
Rating: 22.22%
 
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.

kalmar79
Posts: 45
Joined: Sun Aug 20, 2017 8:18 pm
Been thanked: 4 times
Contact:

Re: EBM018 Colour Sensor Module

Postby kalmar79 » Tue Sep 05, 2017 8:12 am

My friend I want to practice with a colour sensor check this post please.


viewtopic.php?f=54&t=19317

User avatar
Benj
Matrix Staff
Posts: 14073
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4297 times
Been thanked: 4050 times
Contact:

Re: EBM018 Colour Sensor Module

Postby Benj » Tue Sep 05, 2017 8:44 am

This is the right right sensor for you Kalmar.