From 427335c5264794d980623f0aa308d6e0b3ff0042 Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Fri, 29 May 2009 17:55:31 +0200 Subject: pressure-control: Fix APIs for multiple sensors Signed-off-by: Michael Buesch --- pressure_control/firmware/main.c | 36 +- pressure_control/firmware/main.h | 6 + pressure_control/firmware/remote.c | 16 +- pressure_control/firmware/sensor.c | 53 +- pressure_control/firmware/sensor.h | 29 +- pressure_control/firmware/util.c | 5 + pressure_control/firmware/util.h | 10 + pressure_control/firmware/valves.c | 107 ++- pressure_control/firmware/valves.h | 56 +- pressure_control/schematics/pressure_control.sch | 927 ++++++++++------------- 10 files changed, 576 insertions(+), 669 deletions(-) (limited to 'pressure_control') diff --git a/pressure_control/firmware/main.c b/pressure_control/firmware/main.c index 01933ce..ec2335d 100644 --- a/pressure_control/firmware/main.c +++ b/pressure_control/firmware/main.c @@ -1,7 +1,7 @@ /* * Pneumatic pressure controller. * - * Copyright (C) 2008 Michael Buesch + * Copyright (C) 2008-2009 Michael Buesch * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,6 +43,11 @@ struct pressure_state state; /* The 1000Hz jiffies counter */ static jiffies_t jiffies_counter; +DEFINE_VALVE(xy_control_valves, D, 6, 7, 4, 5); +DEFINE_VALVE(z_control_valves, C, 2, 3, 4, 5); +static DEFINE_SENSOR(xy_control_sensor, 0, 245, 4400, 10000); +static DEFINE_SENSOR(z_control_sensor, (1<= 0); - cur_state = valves_get_global_state(); + cur_state = valves_get_global_state(&xy_control_valves); if (abs_offset > cfg.hysteresis) { /* Adjust the pressure */ report_change = (cur_state == VALVES_IDLE); if (is_too_big) - valves_global_switch(VALVES_FLOW_OUT); + valves_global_switch(&xy_control_valves, VALVES_FLOW_OUT); else - valves_global_switch(VALVES_FLOW_IN); + valves_global_switch(&xy_control_valves, VALVES_FLOW_IN); } else if (abs_offset > cfg.hysteresis / 4) { /* If we're idle, stay idle. * If we're increasing or decreasing pressure, @@ -167,15 +172,16 @@ static void check_pressure(void) * The pressure is OK. Make sure the valves are * all idle. */ report_change = (cur_state != VALVES_IDLE); - valves_global_switch(VALVES_IDLE); + valves_global_switch(&xy_control_valves, VALVES_IDLE); } if (state.mbar < 800) { /* If the pressure in the reservoir is low, * the feedforward of the pneumatic valve for * flow-out might not work correctly. So force poke * the valves again until we reach a good pressure. */ - __valves_global_switch(valves_get_global_state()); - valves_disarm_auto_idle(); + __valves_global_switch(&xy_control_valves, + valves_get_global_state(&xy_control_valves)); + valves_disarm_auto_idle(&xy_control_valves); } } if (abs((int32_t)state.mbar - (int32_t)state.reported_mbar) >= 100) @@ -220,7 +226,7 @@ int main(void) wdt_disable(); if (mcucsr & (1 << BORF)) { /* If we have a brownout, try to enter valve emergency state. */ - valves_emergency_state(); + valves_emergency_state(&xy_control_valves); mdelay(500); /* This wasn't a real brownout, if we're still alife. * Go on with initialization. */ @@ -236,8 +242,8 @@ int main(void) if (!(mcucsr & (1 << PORF)) && (mcucsr & (1 << WDRF))) print("WATCHDOG RESET!\n"); - valves_init(); - sensor_init(); + valves_init(&xy_control_valves); + sensor_init(&xy_control_sensor); eeprom_load_config(); system_timer_init(); @@ -246,7 +252,7 @@ int main(void) print("Monitoring...\n"); remote_work(); remote_notify_restart(); - sensor_trigger_read(); + sensor_trigger_read(&xy_control_sensor); while (1) { static jiffies_t next_sensor_trigger; static bool need_sensor_trigger; @@ -269,10 +275,10 @@ int main(void) /* It's time for triggering another * sensor measurement. */ need_sensor_trigger = 0; - sensor_trigger_read(); + sensor_trigger_read(&xy_control_sensor); } remote_work(); - valves_work(); + valves_work(&xy_control_valves); wdt_reset(); } } diff --git a/pressure_control/firmware/main.h b/pressure_control/firmware/main.h index d8cb6aa..7a9dbf2 100644 --- a/pressure_control/firmware/main.h +++ b/pressure_control/firmware/main.h @@ -59,4 +59,10 @@ void get_pressure_state(struct pressure_state *state); void prepare_turn_on(void); void prepare_shutdown(void); + +struct valves; +extern struct valves xy_control_valves; +extern struct valves z_control_valves; + + #endif /* MAIN_H_ */ diff --git a/pressure_control/firmware/remote.c b/pressure_control/firmware/remote.c index 6383339..c640067 100644 --- a/pressure_control/firmware/remote.c +++ b/pressure_control/firmware/remote.c @@ -183,7 +183,7 @@ static void handle_received_message(void) if (conf.autoadjust_enable != flag) { conf.autoadjust_enable = flag; /* Make sure the values are idle. */ - valves_global_switch(VALVES_IDLE); + valves_global_switch(&xy_control_valves, VALVES_IDLE); } set_pressure_config(&conf); sei(); @@ -198,22 +198,22 @@ static void handle_received_message(void) break; } if (rx_msg.valve.nr == 0) { - valve0_switch(rx_msg.valve.state == 0 ? + valve0_switch(&xy_control_valves, rx_msg.valve.state == 0 ? VALVE_STATE_12 : VALVE_STATE_14); - valve_wait_toggle(); - valve0_switch(VALVE_STATE_IDLE); + valve_wait_toggle(&xy_control_valves); + valve0_switch(&xy_control_valves, VALVE_STATE_IDLE); } else if (rx_msg.valve.nr == 1) { - valve1_switch(rx_msg.valve.state == 0 ? + valve1_switch(&xy_control_valves, rx_msg.valve.state == 0 ? VALVE_STATE_12 : VALVE_STATE_14); - valve_wait_toggle(); - valve0_switch(VALVE_STATE_IDLE); + valve_wait_toggle(&xy_control_valves); + valve0_switch(&xy_control_valves, VALVE_STATE_IDLE); } else err = MSG_ERR_INVAL; break; } case MSG_SHUTDOWN: prepare_shutdown(); - valves_shutdown(); + valves_shutdown(&xy_control_valves); break; case MSG_TURNON: prepare_turn_on(); diff --git a/pressure_control/firmware/sensor.c b/pressure_control/firmware/sensor.c index 475cc6e..bf48fb2 100644 --- a/pressure_control/firmware/sensor.c +++ b/pressure_control/firmware/sensor.c @@ -26,54 +26,40 @@ #include -/* The sensor value offset, in millivolts. - * This value is subtracted from the measured voltage before - * processing. */ -#define SENSOR_MV_OFFSET 245 - -/* The Full Scale Output (maximum) output value of the sensor, - * in millivolts. */ -#define SENSOR_FULL_SCALE_MV U32(4400) - -/* The pressure at Full Scale Output, in millibar. */ -#define SENSOR_FULL_SCALE_MBAR U32(10000) - -/* The sensor enable signal pin. */ -#define SENSOR_ENABLE_DDR DDRC -#define SENSOR_ENABLE_PORT PORTC -#define SENSOR_ENABLE_BIT 1 - - +static struct sensor *active_sensor; #define ADC_MAX U32(0x3FF) ISR(ADC_vect) { - const uint16_t full_scale_adc = ADC_MAX * SENSOR_FULL_SCALE_MV / 5000; - + struct sensor *s = active_sensor; + const uint16_t full_scale_adc = ADC_MAX * (uint32_t)s->full_scale_mv / 5000; uint16_t adc, mv, mbar; + BUG_ON(!active_sensor); + /* Convert the ADC value to millivolts. */ adc = ADC; if (adc > full_scale_adc) adc = full_scale_adc; - mv = SENSOR_FULL_SCALE_MV * (uint32_t)adc / full_scale_adc; + mv = (uint32_t)s->full_scale_mv * (uint32_t)adc / full_scale_adc; /* Subtract the sensor voltage offset, so 0 mBar results in 0 mV. */ - if (mv > SENSOR_MV_OFFSET) - mv -= SENSOR_MV_OFFSET; + if (mv > s->mv_offset) + mv -= s->mv_offset; else mv = 0; - mbar = SENSOR_FULL_SCALE_MBAR * (uint32_t)mv / SENSOR_FULL_SCALE_MV; + mbar = (uint32_t)s->full_scale_mbar * (uint32_t)mv / (uint32_t)s->full_scale_mv; - sensor_result(mbar); + sensor_result(active_sensor, mbar); + active_sensor = NULL; } -static inline void adc_trigger(bool with_irq) +static inline void adc_trigger(uint8_t mux, bool with_irq) { /* Set the multiplexer to ADC-0, AVcc Ref. */ - ADMUX = (1 << REFS0); + ADMUX = (1 << REFS0) | mux; /* Start ADC with a prescaler of 128. That's a ADC freq * of 125kHz on a 16MHz crystal. */ ADCSRA = (1 << ADEN) | (1 << ADSC) | @@ -81,19 +67,20 @@ static inline void adc_trigger(bool with_irq) (with_irq ? (1 << ADIE) : 0); } -void sensor_trigger_read(void) +void sensor_trigger_read(struct sensor *s) { + BUG_ON(active_sensor); + active_sensor = s; + mb(); /* Trigger an ADC conversion with interrupt notification. */ - adc_trigger(1); + adc_trigger(s->adc_mux, 1); } -void sensor_init(void) +void sensor_init(struct sensor *s) { - SENSOR_ENABLE_DDR |= (1 << SENSOR_ENABLE_BIT); - SENSOR_ENABLE_PORT |= (1 << SENSOR_ENABLE_BIT); mdelay(20); /* Warm-up time */ /* Discard the first ADC result. */ - adc_trigger(0); + adc_trigger(s->adc_mux, 0); while (ADCSRA & (1 << ADSC)) mb(); } diff --git a/pressure_control/firmware/sensor.h b/pressure_control/firmware/sensor.h index a6230ad..8f3c4e5 100644 --- a/pressure_control/firmware/sensor.h +++ b/pressure_control/firmware/sensor.h @@ -4,10 +4,33 @@ #include -void sensor_trigger_read(void); -void sensor_init(void); +struct sensor { + /* ADMUX */ + uint8_t adc_mux; + /* The sensor value offset, in millivolts. + * This value is subtracted from the measured voltage before + * processing. */ + uint16_t mv_offset; + /* The Full Scale Output (maximum) output value of the sensor, + * in millivolts. */ + uint16_t full_scale_mv; + /* The pressure at Full Scale Output, in millibar. */ + uint16_t full_scale_mbar; +}; + +#define DEFINE_SENSOR(name, mux, _mv_offset, _full_scale_mv, _full_scale_mbar) \ + struct sensor name = { \ + .adc_mux = mux, \ + .mv_offset = _mv_offset, \ + .full_scale_mv = _full_scale_mv, \ + .full_scale_mbar = _full_scale_mbar, \ + } + +void sensor_trigger_read(struct sensor *s); +void sensor_init(struct sensor *s); /* Callback for sensor value reporting. */ -extern void sensor_result(uint16_t millibar_result_value); +extern void sensor_result(struct sensor *s, + uint16_t millibar_result_value); #endif /* SENSOR_H_ */ diff --git a/pressure_control/firmware/util.c b/pressure_control/firmware/util.c index 0f3b8b7..241fc19 100644 --- a/pressure_control/firmware/util.c +++ b/pressure_control/firmware/util.c @@ -25,6 +25,11 @@ #include +const prog_uint8_t bit2mask_lt[] = { + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, +}; + + void mdelay(uint16_t msecs) { uint8_t timer, i; diff --git a/pressure_control/firmware/util.h b/pressure_control/firmware/util.h index 4d357fe..28e98f8 100644 --- a/pressure_control/firmware/util.h +++ b/pressure_control/firmware/util.h @@ -90,4 +90,14 @@ uint16_t crc16_block_update(uint16_t crc, const void *data, uint16_t size); #define U64(value) ((uint64_t)(value)) +/* Convert a bit-number to a bit-mask. + * Only valid for bitnr<=7. + */ +extern const prog_uint8_t bit2mask_lt[]; +#undef BITMASK8 +#define BITMASK8(bitnr) \ + (__builtin_constant_p(bitnr) ? (1<<(bitnr)) : \ + pgm_read_byte(&bit2mask_lt[(bitnr)])) + + #endif /* UTIL_H_ */ diff --git a/pressure_control/firmware/valves.c b/pressure_control/firmware/valves.c index 700760a..8f9f2de 100644 --- a/pressure_control/firmware/valves.c +++ b/pressure_control/firmware/valves.c @@ -25,7 +25,7 @@ #include -/*** Valve interface definitions ***/ +/*** Valve interface definitions ***///XXX #define VALVE_DDR DDRD #define VALVE_PORT PORTD #define VALVE0_14 6 /* Pin for valve-0 position 14 */ @@ -33,102 +33,89 @@ #define VALVE1_14 4 /* Pin for valve-1 position 14 */ #define VALVE1_12 5 /* Pin for valve-1 position 12 */ +#define MMIO8(mem_addr) _MMIO_BYTE(mem_addr) -static uint8_t current_global_state = 0xFF; -static bool need_switch_to_idle; -static jiffies_t switch_to_idle_time; - - -void valve0_switch(uint8_t state) +void valve0_switch(struct valves *v, uint8_t state) { - VALVE_PORT &= ~((1 << VALVE0_12) | (1 << VALVE0_14)); + MMIO8(v->port) &= ~(BITMASK8(v->bit_0_12) | BITMASK8(v->bit_0_14)); if (state == VALVE_STATE_12) - VALVE_PORT |= (1 << VALVE0_12); + MMIO8(v->port) |= BITMASK8(v->bit_0_12); else if (state == VALVE_STATE_14) - VALVE_PORT |= (1 << VALVE0_14); + MMIO8(v->port) |= BITMASK8(v->bit_0_14); } -void valve1_switch(uint8_t state) +void valve1_switch(struct valves *v, uint8_t state) { - VALVE_PORT &= ~((1 << VALVE1_12) | (1 << VALVE1_14)); + MMIO8(v->port) &= ~(BITMASK8(v->bit_1_12) | BITMASK8(v->bit_1_14)); if (state == VALVE_STATE_12) - VALVE_PORT |= (1 << VALVE1_12); + MMIO8(v->port) |= BITMASK8(v->bit_1_12); else if (state == VALVE_STATE_14) - VALVE_PORT |= (1 << VALVE1_14); + MMIO8(v->port) |= BITMASK8(v->bit_1_14); } -void valves_global_switch(uint8_t state) +void valves_global_switch(struct valves *v, uint8_t state) { - if (state != current_global_state) - __valves_global_switch(state); + if (state != v->current_global_state) + __valves_global_switch(v, state); } -void __valves_global_switch(uint8_t state) +void __valves_global_switch(struct valves *v, uint8_t state) { switch (state) { case VALVES_IDLE: - valve0_switch(VALVE_STATE_12); - valve1_switch(VALVE_STATE_12); + valve0_switch(v, VALVE_STATE_12); + valve1_switch(v, VALVE_STATE_12); break; case VALVES_FLOW_IN: - valve1_switch(VALVE_STATE_12); - valve0_switch(VALVE_STATE_14); + valve1_switch(v, VALVE_STATE_12); + valve0_switch(v, VALVE_STATE_14); break; case VALVES_FLOW_OUT: - valve0_switch(VALVE_STATE_12); - valve1_switch(VALVE_STATE_14); + valve0_switch(v, VALVE_STATE_12); + valve1_switch(v, VALVE_STATE_14); break; } - switch_to_idle_time = get_jiffies() + msec_to_jiffies(VALVE_TOGGLE_MSEC); - need_switch_to_idle = 1; - current_global_state = state; -} - -void valves_disarm_auto_idle(void) -{ - need_switch_to_idle = 0; + v->switch_to_idle_time = get_jiffies() + msec_to_jiffies(VALVE_TOGGLE_MSEC); + v->need_switch_to_idle = 1; + v->current_global_state = state; } -void valves_work(void) +void valves_work(struct valves *v) { - if (need_switch_to_idle && - time_after(get_jiffies(), switch_to_idle_time)) { - need_switch_to_idle = 0; - valve0_switch(VALVE_STATE_IDLE); - valve1_switch(VALVE_STATE_IDLE); + if (v->need_switch_to_idle && + time_after(get_jiffies(), v->switch_to_idle_time)) { + v->need_switch_to_idle = 0; + valve0_switch(v, VALVE_STATE_IDLE); + valve1_switch(v, VALVE_STATE_IDLE); } } -uint8_t valves_get_global_state(void) -{ - return current_global_state; -} - -static inline void valves_ddr_setup(void) +static inline void valves_ddr_setup(struct valves *v) { - VALVE_DDR |= (1 << VALVE0_12) | (1 << VALVE0_14) | - (1 << VALVE1_12) | (1 << VALVE1_14); + MMIO8(v->ddr) |= BITMASK8(v->bit_0_12) | BITMASK8(v->bit_0_14) | + BITMASK8(v->bit_1_12) | BITMASK8(v->bit_1_14); } -void valves_shutdown(void) +void valves_shutdown(struct valves *v) { - __valves_global_switch(VALVES_FLOW_OUT); - valve_wait_toggle(); - valve0_switch(VALVE_STATE_IDLE); - valve1_switch(VALVE_STATE_IDLE); + __valves_global_switch(v, VALVES_FLOW_OUT); + valve_wait_toggle(v); + valve0_switch(v, VALVE_STATE_IDLE); + valve1_switch(v, VALVE_STATE_IDLE); } -void valves_emergency_state(void) +void valves_emergency_state(struct valves *v) { - valves_ddr_setup(); - __valves_global_switch(VALVES_IDLE); - valve_wait_toggle(); - valve0_switch(VALVE_STATE_IDLE); - valve1_switch(VALVE_STATE_IDLE); + valves_ddr_setup(v); + __valves_global_switch(v, VALVES_IDLE); + valve_wait_toggle(v); + valve0_switch(v, VALVE_STATE_IDLE); + valve1_switch(v, VALVE_STATE_IDLE); } -void valves_init(void) +void valves_init(struct valves *v) { - valves_ddr_setup(); - __valves_global_switch(VALVES_IDLE); + v->current_global_state = 0xFF; + valves_ddr_setup(v); + __valves_global_switch(v, VALVES_IDLE); } diff --git a/pressure_control/firmware/valves.h b/pressure_control/firmware/valves.h index b2df104..11ec6db 100644 --- a/pressure_control/firmware/valves.h +++ b/pressure_control/firmware/valves.h @@ -2,6 +2,7 @@ #define VALVES_H_ #include "util.h" +#include "main.h" #include @@ -20,24 +21,55 @@ enum valve_state { VALVE_STATE_14, }; +struct valves { + uint16_t ddr; /* DDRx */ + uint16_t port; /* PORTx */ + uint8_t bit_0_14; /* Valve 0: Pin for valve position 14 */ + uint8_t bit_0_12; /* Valve 0: Pin for valve position 12 */ + uint8_t bit_1_14; /* Valve 1: Pin for valve position 14 */ + uint8_t bit_1_12; /* Valve 1: Pin for valve position 12 */ + + uint8_t current_global_state; /* enum valves_global_state */ + bool need_switch_to_idle; /* Need transition to VALVE_STATE_IDLE. */ + jiffies_t switch_to_idle_time; /* Deadline for VALVE_STATE_IDLE transition. */ +}; + +#define DEFINE_VALVE(name, portid, bit0_14, bit0_12, bit1_14, bit1_12) \ + struct valves name = { \ + .ddr = _SFR_ADDR(DDR##portid), \ + .port = _SFR_ADDR(PORT##portid), \ + .bit_0_14 = bit0_14, \ + .bit_0_12 = bit0_12, \ + .bit_1_14 = bit1_14, \ + .bit_1_12 = bit1_12, \ + } + #define VALVE_TOGGLE_MSEC 10 /* Wait for the valve to toggle from one position to another. */ -static inline void valve_wait_toggle(void) +static inline void valve_wait_toggle(struct valves *v) { mdelay(VALVE_TOGGLE_MSEC); } -void valves_init(void); -void valves_work(void); -void valves_emergency_state(void); -void valves_shutdown(void); -void valves_global_switch(uint8_t global_state); -void __valves_global_switch(uint8_t global_state); -void valves_disarm_auto_idle(void); -uint8_t valves_get_global_state(void); - -void valve0_switch(uint8_t state); -void valve1_switch(uint8_t state); +void valves_init(struct valves *v); +void valves_work(struct valves *v); +void valves_emergency_state(struct valves *v); +void valves_shutdown(struct valves *v); +void valves_global_switch(struct valves *v, uint8_t global_state); +void __valves_global_switch(struct valves *v, uint8_t global_state); + +static inline void valves_disarm_auto_idle(struct valves *v) +{ + v->need_switch_to_idle = 0; +} + +static inline uint8_t valves_get_global_state(struct valves *v) +{ + return v->current_global_state; +} + +void valve0_switch(struct valves *v, uint8_t state); +void valve1_switch(struct valves *v, uint8_t state); #endif /* VALVES_H_ */ diff --git a/pressure_control/schematics/pressure_control.sch b/pressure_control/schematics/pressure_control.sch index 83cf47b..f9ebb95 100644 --- a/pressure_control/schematics/pressure_control.sch +++ b/pressure_control/schematics/pressure_control.sch @@ -1,11 +1,11 @@ EESchema Schematic File Version 1 -LIBS:power,/home/mb/Desktop/kicad-lib/Atmega8-16PI,device,conn,linear,regul,74xx,cmos4000,adc-dac,memory,xilinx,special,microcontrollers,dsp,microchip,analog_switches,motorola,texas,intel,audio,interface,digital-audio,philips,display,cypress,siliconi,contrib,valves,./pressure_control.cache +LIBS:power,./atmega8-16PI,device,conn,linear,regul,74xx,cmos4000,adc-dac,memory,xilinx,special,microcontrollers,dsp,microchip,analog_switches,motorola,texas,intel,audio,interface,digital-audio,philips,display,cypress,siliconi,contrib,valves EELAYER 23 0 EELAYER END $Descr A4 11700 8267 Sheet 1 1 Title "AVR based pressure control" -Date "8 oct 2008" +Date "29 may 2009" Rev "0.1" Comp "" Comment1 "" @@ -13,25 +13,81 @@ Comment2 "" Comment3 "" Comment4 "" $EndDescr -Connection ~ 5950 7250 Wire Wire Line - 5950 7250 7600 7250 + 7550 5750 7550 2800 Wire Wire Line - 7600 7250 7600 6600 + 7550 5750 7400 5750 Wire Wire Line - 6950 5950 7050 5950 + 7400 5750 7400 6200 Wire Wire Line - 7600 5950 7550 5950 + 7200 6050 7200 6200 Wire Wire Line - 7350 5600 7600 5600 + 7300 6050 7300 6200 Wire Wire Line - 7350 5600 7350 2800 + 6950 2900 7450 2900 +Connection ~ 7900 2600 Wire Wire Line - 9250 2400 6950 2400 + 6950 3400 7900 3400 +Wire Wire Line + 7900 3400 7900 2600 +Wire Wire Line + 3500 7300 3900 7300 +Wire Wire Line + 3900 7300 3900 4950 +Wire Wire Line + 3900 4950 7350 4950 +Wire Wire Line + 7350 4950 7350 3000 +Wire Wire Line + 7350 3000 6950 3000 +Wire Wire Line + 3500 5900 3700 5900 +Wire Wire Line + 3700 5900 3700 4750 +Wire Wire Line + 3700 4750 7150 4750 +Wire Wire Line + 7150 4750 7150 3200 +Wire Wire Line + 7150 3200 6950 3200 +Wire Wire Line + 1150 5400 1500 5400 +Wire Wire Line + 1150 6800 1500 6800 +Wire Wire Line + 2100 5400 2650 5400 +Wire Wire Line + 2100 6800 2650 6800 +Wire Wire Line + 2950 7300 3000 7300 +Wire Wire Line + 2950 5900 3000 5900 +Wire Wire Line + 2650 6400 2650 6300 Wire Wire Line - 750 4600 7250 4600 + 2650 5000 2650 4900 Wire Wire Line - 750 4600 750 4750 + 2650 5700 2650 5600 +Wire Wire Line + 2650 7100 2650 7000 +Wire Wire Line + 2950 5200 3000 5200 +Wire Wire Line + 2950 6600 3000 6600 +Wire Wire Line + 2100 7500 2650 7500 +Wire Wire Line + 2100 6100 2650 6100 +Wire Wire Line + 1150 7500 1500 7500 +Wire Wire Line + 1150 6100 1500 6100 +Wire Wire Line + 4350 4450 8100 4450 +Wire Wire Line + 4350 4450 4350 1800 +Wire Wire Line + 9250 2400 6950 2400 Wire Wire Line 11000 5700 11000 5000 Wire Wire Line @@ -49,10 +105,6 @@ Wire Wire Line 8600 5200 8100 5200 Wire Wire Line 8100 5200 8100 4450 -Wire Wire Line - 8100 4450 4350 4450 -Wire Wire Line - 4350 4450 4350 1800 Wire Wire Line 4350 1800 4550 1800 Wire Wire Line @@ -66,18 +118,7 @@ Wire Wire Line Wire Wire Line 8400 3900 8600 3900 Wire Wire Line - 10350 900 10400 900 -Wire Wire Line - 9350 900 8550 900 -Wire Wire Line - 8550 900 8550 1800 -Wire Wire Line - 8550 1800 6950 1800 -Connection ~ 7550 2600 -Wire Wire Line - 7600 2600 7550 2600 -Wire Wire Line - 8050 2900 8200 2900 + 8450 2900 8600 2900 Wire Wire Line 6950 2100 7450 2100 Wire Wire Line @@ -122,122 +163,6 @@ Wire Wire Line 2650 2200 2650 2100 Wire Wire Line 2650 800 2650 700 -Connection ~ 7000 5950 -Wire Wire Line - 4800 6000 4300 6000 -Wire Wire Line - 4300 6000 4300 6200 -Connection ~ 1400 7400 -Wire Wire Line - 5950 7200 5950 7400 -Wire Wire Line - 5950 6650 5900 6650 -Wire Wire Line - 4300 6750 3800 6750 -Wire Wire Line - 3800 6750 3800 6050 -Connection ~ 5350 6650 -Wire Wire Line - 5400 6650 5300 6650 -Connection ~ 4050 6200 -Wire Wire Line - 3800 6050 3550 6050 -Connection ~ 1400 6550 -Wire Wire Line - 1400 6550 2400 6550 -Wire Wire Line - 2400 6550 2400 6050 -Wire Wire Line - 2400 6050 2600 6050 -Connection ~ 1150 7400 -Wire Wire Line - 1400 7400 1400 7250 -Wire Wire Line - 1150 7400 1150 6450 -Wire Wire Line - 1150 5150 1150 6050 -Wire Notes Line - 2650 6100 2650 5750 -Wire Notes Line - 2650 6100 3500 6100 -Wire Notes Line - 3500 6100 3500 5750 -Wire Notes Line - 3500 5750 2650 5750 -Wire Wire Line - 1800 6200 1800 6250 -Wire Wire Line - 1800 5350 1800 5400 -Wire Wire Line - 6350 6350 6350 6400 -Wire Wire Line - 4700 6200 4700 6250 -Wire Wire Line - 4700 4800 4700 4850 -Wire Wire Line - 6350 5500 6350 5550 -Wire Wire Line - 4700 5650 4700 5700 -Wire Wire Line - 4700 7050 4700 7100 -Wire Wire Line - 2400 5800 2600 5800 -Connection ~ 1150 5700 -Wire Wire Line - 1400 5700 1150 5700 -Wire Wire Line - 1400 6750 1400 5900 -Wire Wire Line - 3550 5800 3800 5800 -Wire Wire Line - 3800 5800 3800 5150 -Wire Wire Line - 3800 5150 4300 5150 -Wire Wire Line - 4050 5650 4050 5350 -Wire Wire Line - 4050 5350 4300 5350 -Wire Wire Line - 4800 5800 4300 5800 -Wire Wire Line - 4300 5800 4300 5600 -Wire Wire Line - 4300 5600 4050 5600 -Connection ~ 4050 5600 -Wire Wire Line - 5300 5800 5350 5800 -Wire Wire Line - 5350 5800 5350 5250 -Wire Wire Line - 5400 5250 5300 5250 -Connection ~ 5350 5250 -Wire Wire Line - 6400 5250 5900 5250 -Wire Wire Line - 4050 6150 4050 6550 -Wire Wire Line - 4050 6550 4300 6550 -Wire Wire Line - 5950 5250 5950 5850 -Connection ~ 5950 5250 -Wire Wire Line - 5950 6700 5950 6050 -Connection ~ 5950 6650 -Wire Wire Line - 3450 7550 3450 7400 -Connection ~ 3450 7400 -Wire Wire Line - 5300 6000 5350 6000 -Wire Wire Line - 5350 6000 5350 6650 -Wire Wire Line - 6900 5250 7000 5250 -Wire Wire Line - 7000 5250 7000 5950 -Wire Wire Line - 3900 5900 3900 6200 -Wire Wire Line - 3900 6200 4300 6200 Wire Wire Line 2650 1500 2650 1400 Wire Wire Line @@ -258,10 +183,6 @@ Wire Wire Line 1150 3300 1500 3300 Wire Wire Line 1150 1900 1500 1900 -Wire Wire Line - 6950 2900 7250 2900 -Wire Wire Line - 7350 2800 6950 2800 Wire Wire Line 3500 2400 4550 2400 Wire Wire Line @@ -281,22 +202,7 @@ Wire Wire Line Wire Wire Line 7350 2300 6950 2300 Wire Wire Line - 7550 1100 7550 3400 -Wire Wire Line - 7550 3400 6950 3400 -Wire Wire Line - 8150 2600 8100 2600 -Wire Wire Line - 7550 2900 7650 2900 -Connection ~ 7550 2900 -Wire Wire Line - 6950 1900 8650 1900 -Wire Wire Line - 8650 1900 8650 1300 -Wire Wire Line - 8650 1300 9350 1300 -Wire Wire Line - 10350 1300 10400 1300 + 8550 2600 8500 2600 Wire Wire Line 10200 4300 10650 4300 Wire Wire Line @@ -305,8 +211,6 @@ Wire Wire Line 8400 4800 8600 4800 Wire Wire Line 10900 3900 10200 3900 -Wire Wire Line - 7250 2900 7250 4600 Wire Wire Line 4450 1900 4450 4350 Wire Wire Line @@ -315,9 +219,6 @@ Wire Wire Line 8200 4350 8200 5000 Wire Wire Line 8200 5000 8600 5000 -Connection ~ 1150 4600 -Wire Wire Line - 1150 4650 1150 4600 Wire Wire Line 10300 4500 10300 4600 Connection ~ 10300 4500 @@ -328,30 +229,288 @@ Wire Wire Line Wire Wire Line 10900 5200 10900 5700 Wire Wire Line - 750 5150 750 7400 + 3500 5200 3600 5200 +Wire Wire Line + 3600 5200 3600 4650 +Wire Wire Line + 3600 4650 7050 4650 +Wire Wire Line + 7050 4650 7050 3300 +Wire Wire Line + 7050 3300 6950 3300 +Wire Wire Line + 3500 6600 3800 6600 +Wire Wire Line + 3800 6600 3800 4850 +Wire Wire Line + 3800 4850 7250 4850 +Wire Wire Line + 7250 4850 7250 3100 +Wire Wire Line + 7250 3100 6950 3100 +Wire Wire Line + 7550 1100 7550 2600 +Wire Wire Line + 7550 2600 8000 2600 +Wire Wire Line + 7900 2900 8050 2900 +Connection ~ 7900 2900 +Wire Wire Line + 7550 2800 6950 2800 +Wire Wire Line + 7450 2900 7450 5650 +Wire Wire Line + 7450 5650 5850 5650 +Wire Wire Line + 5850 5650 5850 6200 Wire Wire Line - 750 7400 5950 7400 + 5750 6050 5750 6200 Wire Wire Line - 7600 5600 7600 6200 -Connection ~ 7600 5950 + 5650 6050 5650 6200 +NoConn ~ 6950 1900 +NoConn ~ 6950 1800 $Comp -L ZENER D2 -U 1 1 48ED3996 -P 7600 6400 -F 0 "D2" H 7600 6500 50 0000 C C -F 1 "4.7V" H 7600 6300 40 0000 C C - 1 7600 6400 +L +5V #PWR20 +U 1 1 4A20046C +P 5650 6050 +F 0 "#PWR20" H 5650 6140 20 0001 C C +F 1 "+5V" H 5650 6140 30 0000 C C + 1 5650 6050 + 1 0 0 -1 +$EndComp +$Comp +L +5V #PWR24 +U 1 1 4A200467 +P 7200 6050 +F 0 "#PWR24" H 7200 6140 20 0001 C C +F 1 "+5V" H 7200 6140 30 0000 C C + 1 7200 6050 + 1 0 0 -1 +$EndComp +$Comp +L GND #PWR21 +U 1 1 4A20044B +P 5750 6050 +F 0 "#PWR21" H 5750 6050 30 0001 C C +F 1 "GND" H 5750 5980 30 0001 C C + 1 5750 6050 + -1 0 0 1 +$EndComp +$Comp +L GND #PWR26 +U 1 1 4A200441 +P 7300 6050 +F 0 "#PWR26" H 7300 6050 30 0001 C C +F 1 "GND" H 7300 5980 30 0001 C C + 1 7300 6050 + -1 0 0 1 +$EndComp +NoConn ~ 5550 6200 +NoConn ~ 5450 6200 +NoConn ~ 5350 6200 +NoConn ~ 7100 6200 +NoConn ~ 7000 6200 +NoConn ~ 6900 6200 +$Comp +L CONN_6 P8 +U 1 1 4A2003AF +P 7150 6550 +F 0 "P8" V 7100 6550 60 0000 C C +F 1 "X/Y pressure sensor" V 7200 6550 60 0000 C C + 1 7150 6550 + 0 1 1 0 +$EndComp +$Comp +L CONN_6 P7 +U 1 1 4A2003A9 +P 5600 6550 +F 0 "P7" V 5550 6550 60 0000 C C +F 1 "Z pressure sensor" V 5650 6550 60 0000 C C + 1 5600 6550 + 0 1 1 0 +$EndComp +Text Notes 600 5000 0 60 ~ +Z Inlet/outlet valve control +$Comp +L +24V #PWR8 +U 1 1 4A200275 +P 1150 7500 +F 0 "#PWR8" H 1150 7450 20 0001 C C +F 1 "+24V" H 1150 7600 30 0000 C C + 1 1150 7500 + 0 -1 -1 0 +$EndComp +$Comp +L +24V #PWR7 +U 1 1 4A200274 +P 1150 6800 +F 0 "#PWR7" H 1150 6750 20 0001 C C +F 1 "+24V" H 1150 6900 30 0000 C C + 1 1150 6800 + 0 -1 -1 0 +$EndComp +$Comp +L +24V #PWR6 +U 1 1 4A200273 +P 1150 6100 +F 0 "#PWR6" H 1150 6050 20 0001 C C +F 1 "+24V" H 1150 6200 30 0000 C C + 1 1150 6100 + 0 -1 -1 0 +$EndComp +$Comp +L +24V #PWR5 +U 1 1 4A200272 +P 1150 5400 +F 0 "#PWR5" H 1150 5350 20 0001 C C +F 1 "+24V" H 1150 5500 30 0000 C C + 1 1150 5400 0 -1 -1 0 $EndComp $Comp +L INDUCTOR L6 +U 1 1 4A200271 +P 1800 6100 +F 0 "L6" V 1750 6100 40 0000 C C +F 1 "Valve coil, 270 Ohms" V 1900 6100 40 0000 C C + 1 1800 6100 + 0 1 1 0 +$EndComp +$Comp +L INDUCTOR L7 +U 1 1 4A200270 +P 1800 6800 +F 0 "L7" V 1750 6800 40 0000 C C +F 1 "Valve coil, 270 Ohms" V 1900 6800 40 0000 C C + 1 1800 6800 + 0 1 1 0 +$EndComp +$Comp +L INDUCTOR L8 +U 1 1 4A20026F +P 1800 7500 +F 0 "L8" V 1750 7500 40 0000 C C +F 1 "Valve coil, 270 Ohms" V 1900 7500 40 0000 C C + 1 1800 7500 + 0 1 1 0 +$EndComp +$Comp +L INDUCTOR L5 +U 1 1 4A20026E +P 1800 5400 +F 0 "L5" V 1750 5400 40 0000 C C +F 1 "Valve coil, 270 Ohms" V 1900 5400 40 0000 C C + 1 1800 5400 + 0 1 1 0 +$EndComp +$Comp +L R R17 +U 1 1 4A20026D +P 3250 7300 +F 0 "R17" V 3330 7300 50 0000 C C +F 1 "1.5k" V 3250 7300 50 0000 C C + 1 3250 7300 + 0 1 1 0 +$EndComp +$Comp L R R14 -U 1 1 48ED397A -P 7300 5950 -F 0 "R14" V 7380 5950 50 0000 C C -F 1 "10k" V 7300 5950 50 0000 C C - 1 7300 5950 +U 1 1 4A20026C +P 3250 5200 +F 0 "R14" V 3330 5200 50 0000 C C +F 1 "1.5k" V 3250 5200 50 0000 C C + 1 3250 5200 0 1 1 0 $EndComp +$Comp +L R R16 +U 1 1 4A20026B +P 3250 6600 +F 0 "R16" V 3330 6600 50 0000 C C +F 1 "1.5k" V 3250 6600 50 0000 C C + 1 3250 6600 + 0 1 1 0 +$EndComp +$Comp +L R R15 +U 1 1 4A20026A +P 3250 5900 +F 0 "R15" V 3330 5900 50 0000 C C +F 1 "1.5k" V 3250 5900 50 0000 C C + 1 3250 5900 + 0 1 1 0 +$EndComp +$Comp +L GND #PWR13 +U 1 1 4A200269 +P 2650 4900 +F 0 "#PWR13" H 2650 4900 30 0001 C C +F 1 "GND" H 2650 4830 30 0001 C C + 1 2650 4900 + -1 0 0 1 +$EndComp +$Comp +L GND #PWR14 +U 1 1 4A200268 +P 2650 5600 +F 0 "#PWR14" H 2650 5600 30 0001 C C +F 1 "GND" H 2650 5530 30 0001 C C + 1 2650 5600 + -1 0 0 1 +$EndComp +$Comp +L GND #PWR16 +U 1 1 4A200267 +P 2650 7000 +F 0 "#PWR16" H 2650 7000 30 0001 C C +F 1 "GND" H 2650 6930 30 0001 C C + 1 2650 7000 + -1 0 0 1 +$EndComp +$Comp +L GND #PWR15 +U 1 1 4A200266 +P 2650 6300 +F 0 "#PWR15" H 2650 6300 30 0001 C C +F 1 "GND" H 2650 6230 30 0001 C C + 1 2650 6300 + -1 0 0 1 +$EndComp +$Comp +L NPN Q8 +U 1 1 4A200265 +P 2750 7300 +F 0 "Q8" H 2900 7300 50 0000 C C +F 1 "BD139" H 2652 7450 50 0000 C C + 1 2750 7300 + -1 0 0 1 +$EndComp +$Comp +L NPN Q5 +U 1 1 4A200264 +P 2750 5200 +F 0 "Q5" H 2900 5200 50 0000 C C +F 1 "BD139" H 2652 5350 50 0000 C C + 1 2750 5200 + -1 0 0 1 +$EndComp +$Comp +L NPN Q7 +U 1 1 4A200263 +P 2750 6600 +F 0 "Q7" H 2900 6600 50 0000 C C +F 1 "BD139" H 2652 6750 50 0000 C C + 1 2750 6600 + -1 0 0 1 +$EndComp +$Comp +L NPN Q6 +U 1 1 4A200262 +P 2750 5900 +F 0 "Q6" H 2900 5900 50 0000 C C +F 1 "BD139" H 2652 6050 50 0000 C C + 1 2750 5900 + -1 0 0 1 +$EndComp NoConn ~ 8600 5300 NoConn ~ 8600 5100 NoConn ~ 10200 5300 @@ -363,28 +522,28 @@ NoConn ~ 10500 5700 NoConn ~ 10400 5700 NoConn ~ 10300 5700 $Comp -L GND #PWR31 +L GND #PWR32 U 1 1 48EC97E3 P 10700 5550 -F 0 "#PWR31" H 10700 5550 30 0001 C C +F 0 "#PWR32" H 10700 5550 30 0001 C C F 1 "GND" H 10700 5480 30 0001 C C 1 10700 5550 -1 0 0 1 $EndComp $Comp -L GND #PWR27 +L GND #PWR30 U 1 1 48EC97C8 P 10300 4600 -F 0 "#PWR27" H 10300 4600 30 0001 C C +F 0 "#PWR30" H 10300 4600 30 0001 C C F 1 "GND" H 10300 4530 30 0001 C C 1 10300 4600 1 0 0 -1 $EndComp $Comp -L +5V #PWR30 +L +5V #PWR31 U 1 1 48EC97A6 P 10500 4000 -F 0 "#PWR30" H 10500 4090 20 0001 C C +F 0 "#PWR31" H 10500 4090 20 0001 C C F 1 "+5V" H 10500 4090 30 0000 C C 1 10500 4000 -1 0 0 1 @@ -398,8 +557,6 @@ F 1 "RS232 serial" V 10750 6050 60 0000 C C 1 10700 6050 0 1 1 0 $EndComp -Text Notes 9500 650 0 60 ~ -Quick control Text Notes 8950 5750 0 60 ~ Control interface NoConn ~ 4550 2000 @@ -450,10 +607,6 @@ F 1 "MAX232" H 9400 3750 70 0000 C C $EndComp NoConn ~ 6950 2000 NoConn ~ 6950 2500 -NoConn ~ 6950 3000 -NoConn ~ 6950 3100 -NoConn ~ 6950 3200 -NoConn ~ 6950 3300 NoConn ~ 4550 3100 NoConn ~ 4550 3000 NoConn ~ 4550 2100 @@ -469,72 +622,36 @@ F 1 "16Mhz clock source" H 9550 2250 60 0000 C C $EndComp $Comp L GND #PWR29 -U 1 1 48EBE347 -P 10400 1300 -F 0 "#PWR29" H 10400 1300 30 0001 C C -F 1 "GND" H 10400 1230 30 0001 C C - 1 10400 1300 - 0 -1 -1 0 -$EndComp -$Comp -L GND #PWR28 -U 1 1 48EBE340 -P 10400 900 -F 0 "#PWR28" H 10400 900 30 0001 C C -F 1 "GND" H 10400 830 30 0001 C C - 1 10400 900 - 0 -1 -1 0 -$EndComp -$Comp -L SPST SW2 -U 1 1 48EBE316 -P 9850 1300 -F 0 "SW2" H 9850 1400 70 0000 C C -F 1 "Pressure DOWN" H 9850 1200 70 0000 C C - 1 9850 1300 - 1 0 0 -1 -$EndComp -$Comp -L SPST SW1 -U 1 1 48EBE309 -P 9850 900 -F 0 "SW1" H 9850 1000 70 0000 C C -F 1 "Pressure UP" H 9850 800 70 0000 C C - 1 9850 900 - 1 0 0 -1 -$EndComp -$Comp -L GND #PWR26 U 1 1 48EB4074 -P 8200 2900 -F 0 "#PWR26" H 8200 2900 30 0001 C C -F 1 "GND" H 8200 2830 30 0001 C C - 1 8200 2900 +P 8600 2900 +F 0 "#PWR29" H 8600 2900 30 0001 C C +F 1 "GND" H 8600 2830 30 0001 C C + 1 8600 2900 0 -1 -1 0 $EndComp $Comp L C C3 U 1 1 48EB4067 -P 7850 2900 -F 0 "C3" H 7900 3000 50 0000 L C -F 1 "47p" H 7900 2800 50 0000 L C - 1 7850 2900 +P 8250 2900 +F 0 "C3" H 8300 3000 50 0000 L C +F 1 "47p" H 8300 2800 50 0000 L C + 1 8250 2900 0 1 1 0 $EndComp $Comp -L +5V #PWR23 +L +5V #PWR25 U 1 1 48EB400B P 7250 1200 -F 0 "#PWR23" H 7250 1290 20 0001 C C +F 0 "#PWR25" H 7250 1290 20 0001 C C F 1 "+5V" H 7250 1290 30 0000 C C 1 7250 1200 -1 0 0 1 $EndComp $Comp -L GND #PWR24 +L GND #PWR27 U 1 1 48EB3FFE P 7650 1200 -F 0 "#PWR24" H 7650 1200 30 0001 C C +F 0 "#PWR27" H 7650 1200 30 0001 C C F 1 "GND" H 7650 1130 30 0001 C C 1 7650 1200 1 0 0 -1 @@ -549,10 +666,10 @@ F 1 "ISP" V 7450 750 60 0000 C C 0 -1 -1 0 $EndComp $Comp -L GND #PWR16 +L GND #PWR17 U 1 1 48EB3F38 P 4850 900 -F 0 "#PWR16" H 4850 900 30 0001 C C +F 0 "#PWR17" H 4850 900 30 0001 C C F 1 "GND" H 4850 830 30 0001 C C 1 4850 900 0 1 1 0 @@ -567,7 +684,7 @@ F 1 "47p" H 5200 800 50 0000 L C 0 1 1 0 $EndComp Text Notes 600 800 0 60 ~ -Inlet/outlet valve control +X/Y Inlet/outlet valve control $Comp L +24V #PWR4 U 1 1 48EB372C @@ -641,55 +758,55 @@ F 1 "Valve coil, 270 Ohms" V 1900 1200 40 0000 C C 0 1 1 0 $EndComp $Comp -L +5V #PWR25 +L +5V #PWR28 U 1 1 48EB35DA -P 8150 2600 -F 0 "#PWR25" H 8150 2690 20 0001 C C -F 1 "+5V" H 8150 2690 30 0000 C C - 1 8150 2600 +P 8550 2600 +F 0 "#PWR28" H 8550 2690 20 0001 C C +F 1 "+5V" H 8550 2690 30 0000 C C + 1 8550 2600 0 1 1 0 $EndComp $Comp L R R13 U 1 1 48EB35CD -P 7850 2600 -F 0 "R13" V 7930 2600 50 0000 C C -F 1 "10k" V 7850 2600 50 0000 C C - 1 7850 2600 +P 8250 2600 +F 0 "R13" V 8330 2600 50 0000 C C +F 1 "10k" V 8250 2600 50 0000 C C + 1 8250 2600 0 1 1 0 $EndComp $Comp -L GND #PWR19 +L GND #PWR22 U 1 1 48EB35A8 P 5950 4250 -F 0 "#PWR19" H 5950 4250 30 0001 C C +F 0 "#PWR22" H 5950 4250 30 0001 C C F 1 "GND" H 5950 4180 30 0001 C C 1 5950 4250 1 0 0 -1 $EndComp $Comp -L GND #PWR17 +L GND #PWR18 U 1 1 48EB35A4 P 5550 4250 -F 0 "#PWR17" H 5550 4250 30 0001 C C +F 0 "#PWR18" H 5550 4250 30 0001 C C F 1 "GND" H 5550 4180 30 0001 C C 1 5550 4250 1 0 0 -1 $EndComp $Comp -L +5V #PWR20 +L +5V #PWR23 U 1 1 48EB3592 P 6050 950 -F 0 "#PWR20" H 6050 1040 20 0001 C C +F 0 "#PWR23" H 6050 1040 20 0001 C C F 1 "+5V" H 6050 1040 30 0000 C C 1 6050 950 1 0 0 -1 $EndComp $Comp -L +5V #PWR18 +L +5V #PWR19 U 1 1 48EB3587 P 5650 950 -F 0 "#PWR18" H 5650 1040 20 0001 C C +F 0 "#PWR19" H 5650 1040 20 0001 C C F 1 "+5V" H 5650 1040 30 0000 C C 1 5650 950 1 0 0 -1 @@ -731,37 +848,37 @@ F 1 "1.5k" V 3250 1700 50 0000 C C 0 1 1 0 $EndComp $Comp -L GND #PWR7 +L GND #PWR9 U 1 1 48EB336B P 2650 700 -F 0 "#PWR7" H 2650 700 30 0001 C C +F 0 "#PWR9" H 2650 700 30 0001 C C F 1 "GND" H 2650 630 30 0001 C C 1 2650 700 -1 0 0 1 $EndComp $Comp -L GND #PWR8 +L GND #PWR10 U 1 1 48EB3367 P 2650 1400 -F 0 "#PWR8" H 2650 1400 30 0001 C C +F 0 "#PWR10" H 2650 1400 30 0001 C C F 1 "GND" H 2650 1330 30 0001 C C 1 2650 1400 -1 0 0 1 $EndComp $Comp -L GND #PWR10 +L GND #PWR12 U 1 1 48EB335F P 2650 2800 -F 0 "#PWR10" H 2650 2800 30 0001 C C +F 0 "#PWR12" H 2650 2800 30 0001 C C F 1 "GND" H 2650 2730 30 0001 C C 1 2650 2800 -1 0 0 1 $EndComp $Comp -L GND #PWR9 +L GND #PWR11 U 1 1 48EB3357 P 2650 2100 -F 0 "#PWR9" H 2650 2100 30 0001 C C +F 0 "#PWR11" H 2650 2100 30 0001 C C F 1 "GND" H 2650 2030 30 0001 C C 1 2650 2100 -1 0 0 1 @@ -802,272 +919,6 @@ F 1 "BD139" H 2652 1850 50 0000 C C 1 2750 1700 -1 0 0 1 $EndComp -Text Notes 2600 7150 0 60 ~ -Sensor amplifier -$Comp -L POT RV1 -U 1 1 48EA86D8 -P 4050 5900 -F 0 "RV1" H 4050 5800 50 0000 C C -F 1 "100k" H 4050 5900 50 0000 C C - 1 4050 5900 - 0 -1 -1 0 -$EndComp -$Comp -L R R2 -U 1 1 48E7F221 -P 1400 7000 -F 0 "R2" V 1480 7000 50 0000 C C -F 1 "4.7k" V 1400 7000 50 0000 C C - 1 1400 7000 - 1 0 0 -1 -$EndComp -Text Label 1500 4600 0 60 ~ -Sensor amplifier enable -$Comp -L GND #PWR11 -U 1 1 48E7F3CF -P 3450 7550 -F 0 "#PWR11" H 3450 7550 30 0001 C C -F 1 "GND" H 3450 7480 30 0001 C C - 1 3450 7550 - 1 0 0 -1 -$EndComp -$Comp -L R R11 -U 1 1 48E7F3B1 -P 5950 6950 -F 0 "R11" V 6030 6950 50 0000 C C -F 1 "500k" V 5950 6950 50 0000 C C - 1 5950 6950 - 1 0 0 -1 -$EndComp -$Comp -L R R12 -U 1 1 48E7F33D -P 6650 5250 -F 0 "R12" V 6730 5250 50 0000 C C -F 1 "500k" V 6650 5250 50 0000 C C - 1 6650 5250 - 0 1 1 0 -$EndComp -$Comp -L R R10 -U 1 1 48E7F311 -P 5650 6650 -F 0 "R10" V 5730 6650 50 0000 C C -F 1 "200k" V 5650 6650 50 0000 C C - 1 5650 6650 - 0 1 1 0 -$EndComp -$Comp -L R R9 -U 1 1 48E7F30C -P 5650 5250 -F 0 "R9" V 5730 5250 50 0000 C C -F 1 "200k" V 5650 5250 50 0000 C C - 1 5650 5250 - 0 1 1 0 -$EndComp -$Comp -L R R8 -U 1 1 48E7F2BB -P 5050 6000 -F 0 "R8" V 5130 6000 50 0000 C C -F 1 "100k" V 5050 6000 50 0000 C C - 1 5050 6000 - 0 1 1 0 -$EndComp -$Comp -L R R7 -U 1 1 48E7F2B3 -P 5050 5800 -F 0 "R7" V 5130 5800 50 0000 C C -F 1 "100k" V 5050 5800 50 0000 C C - 1 5050 5800 - 0 1 1 0 -$EndComp -$Comp -L ZENER D1 -U 1 1 48E7F1B0 -P 1150 6250 -F 0 "D1" H 1150 6350 50 0000 C C -F 1 "4.3V" H 1150 6150 40 0000 C C - 1 1150 6250 - 0 -1 -1 0 -$EndComp -$Comp -L R R1 -U 1 1 48E7F17A -P 1150 4900 -F 0 "R1" V 1230 4900 50 0000 C C -F 1 "10k" V 1150 4900 50 0000 C C - 1 1150 4900 - 1 0 0 -1 -$EndComp -$Comp -L C C1 -U 1 1 48E7F16B -P 750 4950 -F 0 "C1" H 800 5050 50 0000 L C -F 1 "0.1uF" H 800 4850 50 0000 L C - 1 750 4950 - 1 0 0 -1 -$EndComp -Text Notes 2600 6250 0 60 ~ -IN- -Text Notes 3400 5700 0 60 ~ -OUT- -Text Notes 3400 6250 0 60 ~ -OUT+ -Text Notes 2600 5700 0 60 ~ -IN+ -Text Notes 2900 5950 0 60 ~ -Sensor -$Comp -L CONN_1 P4 -U 1 1 48E7EF57 -P 3400 6050 -F 0 "P4" H 3480 6050 40 0000 C C -F 1 "CONN_1" H 3350 6090 30 0001 C C - 1 3400 6050 - -1 0 0 1 -$EndComp -$Comp -L CONN_1 P3 -U 1 1 48E7EF4D -P 3400 5800 -F 0 "P3" H 3480 5800 40 0000 C C -F 1 "CONN_1" H 3350 5840 30 0001 C C - 1 3400 5800 - -1 0 0 1 -$EndComp -$Comp -L CONN_1 P2 -U 1 1 48E7EF47 -P 2750 6050 -F 0 "P2" H 2830 6050 40 0000 C C -F 1 "CONN_1" H 2700 6090 30 0001 C C - 1 2750 6050 - 1 0 0 -1 -$EndComp -$Comp -L CONN_1 P1 -U 1 1 48E7EF41 -P 2750 5800 -F 0 "P1" H 2830 5800 40 0000 C C -F 1 "CONN_1" H 2700 5840 30 0001 C C - 1 2750 5800 - 1 0 0 -1 -$EndComp -$Comp -L GND #PWR6 -U 1 1 48E7EF04 -P 1800 6250 -F 0 "#PWR6" H 1800 6250 30 0001 C C -F 1 "GND" H 1800 6180 30 0001 C C - 1 1800 6250 - 1 0 0 -1 -$EndComp -$Comp -L +5V #PWR5 -U 1 1 48E7EF01 -P 1800 5350 -F 0 "#PWR5" H 1800 5440 20 0001 C C -F 1 "+5V" H 1800 5440 30 0000 C C - 1 1800 5350 - 1 0 0 -1 -$EndComp -$Comp -L GND #PWR14 -U 1 1 48E7EEE0 -P 4700 6200 -F 0 "#PWR14" H 4700 6200 30 0001 C C -F 1 "GND" H 4700 6130 30 0001 C C - 1 4700 6200 - -1 0 0 1 -$EndComp -$Comp -L GND #PWR21 -U 1 1 48E7EEDA -P 6350 5500 -F 0 "#PWR21" H 6350 5500 30 0001 C C -F 1 "GND" H 6350 5430 30 0001 C C - 1 6350 5500 - -1 0 0 1 -$EndComp -$Comp -L GND #PWR13 -U 1 1 48E7EED3 -P 4700 5700 -F 0 "#PWR13" H 4700 5700 30 0001 C C -F 1 "GND" H 4700 5630 30 0001 C C - 1 4700 5700 - 1 0 0 -1 -$EndComp -$Comp -L +5V #PWR22 -U 1 1 48E7EEBD -P 6350 6400 -F 0 "#PWR22" H 6350 6490 20 0001 C C -F 1 "+5V" H 6350 6490 30 0000 C C - 1 6350 6400 - -1 0 0 1 -$EndComp -$Comp -L +5V #PWR12 -U 1 1 48E7EEB4 -P 4700 4800 -F 0 "#PWR12" H 4700 4890 20 0001 C C -F 1 "+5V" H 4700 4890 30 0000 C C - 1 4700 4800 - 1 0 0 -1 -$EndComp -$Comp -L +5V #PWR15 -U 1 1 48E7EEA8 -P 4700 7100 -F 0 "#PWR15" H 4700 7190 20 0001 C C -F 1 "+5V" H 4700 7190 30 0000 C C - 1 4700 7100 - -1 0 0 1 -$EndComp -$Comp -L TL082 U2 -U 2 1 48E7EDC6 -P 4800 6650 -F 0 "U2" H 4750 6850 60 0000 L C -F 1 "TL082" H 4750 6400 60 0000 L C - 2 4800 6650 - 1 0 0 1 -$EndComp -$Comp -L TL082 U2 -U 1 1 48E7EDC0 -P 4800 5250 -F 0 "U2" H 4750 5450 60 0000 L C -F 1 "TL082" H 4750 5000 60 0000 L C - 1 4800 5250 - 1 0 0 -1 -$EndComp -$Comp -L TL082 U1 -U 1 1 48E7EDB9 -P 1900 5800 -F 0 "U1" H 1850 6000 60 0000 L C -F 1 "TL082" H 1850 5550 60 0000 L C - 1 1900 5800 - 1 0 0 -1 -$EndComp -$Comp -L TL082 U1 -U 2 1 48E7EDAB -P 6450 5950 -F 0 "U1" H 6400 6150 60 0000 L C -F 1 "TL082" H 6400 5700 60 0000 L C - 2 6450 5950 - 1 0 0 1 -$EndComp $Comp L ATMEGA8-16PI I1 U 1 1 48E7ED06 -- cgit v1.2.3