出租车空车灯怎么连接计价器

核心提示一、安装前准备1、设备准备:计价器主机一台、车速传感器一个、空车灯一台、电源线一束、2、安装工具准备:一十字螺丝刀、剥线钳、电胶带、扎带、二、安装步骤1、安装前对车辆进行基本电路元件检查测试2、根据具体车型确定具体安装方案3、方案确定后按照

一、安装前准备

1、设备准备:计价器主机一台、车速传感器一个、空车灯一台、电源线一束、

2、安装工具准备:一十字螺丝刀、剥线钳、电胶带、扎带、

二、安装步骤

1、安装前对车辆进行基本电路元件检查测试

2、根据具体车型确定具体安装方案

3、方案确定后按照要求找出相应的线并接好包括:常电、ACC、搭铁、特别注意的是车速传感器线,不同车型传车速感器线不一样,必须根据具体车型确定该车的车速传感器线,并接好

4、根据实际情况把相对应的设备安装到合适的位置

三、安装完成后,对接上所有接口及插头,进行设备测试计价器工作是否正常、打表是否正常、计价是否准确、确保现场出现问题能及时解决

四、告知客户安装结束,让客户对项目综合验收并签字

桑塔纳出租车车载充电器保险丝30的能用吗

科技世界日新月异。韩国首尔近日投放了10台新动力的出租车。这不但是新能源,这是新新能源。

这种氢动力的出租车,一次重新可以行驶600公里。而且每辆车子一次充气的时间只有5~6分钟。首尔官方宣布,氢动力出租车的收费标准和普通出租车是一样的。而且这种出租车不但不会排放出废气,而且吸入外部空气与氢气相反应,排出的湿水具有净化空气污染物的作用。

这是完全绿色环保的车辆啊。首尔政府计划今年再投放7辆轻动力公共汽车。

相比较于普通的能源出租车,我们已经看到了氢动力出租车的优势。

第一环保型的能源。我们知道我们生活需要大量的氧气,而氢动力的出租车,最终排放的是水,而水正是氧气和氢气的结合,不污染环境。而普通的新能源出租车,多半是使用电能。电能虽然污染较小,但是它的存储以及运用也必不可免的,会产生二氧化碳。

第二个加入能源的时间较短,续航却长。我们可以看到,只要充氢气,5~6分钟就可以跑600公里。而电能源的出租车则没有这样的效果。通常充电的出租车跑200公里左右,只能在城区晃荡。

第三个,氢动力的出租车会更安全,不会像使用电能源动力的出租车会出现电路问题。

当然全面推广这种出租车,意味着要大面积的使用充氮的基础设备。而且车辆在氮气作为动力之后,它的发动机是否相匹配?

另外还有一个安全使用氮气的问题。我们知道氮气它是作为一种气体,也有易燃易爆的特点。所以期待着这种出租车在安全性能上能够有所保障!

EDA课程设计,用VHDL编程做出租车计费器

不能。

它的保险丝是20的,当电流超过20的的时候保险丝会断掉,从而对电路起到保护的作用。那么当电流到了20以后,他还是不能垄断起不到保护电流的作用,那么这个时候电路可能会被烧毁。对汽车造成严重的破坏。

课程设计内容与要求

1,用开关按键表示脉冲,每个脉冲代表100米,10个脉冲1公里,每公里14元,能同步显示里程和费用;

2,低于2公里5元计费,高于2公里总费用=起步费用+(里程-2公里)里程单价+

等候时间等后单价;

3,等候时间大于2分钟,按每分钟13元计费;

4,可以设定起步价和里程单价。

一、设计原理与技术方法:

包括:电路工作原理分析与原理图、元器件选择与参数计算、电路调试方法与结果说明;

软件设计说明书与流程图、软件源程序代码、软件调试方法与运行结果说明。

根据设计要求,系统的输入信号clk,计价开始信号start,等待信号stop,里程脉冲信号fin。系统的输出信号有:总费用数C0—c3,行驶距离k0—k1,等待时间m0—m1等。系统有两个脉冲输入信号clk_750k,fin,其中clk_750k将根据设计要求分频成14hz,15hz和1hz分别作为公里计费和超时计费的脉冲。两个控制输入开关start,stop;控制过程为:start作为计费开始的开关,当start为高电平时,系统开始根据输入的情况计费。当有乘客上车并开始行驶时,fin脉冲到来,进行行驶计费,此时的stop需要置为0;如需停车等待,就把stop变为高电平,

并去除fin输入脉冲,进行等待计费;当乘客下车且不等待时,直接将start置为0,系统停止工作;价格开始归为起步价50元。

整个设计由分频模块,计量模块,计费模块,控制模块和显示模块五个部分组成。

其中计量模块是整个系统实现里程计数和时间计数的重要部分;控制模块是实现不同计费方式的选择部分,根据所设计的使能端选择是根据里程计费还是根据等待时间计费,同时设计通过分频模块产生不同频率的脉冲信号来实现系统的计费。计量模块采用1hz的驱动信号,计费模块采用14hz,13hz的驱动信号;计量模块每计数一次,计量模块就实现14次或者13次计数,即为实现计时的13元/min,计程时的14元/km的收费。组成框图如下所示:

1百进制模块:

实现百米脉冲的驱动信号,元件框图如图3所示:

图3 百进制模块框图

源程序如下:

library ieee;

use ieeestd_logic_1164all;

use ieeestd_logic_unsignedall;

entity baijinzhi is

port(start,clk2: in std_logic; --秒脉冲

a: out std_logic_vector(3 downto 0));

end baijinzhi;

architecture rt1 of baijinzhi is

signal count_1:std_logic_vector(3 downto 0);

begin

a<=count_1;

process(start,clk2)

begin

if(start='0')then

count_1<="0000";

elsif(clk2'event and clk2='1')then

if(count_1="0111")then

count_1<="0000";

else

count_1<=count_1+'1';

end if;

end if;

end process;

end rt1

2计费模块

; 实现里程和等候时间的计费并输出到显示,元件框图4如下:

图4 计费模块框图

源程序如下:

Library IEEE;

use IEEEstd_logic_1164all;

use IEEEstd_logic_arithall;

use IEEEstd_logic_unsignedall;

entity jifei is

port(clk2:in std_logic; --计费驱动信号

start:in std_logic; --计费开始信号

c0,c1,c2,c3:buffer std_logic_vector(3 downto 0));

end jifei;

architecture rt1 of jifei is

begin

process(clk2,start)

begin

if start='0'then c3<="0000";c2<="0000";c1<="0101";c0<="0000"; --起步价5元

elsif clk2'event and clk2='1'then

if c0="1001" then c0<="0000";

if c1="1001" then c1<="0000";

if c2="1001" then c2<="0000";

if c3="1001" then c3<="0000";

else c3<=c3+1;

end if;

else c2<=c2+1;

end if;

else c1<=c1+1;

end if;

else c0<=c0+1;

end if;

end if;

end process;

end rt1;

3公里模块

实现历程的计数和输出计费脉冲,元件框图5如下:

图5 公里模块框图

源程序如下:

library ieee;

use ieeestd_logic_1164all;

use ieeestd_logic_unsignedall;

entity gongli is

port(clk1,start: in std_logic; --百米脉冲

k1,k2,k3,k4: out std_logic_vector(3 downto 0); --里程显示

temp2 : out std_logic);

end gongli;

architecture rt1 of gongli is

signal count_1: std_logic_vector(3 downto 0);

signal count_2: std_logic_vector(3 downto 0);

signal count_3: std_logic_vector(3 downto 0);

signal count_4: std_logic_vector(3 downto 0);

begin

k1<=count_1;

k2<=count_2;

k3<=count_3;

k4<=count_4;

process(start,clk1)

begin

if(start='0')then

count_1<="0000";

count_2<="0000";

count_3<="0000";

count_4<="0000"; ---公里清零

elsif(clk1'event and clk1='1')then

if(count_1="1001")then --公里计数器

count_1<="0000";count_2<=count_2+1;temp2<='1';

if(count_2="1001")then

count_2<="0000";count_3<=count_3+'1';

if(count_3="1001")then

count_3<="0000";count_4<=count_4+'1';

end if;

end if;

else

count_1<=count_1+'1';temp2<='0';

end if;

end if;

end process;

end rt1;

4输出模块

实现所有数据的输出,元件框图6如下:

图6 输出模块框图

源程序如下:

library ieee;

use ieeestd_logic_1164all;

use ieeestd_logic_unsignedall;

entity shuchu is

port(y: in std_logic_vector(3 downto 0);

e: out std_logic_vector(6 downto 0));

end shuchu;

architecture rt1of shuchu is

begin

process

begin

case y is

when"0000"=>e<="0111111";

when"0001"=>e<="0000110";

when"0010"=>e<="1011011";

when"0011"=>e<="1001111";

when"0100"=>e<="1100110";

when"0101"=>e<="1101101";

when"0110"=>e<="1111101";

when"0111"=>e<="0000111";

when"1000"=>e<="1111111";

when"1001"=>e<="1100111";

when others=>e<="0000000";

end case;

end process;

end rt1;

5显示模块

实现所有数据的显示,元件框图7如下:

图7 显示模块框图

源程序如下:

library ieee;

use ieeestd_logic_1164all;

use ieeestd_logic_unsignedall;

entity xianshi is

port(start: in std_logic;

a:in std_logic_vector(3 downto 0); --选择信号

c1,c2,c3,c4,out1,out2,out3,out4:in std_logic_vector(3 downto 0); --里程显示,时间显示输入

y:out std_logic_vector(3 downto 0)); --里程显示,时间显示输出

end xianshi;

architecture rt1 of xianshi is

begin

process

begin

if(start='0')then

y<="0000";

else case a is

when "0000"=> y<=c1 ;

when "0001"=> y<=c2 ;

when "0010"=> y<=c3 ;

when "0011"=> y<=c4 ;

when "0100"=> y<=out1 ;

when "0101"=> y<=out2;

when "0110"=> y<=out3 ;

when "0111"=> y<=out4;

when others =>y<= "0000";

end case;

end if;

end process;

end rt1;

6dian模块

图8 dian模块框图

源程序如下:

library ieee;

use ieeestd_logic_1164all;

use ieeestd_logic_unsignedall;

entity dian is

port(a: in std_logic_vector(3 downto 0);

e: out std_logic);

end dian;

architecture rt1 of dian is

begin

process

begin

case a is

when "0001"=>e<='1';

when "0101"=>e<='1';

when others=>e<='0';

end case;

end process;

end rt1;

三、中各个模块设计分析

系统总体顶层框图如下:

系统总体顶层框图

程序最终功能实现波形仿真

1 分频模块

由于实验箱上没有14hz和13hz的整数倍时钟信号,因此采用频率较大的750khz进行分频,以近似得到14hz,13hz和1hz的时钟频率。通过以上三种不同频率的脉冲信号实行出租车行驶,等待两种情况下的不同计费。模块元件如下:

分频模块框图

源程序如下:

Library IEEE;

use IEEEstd_logic_1164all;

use IEEEstd_logic_arithall;

use IEEEstd_logic_unsignedall;

entity fenpin is

port(clk_750k:in std_logic; --系统时钟

clk_14:buffer std_logic; --14分频

clk_13:buffer std_logic; --13分频

clk_1 : buffer std_logic); --1分频

end fenpin ;

architecture rt1 of fenpin is

signal q_14:integer range 0 to 53570; --定义中间信号量

signal q_13:integer range 0 to 57691;

signal q_1:integer range 0 to 749999;

begin

process(clk_750k)

begin

If(clk_750k' event and clk_750k='1')then

If q_14=53570 then q_14<=0;clk_14<=not clk_14;

else q_14<=q_14+1;

end if; --得14hz频率信号

If q_13=57691 then q_13<=0;clk_13<=not clk_13;

else q_13<=q_13+1;

end if; --得13hz频率信号

If q_1=749999 then q_1<=0;clk_1<=not clk_1;

else q_1<=q_1+1;

end if; --得1hz频率信号

end if;

end process;

end rt1;

2 计量模块

计量模块主要完成计时和计程功能。

计时部分:计算乘客的等待累积时间,当等待时间大于2min时,本模块中en1使能信号变为1;当clk1每来一个上升沿,计时器就自增1,计时器的量程为59min,满量程后自动归零。

计程部分:计算乘客所行驶的公里数,当行驶里程大于2km时,本模块中en0使能信号变为1;当clk每来一个上升沿,计程器就自增1,计程器的量程为99km,满量程后自动归零。

元件框图为:

计量模块框图

计量模块仿真波形为:

源程序如下:

library ieee;

use ieeestd_logic_1164all;

use ieeestd_logic_arithall;

use ieeestd_logic_unsignedall;

entity jiliang is

port(start:in std_logic; --计费开始信号

fin:in std_logic; --里程脉冲信号

stop:in std_logic; --行驶中途等待信号

clk1:in std_logic; --驱动脉冲

en1,en0:buffer std_logic; --计费单价使能信号

k1,k0:buffer std_logic_vector(3 downto 0); --行驶公里计数

m1,m0:buffer std_logic_vector(3 downto 0)); --等待时间计数

end jiliang;

architecture rt2 of jiliang is

signal w:integer range 0 to 59; --计时范围0~59

begin

process(clk1)

begin

if(clk1'event and clk1='1')then

if start='0' then

w<=0;en1<='0';en0<='0';m1<="0000";

m0<="0000";k1<="0000";k0<="0000";

elsif stop='1' then --计时开始信号

if w=59 then

w<=0;

else w<=w+1;

end if;

if m0="1001" then

m0<="0000";

if m1="0101" then

m1<="0000";

else m1<=m1+1;

end if;

else m0<=m0+1;

end if;

if stop='1' then en0<='0';

if m1&m0>"00000001" then en1<='1'; --若等待时间大于2min则en1置1

else en1<='0';

end if;

end if;

elsif fin='1' then --里程计数开始

if k0="1001" then k0<="0000";

if k1="1001" then k1<="0000"; --计程范围0~99

else k1<=k1+1;

end if;

else k0<=k0+1;

end if;

if stop='0' then

en1<='0';

if k1&k0>"00000001" then

en0<='1'; --若行使里程大于2km,则en0置1

else en0<='0';

end if;

end if;

end if;

end if;

end process;

end rt2;

3 控制模块

本模块主要是通过计量模块产生的两个不同的输入使能信号en0,en1,对每个分频模块输出的14hz,13hz的脉冲进行选择输出的过程;本模块实现了双脉冲的二选一;最终目的为了计费模块中对行驶过程中不同的时段进行计价。

模块元件如下:

控制模块框图

控制模块仿真波形为:

源程序如下:

Library IEEE;

use IEEEstd_logic_1164all;

use IEEEstd_logic_arithall;

use IEEEstd_logic_unsignedall;

entity kongzhi is

port(en0,en1:in std_logic; --使能选择信号

clk_in1:in std_logic; --14分频输入信号

clk_in2:in std_logic; --13分频输入信号

clk_out:out std_logic); --输出信号

end kongzhi;

architecture rt3 of kongzhi is

begin

process(en0,en1)

begin

if en0='1' then --实现二选一功能

clk_out<=clk_in1;

elsif en1='1' then

clk_out<=clk_in2;

end if;

end process;

end rt3;

4计费模块

当计费信号start一直处于高电平即计费状态时,本模块根据控制模块选择出的信号从而对不同的单价时段进行计费。即行程在2km内,而且等待累计时间小于2min则为起步价5元;2km外以每公里14元计费,等待累积时间超过2min则按每分钟13元计费。c0,c1,c2,c3分别表示费用的显示。

模块元件为:

计费模块框图

计费模块仿真波形为:

源程序如下:

Library IEEE;

use IEEEstd_logic_1164all;

use IEEEstd_logic_arithall;

use IEEEstd_logic_unsignedall;

entity jifei is

port(clk2:in std_logic; --计费驱动信号

start:in std_logic; --计费开始信号

c0,c1,c2,c3:buffer std_logic_vector(3 downto 0));

end jifei;

architecture rt4 of jifei is

begin

process(clk2,start)

begin

if start='0'then c3<="0000";c2<="0000";c1<="0101";c0<="0000"; --起步价5元

elsif clk2'event and clk2='1'then

if c0="1001" then c0<="0000";

if c1="1001" then c1<="0000";

if c2="1001" then c2<="0000";

if c3="1001" then c3<="0000"; --计价范围0~9999

else c3<=c3+1;

end if;

else c2<=c2+1;

end if;

else c1<=c1+1;

end if;

else c0<=c0+1;

end if;

end if;

end process;

end rt4;

5显示模块

显示模块完成计价,计时和计程数据显示。计费数据送入显示模块进行译码,最后送至以百元,十元,元,角为单位对应的数码管上显示。计时数据送入显示模块进行译码,最后送至以分为单位对应的数码管上显示。计程数据送入显示模块进行译码,最后送至以km为单位的数码管上显示。

模块元件为:

显示模块框图

源程序如下:

library ieee;

use ieeestd_logic_1164all;

use ieeestd_logic_unsignedall; --定义库包

entity xianshi is --定义实体

port(

clk_scan:in std_logic; --扫描时钟信号端口设置

c3,c2,c1,c0:in std_logic_vector(3 downto 0); --总费用输入端口

k0,k1:in std_logic_vector(3 downto 0); --里程输入端口

m0,m1:in std_logic_vector(3 downto 0); --等待时间输入端口

sel:out std_logic_vector(2 downto 0); --控制数码管位选信号的扫描信号输出端口

led:out std_logic_vector(6 downto 0); --数码管的控制端口

led_dp:out std_logic --数码管的小数点输出端口

);

end xianshi;

architecture rt5 of xianshi is

signal duan:std_logic_vector(6 downto 0); --数码显示管中间变量

signal shuju:std_logic_vector(3 downto 0); --选择输入端的中间变量

signal cnt:std_logic_vector(2 downto 0); --控制数码管的中间变量

signal xiaodian:std_logic; --小数点的中间变量

begin

process(clk_scan) --开始进程

begin

if clk_scan'event and clk_scan='1' then

cnt<=cnt+1; --每有一个扫描信号上升沿实现加1扫描

end if;

end process; --结束进程

process(cnt) --开始进程(选择扫描显示数码管)

begin

case cnt is --扫描时给每个数码管赋值

when "000"=>shuju<=c0;

when "001"=>shuju<=c1;

when "010"=>shuju<=c2;

when "011"=>shuju<=c3;

when "100"=>shuju<=k0;

when "101"=>shuju<=k1;

when "110"=>shuju<=m0;

when "111"=>shuju<=m1;

when others=> null;

end case;

if (cnt="001" or cnt="110")

then xiaodian<='1'; --在里程和总费用的个位处显示小数点

else xiaodian<='0';

end if;

end process; --结束进程

process(shuju) --开始进程(译码显示)

begin

case shuju is

when "0000"=>duan<="0111111"; --0

when "0001"=>duan<="0000110"; --1

when "0010"=>duan<="1011011"; --2

when "0011"=>duan<="1001111"; --3

when "0100"=>duan<="1100110"; --4

when "0101"=>duan<="1101101"; --5

when "0110"=>duan<="1111101"; --6

when "0111"=>duan<="0000111"; --7

when "1000"=>duan<="1111111"; --8

when "1001"=>duan<="1101111"; --9

when others=>null;

end case;

end process;

sel<=cnt;

led<=duan;

led_dp<=xiaodian;

end rt5;

二、课程设计工作记录:

包括:设计步骤与时间安排、调试步骤与时间安排、课题完成结果说明

2课题完成结果说明:

此计费器能实现起步价是5元;实现实验要求的1公里计费一次单价,行驶公里大于2km时每公里按14元计费并能显示里程和总共的费用。当行驶了6公里,等待了4分钟时,费用显示为158元。与计算公式总费用=起步费用+(里程-2公里)里程单价+等候时间等后单价;即158=5+(6-2)14+413。实验结果与理论结果完全一致,实验设计成功。

 
友情链接
鄂ICP备19019357号-22