1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
嘿,大家好,
在我大学的高级设计项目中,我的小组被指派了一个机器人,作为一个校园漫游信息亭。我负责传感器集成。我们组决定使用的声纳可以输出对应于检测到的范围的模拟电压电平或其宽度对应于检测到的范围的脉冲。为了得到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个回答
|
|
嗨,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. |
|
|
|
是的,电压电平法是我正在使用的方法。
在作出改变后,你建议它工作电压高达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!
|
|
|
|
嗨,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. |
|
|
|
我得到了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. |
|
|
|
我可以在3.3V上运行它,同时为3.3V伏特的声纳供电,声纳输出只会上升到3V。
以上来自于百度翻译 以下为原文 I could just run it at 3.3V and power the sonar with 3.3V volts as well and the sonar output will only go up to 3V. |
|
|
|
您可以从CyPress网站下载您的第一个触摸工具包的示意图:DOCID=31295
如果可能的话,你应该运行你的声纳与你的PSoC运行相同的电压。 在我看来,测量脉宽比电压更容易,特别是当必须连接多个传感器时。 鲍勃 以上来自于百度翻译 以下为原文 You may download the schematics for your first-touch-kit from the Cypress website at: http://www.cypress.com/?docID=31295 If possible, you ought to run your sonar with the same voltage as your PSoC runs. In my opinion it is easier to measure a pulse-width than a voltage, especially when multiple sensors have to be attached. Bob |
|
|
|
我想你会用计时器吗?我考虑过这样做,但实施起来似乎更复杂。
以上来自于百度翻译 以下为原文 Im assuming you would use a timer for that? I looked into doing that but it seemed more complicated to implement. |
|
|
|
您可以使用计数器模块(UDB),UP计数器,根据需要设置捕获输入(取决于要测量的信号的极性)启用(仅硬件)的信号器,并在捕获、TC和复位上重新设置负载。设置时钟toBUS时钟和计数输入到一个频率,给出合理的解决方案。注意输入时钟是同步时钟到总线时钟。
就是这样 在主循环中读取计时器的状态并查找捕获值。 非常简单的方法,即使当您需要处理多个传感器,这可能是恼人的只有一个ADC 鲍勃 以上来自于百度翻译 以下为原文 You may use a counter-module (UDB), Up-Counter, set the capture-input as needed (depends on the polarity of your signal to measure) enable(hardware only) the counter with your signal and set re-load on capture, TC and reset. Set the clock to Bus-Clock and the count input to a frequency giving a reasonable resolution. Take care that the input-clock is synchron to bus-clock. That's it In the main-loop read the status of the timer and look for a captured value. Very easy approach even when you need to handle multiple sensors which can be annoying with only one ADC Bob |
|
|
|
这是我们正在使用的声纳的数据表。
HTTP//www. RoopStut.com /PDF/LV-Max 根据数据表,假设在输出脉冲周期为47毫秒+脉冲宽度时安全吗?在时间描述中,它表示每47毫秒有一次测距。假设这是正确的,为了使用计数器,我也必须能够测量测量周期。为了澄清,我必须能够确定计数器启用时有多少时钟周期(当输入信号高)。 对不起任何愚蠢的问题。它已经有一段时间,因为我编程任何东西,我远远超出我的舒适范围,考虑到我最喜欢的课程,在我的课程是半导体的… 以上来自于百度翻译 以下为原文 Here is the data sheet for the sonar we are using FYI http://www.robotshop.com/PDF/LV-MaxSonar-WR1-Datasheet.pdf According to the data sheet, is it safe to assume at the period of the output pulse is going to be 47ms + Pulse Width? In the timing description it says that rangings are available every 47 ms. Assuming this is correct, in order to use a counter I would have to be able to measure the period of measurement as well. To clarify, I would have to be able to determine how many clock periods went by while the counter was enabled (when the input signal is high) Sorry for any silly questions. Its been awhile since Ive programmed anything and I am far out of my comfort range considering my favorite courses in my curriculum were the semiconductor ones... |
|
|
|
使用2211Hz的计数频率,其分辨率为1/4英寸。
马克斯测度为37.338 ms,最大值约为1000。 周期为50ms,周期值应为1360。似乎一个16位计数器足够,设置周期为30000,那么捕捉将永远重置计数器,当计数器溢出(有一个状态位)声纳不工作。 但是在你的设备中有东西使一切变得更容易,它有一个内置的UART,你可以与之沟通。电压可以,只需删除UART模块,并将其配置为带有缓冲区的接收器。 鲍勃 以上来自于百度翻译 以下为原文 Use a count-frequency of 27,211Hz which will give a resolution of 1/4 inch. Max measure is 37.338 ms giving a max count of about 1000. Period is 50ms, so period value should be 1360. Seems as if a 16-bit counter is enough, set period to 30000, then capturing will always reset the counter, when counter overflows (there is a status-bit for that) sonar doesn't work. But there is something in your device making everything easier, it has a built-in UART with which you can communicate. Voltages are ok, just drop a UART module and configure it as a receiver with a buffer. Bob |
|
|
|
为什么不在输入中使用电阻梯?相同的电阻值将允许输入电压范围加倍。
以上来自于百度翻译 以下为原文 Why not use a resistor ladder in the input? Same resistor values will will allow you to double the input voltage range. |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2101 浏览 1 评论
1848 浏览 1 评论
3666 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1783 浏览 6 评论
1533 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
564浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
418浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
434浏览 2评论
380浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
909浏览 2评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 18:29 , Processed in 1.090141 second(s), Total 98, Slave 81 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号