Hi,
I am having difficulty using the ultrasonic sensor with the E-Blocks Combo board EB083.
The test programs and examples all use a standalone LCD panel which makes the choice of ports simple enough for me to understand, but when using the combo board, that takes up Port A and B.
I am possibly missing an obvious change to the program to use the sensor board with Port C or D... could someone please help modify the program to work with the Combo Board EBM083 and the sensor on Port C or D?
I have attached both the original test program off the wiki, as well as my attempt to modify it to work with the combo board. It works in the simulation, but not on the hardware. On the hardware it just flashes a number between about 40 and 70 (on the bottom row of the LCD) and then stays on 0 thereafter.
Ultrasonic EBM019 Sensors
Moderator: Benj
- The G
- Posts: 17
- Joined: Tue Jan 09, 2018 12:41 pm
- Location: Suffolk
- Has thanked: 24 times
- Been thanked: 8 times
- Contact:
Re: Ultrasonic EBM019 Sensors
So please bear with me... as I have been trying to do this with both the ultrasonic and infrared sensors.LeighM wrote:Hi,
The only other Analog inputs are on port E, so you will need to connect the ultrasonic sensor to port E
I have changed hardware to Port E, as well as the component macro references which can be assigned to port E, but there are options which cannot be changed to port E, such as:
Input ADC channel (for the IR Sensor)
Echo ADC channel (for the ultrasonic sensor)
Is there anything else as well that I need to adapt for it to get readings?
...
G
G
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: Ultrasonic EBM019 Sensors
Hi,
If you are using the EB090 Sensor board then you will need to use the patch jumper system.
The analogue output from these two EBM sensors comes out on S4 which, with the default setting,
is mapped to port pin 5 for socket 1 and pin 7 for socket 2.
(See the table on page 5 of the Sensors Datasheet)
Unfortunately, Port E only has pins 0, 1 and 2 available (on the 16F1937 that you are using)
So, if you were to install the sensor into socket 1 you would need to
Leigh
If you are using the EB090 Sensor board then you will need to use the patch jumper system.
The analogue output from these two EBM sensors comes out on S4 which, with the default setting,
is mapped to port pin 5 for socket 1 and pin 7 for socket 2.
(See the table on page 5 of the Sensors Datasheet)
Unfortunately, Port E only has pins 0, 1 and 2 available (on the 16F1937 that you are using)
So, if you were to install the sensor into socket 1 you would need to
- wire link S1_3 to 0 (of the header nearest the 9 way D end on the board)
wire link S1_4 to 1 (of the header nearest the 9 way D end on the board)
move the patch selection jumpers from the Default position to the Patch position
- Output Pulse Pin to Port E 0
Echo ADC channel to An6 (Port E 1)
Leigh
- The G
- Posts: 17
- Joined: Tue Jan 09, 2018 12:41 pm
- Location: Suffolk
- Has thanked: 24 times
- Been thanked: 8 times
- Contact:
Re: Ultrasonic EBM019 Sensors
Excellent, thank you - that was really clear and I have now got the ultrasonic sensor to work!
I am going to try to work out the other sensors (infrared, humidity, temperature) using the same logic looking at the datasheets... is there anything that is different that I should watch out for?
I am going to try to work out the other sensors (infrared, humidity, temperature) using the same logic looking at the datasheets... is there anything that is different that I should watch out for?
...
G
G
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
Re: Ultrasonic EBM019 Sensors
Ah, well done! you have now joined an elite clubI have now got the ultrasonic sensor to work
The Infrared is setup the same way: Emitter LED control on E0, receiver on An6 (Port E1)
For the Temperature and Humidity modules: SDA on E0 and SCL on E1 (Software mode/channel)
(They too use S3 and S4 so wiring is the same)
Regards,
Leigh