- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello all,
I really need your help, i'm kind of in the dark here i want to implement 'Sharp's' Distance sensor {DataSheet attached} in my project and i honestly don't know where to begin coding. If to look at the great picture - i want to be able to know when the object is 20 CM from the sensor and then perform an action( turning LED or anything else). can anyone please guide me? or giving me something to read? any video i can watch? it will be highly appriciated! i'm using DE2-115, BTW.Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I hope you're intending to use the digital version of the sensor - which does all the work for you. Connect 'Vo' to a spare I/O on your DE2 board. In the FPGA you can drive an LED directly from this signal.
Cheers, Alex- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex,
can you ellaborate? what do you mean the digital version?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex,
can you ellaborate? what do you mean the digital version? like when the output is digital? like this - https://media.digikey.com/pdf/data%20sheets/sharp%20pdfs/gp2y0d21yk.pdf- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exactly. Connecting the analogue version to the DE2-115 won't be easy as the board doesn't have any ADC's on it. Assuming you have the choice, use the digital version.
Cheers, Alex- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex,
just ordered the digital version of the sensor, what's next ? :) how can i get indication of how distant is the object?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hi Alex, just ordered the digital version of the sensor, what's next ? :) how can i get indication of how distant is the object? --- Quote End --- The digital version has only a single on/off output which switches at 24% of the 80 cm, see page 4 of the .pdf: https://media.digikey.com/pdf/data%20sheets/sharp%20pdfs/gp2y0d21yk.pdf
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you alex!
if i understood you correctly, it will trigger a led light as it 24 cm far from an object. but would i be able to drive an output on my FPGA board when i realize an object is exactly at, let's say 20 cm? i dont really understand how to monitor the incoming signals and process them.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With the digital version you're limited by the sensor - it will only give you an edge when it's a specified distance away (see the datasheet).
To measure the distance of the object you need the analogue version and to use the Vo signal from that you need an ADC, which the DE2 board doesn't have. You would have to add an external ADC to that board or use another development board with an ADC. Cheers, Alex
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page