[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4678: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4680: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4681: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4682: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
virt2real.ru • Просмотр темы - Разные вопросы




 

Управляем чем угодно откуда угодно

Разные вопросы

Виртурилка, 3G/4G, WiFi, моторчики, датчики, GPS и прочее - питание, драйвера, совместимость и т.д.

Разные вопросы

Сообщение resident » 31 окт 2013, 21:11

Как узнать напряжение на источнике питания?
Т.к. часто бывает что питается через преобразователь, как узнать напряжение на внешней батарее?

ps реквестую написание статьи вики Считывание показаний АЦП (ADC)
resident
 
Сообщения: 12
Зарегистрирован: 04 окт 2013, 10:42

Re: Разные вопросы

Сообщение Noor » 31 окт 2013, 22:04

Мастер сам устанавливает закон
Noor
 
Сообщения: 343
Зарегистрирован: 04 сен 2013, 20:03

Re: Разные вопросы

Сообщение tikki » 31 окт 2013, 22:27

тут вопрос про то как это сделать средствами в2р.
tikki
 
Сообщения: 9
Зарегистрирован: 04 сен 2013, 01:12

Re: Разные вопросы

Сообщение phoenix367 » 01 ноя 2013, 00:12

Сегодня получил заказ с операционниками и буквально час назад собрал схему контроля питания. Короче, берете ОУ, например, MCP601 и собираете на нем схему с figure 4-6(A) из даташита . По желанию схему можно приправить конденсаторами и защитными диодами. Номиналы резисторов выбираете в зависимости от того, какое у вас напряжение питания. Главное при этом, чтобы напряжение на выходе ОУ не превышало +3,6В - это максимальное напряжение, которое может измерить АЦП виртурилки. Подрубаете вход схемы к + источника питания, а выход ко входу одного из АЦП виртурилки (например, ADC0). ОУ нужен для того, чтобы низкое входное сопротивление АЦП (около 2 КОм) не влияло на напряжение, снимаемое с резистивного делителя.

Далее у вас два пути - либо писать читалку самостоятельно, либо воспользоваться моим поделием отсюда . Если выбираете первый вариант, то вам нужно нужно открывать устройство /dev/v2r_adc, вычитывать из него 12 байт, а затем закрывать. Каждая пара байт содержит двоичный код от 0 до 1023 значения на входе соответствующего АЦП. Соответственно 0 - это 0 В, а 1023 - это 3,6 В и выше. Переводите двоичный код в напряжение и умножаете его на коэффициент деления схемы, про которую я писал выше.

Если выбираете путь номер 2, то пишете свою читалку с использованием SDK, устанавливаете множитель и читаете из АЦП без лишнего гемора. В качестве примера можете посмотреть исходный код программы adcdemo.

Если интересно, то могу выложить видео (правда без звука) как это работает.
phoenix367
 
Сообщения: 193
Зарегистрирован: 09 сен 2013, 00:19

Re: Разные вопросы

Сообщение resident » 01 ноя 2013, 09:33

спасибо
попробовал пару батареек без ОУ напрямую, новую и дохлую
head -c 13 /dev/v2r_adc | hexdump
0000000 0000 0000 0000 01c8 0000 0000 0080
head -c 13 /dev/v2r_adc | hexdump
0000000 0000 0000 0000 00bb 0000 0000 0080
напряжение первой 0x01c8 = 456/1024*3.6=1.60 B
напряжение второй 0x00bb = 187/1024*3.6=0.65 B
что соответствует показаниям вольтметра
resident
 
Сообщения: 12
Зарегистрирован: 04 окт 2013, 10:42

Re: Разные вопросы

Сообщение daglib » 16 дек 2013, 16:55

daglib
 
Сообщения: 22
Зарегистрирован: 08 ноя 2013, 21:35

Re: Разные вопросы

Сообщение phoenix367 » 17 дек 2013, 15:18

phoenix367
 
Сообщения: 193
Зарегистрирован: 09 сен 2013, 00:19

Re: Разные вопросы

Сообщение daglib » 17 дек 2013, 15:23

phoenix367, работаю под виндой. Фтп поднять получилось, правда пока не разобрался с правами доступа. По умолчанию доступна папка /home/ftp/. Как разберусь-отпишу тут. Самая большая проблема для меня - это поставить мускул, т.к. вообще не представляю как это сделать.
daglib
 
Сообщения: 22
Зарегистрирован: 08 ноя 2013, 21:35

Re: Разные вопросы

Сообщение Gol » 18 дек 2013, 11:33

Аватара пользователя
Gol
 
Сообщения: 507
Зарегистрирован: 17 фев 2012, 01:44
Откуда: Тула-Свободный-Щёкино-Тула-Москва

Re: Разные вопросы

Сообщение Gol » 18 дек 2013, 12:38

Аватара пользователя
Gol
 
Сообщения: 507
Зарегистрирован: 17 фев 2012, 01:44
Откуда: Тула-Свободный-Щёкино-Тула-Москва

След.

Вернуться в Железо - заставляем работать

Кто сейчас на конференции

Сейчас этот форум просматривают: нет зарегистрированных пользователей и гости: 9

cron