Cypress技术william hill官网
直播中

马聪

7年用户 204经验值
私信 关注
[问答]

声纳用于机器人导航问题

嘿,大家好,
在我大学的高级设计项目中,我的小组被指派了一个机器人,作为一个校园漫游信息亭。我负责传感器集成。我们组决定使用的声纳可以输出对应于检测到的范围的模拟电压电平或其宽度对应于检测到的范围的脉冲。为了得到PSoC 3的句柄,我创建了一个快速概念验证程序,它将模拟VoLTLE级别并将其转换为数字值。为了测试它,我在PSoC 3上安装了一个电源,把它接到电源上,这样我就可以很容易地精确地改变电压。问题是,无论我把电压电平改变为什么,GETREST总是返回十六进制中大约22000或0x5850的值。
到目前为止,在我的故障排除工作中,我假设,从与类似项目的朋友谈话中,ADC返回一个被缩放的值,使得分辨率匹配可接受的输入电压范围IE -0.14伏范围除以2 ^ 16(16位分辨率)。
附件是我目前的简单项目,
SONAR2.ZIP
2兆字节

以上来自于百度翻译


     以下为原文
  Hey all,
    For the senior design project at my university, my group was assigned a robot that would serve as a wandering information kiosk for the campus.  I was placed in charge of sensor integration.  The sonars that our group decided to use can output an analog voltage level that corresponds to detected range or a pulse whose width corresponds to the detected range.  To get a handle on the PSoC 3 I created a quick proof of concept program that would take in the analog votlage level and convert it to a digital value.  To test it out I breadboarded the PSoC 3 and hooked it up to a power supply so I could easily and precisely change the voltage.  The problem is that no matter what I change the voltage level to, GetResult always returns a value that is approx 22,000 or 0x5850 in hex.
    So far in my troubleshooting efforts I have assumed, from talking to friends on similar projects, that the ADC returns a value that is scaled so that the resolution matches the acceptable input voltage range IE 0-6.14 volt range divided by 2^16 (16 bits of resolution).  
     
    Attached is my simple project so far,


回帖(11)

马昱

2019-4-23 08:36:50
嗨,RealChemist,
你提到你所选择的声纳可以在模拟电压电平对应的检测范围或一个脉冲的宽度对应于检测范围的形式输出。
我想你是在试验前一种方法。对吗?
在寻找到的项目,这里有几点需要注意:
1)ADC的转换模式是“连续”,在这种情况下,作为一个单通道ADC。
2)如何测量ADC计数?你可以使用字符液晶显示,使您可以看到测试ADC计数的变化,当电压变化。
三)既然你是ADC的16位分辨率,使用adc_delsig_1_getresult32() API得到的ADC值和变量可以是无符号整数(uint32)而不是整数的ADC的单端模式。

以上来自于百度翻译


     以下为原文
  Hi RealChemist,
     
    You have made a mention that the sonars you have chosen can give output in the form of analog voltage level that corresponds to the detected range or a pulse whose width corresponds to detected range.
    I presume that you are testing out the former method. Is that right?
     
    After looking into the project, here are the following points that needs attention:
     
    1) The Conversion Mode of ADC has to be "Continuous" in this case as a single channel ADC is used.
    2) How are you measuring the ADC counts? You can use the character LCD while testing so that you can see visually the change in ADC counts when voltage is changed.
    3) SInce you are ADC with 16-bit resolution, use ADC_DelSig_1_GetResult32() API to get the ADC value and the variable can be unsigned integer (uint32) rather than integer as the ADC is in single ended mode.
举报

马聪

2019-4-23 08:50:46
是的,电压电平法是我正在使用的方法。
在作出改变后,你建议它工作电压高达3V。
测量:
0V~14(十进制)
1V~(11000)(十进制)
2V~23000(十进制)
3V~32000(十进制)
4V~35000(十进制)
5V~36000(十进制)
可接受的输入电压高达6V,所以我不知道为什么它不能检测到比3V高的任何东西。我上传了更新的项目。谢谢你的帮助!
SONAR21.ZIP
2兆字节

以上来自于百度翻译


     以下为原文
  Yes the voltage level method is the one that I am using. 
    After making the changes you suggested it seems to work to voltages up to 3V. 
    Measurements:
    0V   ~14 (decimal)
    1V    ~11000 (decimal)
    2V    ~23000 (decimal)
    3V    ~32000 (decimal)
    4V    ~35000 (decimal)
    5V    ~36000 (decimal)
    The acceptable input voltage is up to 6V so I do not know why it cannot detect anything much higher than 3V.  I uploaded the updated project.  Thanks for the help!


举报

马昱

2019-4-23 08:56:52
嗨,RealChemist,
你用的是什么工具?
如果你使用的是cy8ckit-001套件,请确保板的电源设置为5V。
给PSoC输入信号不应超过VDDA电压。因此,如果你是供电设备的最大电压在3.3V,那么你可以申请为3.3V
当你选择VREF作为内部1.024v参考,并设置输入范围6倍Vref(6.144v),这意味着理论上如果输入的模拟电压达到6.114v,ADC将其全面阅读。
然而,你是由电源提供的PSoC有限。你可以测量到5V,如果你加上5V的设备。

以上来自于百度翻译


     以下为原文
  Hi RealChemist,
     
    Which kit are you using?
    If you are using CY8CKIT-001 kit, please make sure that the power supply of the board is set to 5V.
    The input signal given to PSoC should never exceed the Vdda supply voltage. Hence, if you are powering up the device at 3.3V, then the maximum voltage which you can apply is 3.3V
    When you have chosen the Vref as internal 1.024V reference, and set the input range to 6 times Vref (6.144V), it means that theoritically if the input analog voltage reaches 6.114V, the ADC will give its full scale reading.
    However, you are limited by the power supply which is provided to PSoC. You can measure upto 5V, if you power up the device with 5V.
举报

马聪

2019-4-23 09:03:18
我得到了PSoC 3的第一次触摸初学者工具包由教师使用。今天早上我试着研究,但是找不到我需要用什么针来给威廉希尔官方网站 板提供一个外部电压。有28个外部I/O引脚与我发现的没有匹配。我进入系统选项卡,以确保VDDA被设置为5V,它是。请注意,我目前正在运行它关闭USB,以便我能够调试它。

以上来自于百度翻译


     以下为原文
  I was given the PSoC 3 first touch starter kit by a teacher to use.  I tried researching this morning but couldnt find what pins I needed to use to supply the board with an external voltage.  There are 28 external I/O pins which didnt match what I found.  I went into the system tab to make sure VDDA was set to 5V and it was.  Mind you I am currently running it off USB so that I am able to debug it.
举报

更多回帖

发帖
×
20
完善资料,
赚取积分