Skip to content

Commit 6836756

Browse files
authored
IoT e-ink driver v1.1 (#358)
IoT e-ink driver v1.1 board with library fixes: - Revise Waveshare eink driver subcircuit to be consistent with the v2.2 schematic: raise input capacitance to 4.7uF and change resistor to 3ohm - Fix PMOS reverse protection subcircuit - Add implicit tags on Waveshare eink driver, PMOS reverse protection subcircuit - Fix W25Q power consumption, it's mA not uA Changes to the example: - Add high-side single-PMOS switch as a device-specific library. In the future (dependent on #357) HighSideSwitch should automatically generate a single-PMOS switch under the right input voltage conditions. - Add input reverse polarity protection - Remove 3.3v zener (too much leakage current) - Change LED colors to not use OOS LEDs - Add PMOS power gates to memory (SPI flash + SD card) and eink blocks - Add SPI flash - Change power input to horizontal connector - Increase resistance of 3.3v converter to reduce quiescent current Resolves #356
1 parent 1539d80 commit 6836756

File tree

12 files changed

+6925
-4470
lines changed

12 files changed

+6925
-4470
lines changed

edg/abstract_parts/AbstractFets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class BaseTableFet(Fet):
125125
VDS_RATING = PartsTableColumn(Range)
126126
IDS_RATING = PartsTableColumn(Range)
127127
VGS_RATING = PartsTableColumn(Range)
128-
VGS_DRIVE = PartsTableColumn(Range)
128+
VGS_DRIVE = PartsTableColumn(Range) # negative for PMOS
129129
RDS_ON = PartsTableColumn(Range)
130130
POWER_RATING = PartsTableColumn(Range)
131131
GATE_CHARGE = PartsTableColumn(Range) # units of C

edg/parts/EInk_WaveshareDriver.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def __init__(self) -> None:
8383
super().__init__()
8484
self.device = self.Block(Waveshare_Epd_Device())
8585
self.gnd = self.Export(self.device.vss, [Common])
86-
self.pwr = self.Export(self.device.vdd)
86+
self.pwr = self.Export(self.device.vdd, [Power])
8787
self.reset = self.Export(self.device.rst)
8888
self.spi = self.Export(self.device.spi)
8989
self.cs = self.Export(self.device.csb)
@@ -115,10 +115,13 @@ def contents(self):
115115

116116
# current limit based on 200mA saturation current of reference inductor
117117
self.boost = self.Block(EInkBoostPowerPath(20*Volt(tol=0), (0, 200)*mAmp, 68*uHenry(tol=0.2),
118-
1*uFarad(tol=0.2), 4.7*uFarad(tol=0.2), 2.2*Ohm(tol=0.01)))
118+
4.7*uFarad(tol=0.2), 4.7*uFarad(tol=0.2), 3*Ohm(tol=0.01)))
119119
self.connect(self.gnd, self.boost.gnd)
120120
self.connect(self.pwr, self.boost.pwr_in)
121121
self.connect(self.device.gdr, self.boost.gate)
122+
self.gate_pdr = self.Block(Resistor(10*kOhm(tol=0.05)))
123+
self.connect(self.gate_pdr.a, self.boost.gate)
124+
self.connect(self.gate_pdr.b.adapt_to(Ground()), self.gnd)
122125
self.connect(self.device.rese, self.boost.isense)
123126
self.connect(self.boost.pos_out, self.device.prevgh)
124127
self.connect(self.boost.neg_out, self.device.prevgl)

edg/parts/PowerConditioning.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,8 @@ class PmosReverseProtection(PowerConditioner, KiCadSchematicBlock, Block):
276276
def __init__(self, gate_resistor: RangeLike = 10 * kOhm(tol=0.05), rds_on: RangeLike = (0, 0.1) * Ohm):
277277
super().__init__()
278278
self.gnd = self.Port(Ground.empty(), [Common])
279-
self.pwr_in = self.Port(VoltageSink.empty())
280-
self.pwr_out = self.Port(VoltageSource.empty())
279+
self.pwr_in = self.Port(VoltageSink.empty(), [Input])
280+
self.pwr_out = self.Port(VoltageSource.empty(), [Output])
281281

282282
self.gate_resistor = self.ArgParameter(gate_resistor)
283283
self.rds_on = self.ArgParameter(rds_on)
@@ -288,12 +288,11 @@ def contents(self):
288288
self.fet = self.Block(Fet.PFet(
289289
drain_voltage=(0, self.pwr_out.link().voltage.upper()),
290290
drain_current=output_current_draw,
291-
gate_voltage=(- self.pwr_out.link().voltage.upper(), self.pwr_out.link().voltage.upper()),
291+
gate_voltage=(-self.pwr_out.link().voltage.upper(), self.pwr_out.link().voltage.upper()),
292292
rds_on=self.rds_on,
293293
))
294294

295-
self.res = self.Block(Resistor(self.gate_resistor))
296-
# TODO: generate zener diode for high voltage applications
295+
# TODO: generate zener diode + resistor for high voltage applications
297296
# self.diode = self.Block(ZenerDiode(self.clamp_voltage))
298297

299298
self.import_kicad(

edg/parts/SpiMemory_W25q.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __init__(self, size: RangeLike):
2222
super().__init__()
2323
self.vcc = self.Port(VoltageSink(
2424
voltage_limits=(2.7, 3.6)*Volt, # relaxed range that goes up to 104MHz
25-
current_draw=(0.001, 25)*uAmp # typ. power down to max write / erase
25+
current_draw=(0.001, 25)*mAmp # typ. power down to max write / erase
2626
), [Power])
2727
self.gnd = self.Port(Ground(), [Common])
2828

edg/parts/resources/PmosReverseProtection.kicad_sch

Lines changed: 2 additions & 187 deletions
Original file line numberDiff line numberDiff line change
@@ -150,126 +150,17 @@
150150
)
151151
)
152152
)
153-
(symbol "Device:R" (pin_names (offset 0)) (in_bom yes) (on_board yes)
154-
(property "Reference" "R" (at 2.032 0 90)
155-
(effects (font (size 1.27 1.27)))
156-
)
157-
(property "Value" "R" (at 0 0 90)
158-
(effects (font (size 1.27 1.27)))
159-
)
160-
(property "Footprint" "" (at -1.778 0 90)
161-
(effects (font (size 1.27 1.27)) hide)
162-
)
163-
(property "Datasheet" "~" (at 0 0 0)
164-
(effects (font (size 1.27 1.27)) hide)
165-
)
166-
(property "ki_keywords" "R res resistor" (at 0 0 0)
167-
(effects (font (size 1.27 1.27)) hide)
168-
)
169-
(property "ki_description" "Resistor" (at 0 0 0)
170-
(effects (font (size 1.27 1.27)) hide)
171-
)
172-
(property "ki_fp_filters" "R_*" (at 0 0 0)
173-
(effects (font (size 1.27 1.27)) hide)
174-
)
175-
(symbol "R_0_1"
176-
(rectangle (start -1.016 -2.54) (end 1.016 2.54)
177-
(stroke (width 0.254) (type default))
178-
(fill (type none))
179-
)
180-
)
181-
(symbol "R_1_1"
182-
(pin passive line (at 0 3.81 270) (length 1.27)
183-
(name "~" (effects (font (size 1.27 1.27))))
184-
(number "1" (effects (font (size 1.27 1.27))))
185-
)
186-
(pin passive line (at 0 -3.81 90) (length 1.27)
187-
(name "~" (effects (font (size 1.27 1.27))))
188-
(number "2" (effects (font (size 1.27 1.27))))
189-
)
190-
)
191-
)
192-
(symbol "power:GND" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes)
193-
(property "Reference" "#PWR" (at 0 -6.35 0)
194-
(effects (font (size 1.27 1.27)) hide)
195-
)
196-
(property "Value" "GND" (at 0 -3.81 0)
197-
(effects (font (size 1.27 1.27)))
198-
)
199-
(property "Footprint" "" (at 0 0 0)
200-
(effects (font (size 1.27 1.27)) hide)
201-
)
202-
(property "Datasheet" "" (at 0 0 0)
203-
(effects (font (size 1.27 1.27)) hide)
204-
)
205-
(property "ki_keywords" "power-flag" (at 0 0 0)
206-
(effects (font (size 1.27 1.27)) hide)
207-
)
208-
(property "ki_description" "Power symbol creates a global label with name \"GND\" , ground" (at 0 0 0)
209-
(effects (font (size 1.27 1.27)) hide)
210-
)
211-
(symbol "GND_0_1"
212-
(polyline
213-
(pts
214-
(xy 0 0)
215-
(xy 0 -1.27)
216-
(xy 1.27 -1.27)
217-
(xy 0 -2.54)
218-
(xy -1.27 -1.27)
219-
(xy 0 -1.27)
220-
)
221-
(stroke (width 0) (type default))
222-
(fill (type none))
223-
)
224-
)
225-
(symbol "GND_1_1"
226-
(pin power_in line (at 0 0 270) (length 0) hide
227-
(name "GND" (effects (font (size 1.27 1.27))))
228-
(number "1" (effects (font (size 1.27 1.27))))
229-
)
230-
)
231-
)
232153
)
233154
234-
(junction (at 154.94 81.28) (diameter 0) (color 0 0 0 0)
235-
(uuid ad2e6530-e11d-4796-af13-3f73c9483a30)
236-
)
237-
(junction (at 166.37 73.66) (diameter 0) (color 0 0 0 0)
238-
(uuid bdf646d3-3319-455c-a057-19facb99407a)
239-
)
240155
241-
(wire (pts (xy 154.94 90.17) (xy 154.94 93.98))
242-
(stroke (width 0) (type default))
243-
(uuid 39d00e79-8786-405f-877f-7b931bf682dc)
244-
)
245156
(wire (pts (xy 143.51 73.66) (xy 149.86 73.66))
246157
(stroke (width 0) (type default))
247158
(uuid 70f1537a-8375-476b-abc3-0ffcb6d8444b)
248159
)
249-
(wire (pts (xy 154.94 81.28) (xy 154.94 82.55))
250-
(stroke (width 0) (type default))
251-
(uuid 72b4400a-873d-41c8-886d-c6197d219246)
252-
)
253-
(wire (pts (xy 135.89 91.44) (xy 138.43 91.44))
254-
(stroke (width 0) (type default))
255-
(uuid 864c531c-87c9-485b-a44e-d9aa537f522b)
256-
)
257-
(wire (pts (xy 154.94 81.28) (xy 166.37 81.28))
258-
(stroke (width 0) (type default))
259-
(uuid 969932bb-d653-468e-8fa7-ae1280b9e924)
260-
)
261-
(wire (pts (xy 166.37 73.66) (xy 166.37 81.28))
262-
(stroke (width 0) (type default))
263-
(uuid 9b064dfc-a209-46b5-8578-00d04636e159)
264-
)
265-
(wire (pts (xy 160.02 73.66) (xy 166.37 73.66))
160+
(wire (pts (xy 160.02 73.66) (xy 176.53 73.66))
266161
(stroke (width 0) (type default))
267162
(uuid c7edf471-f510-4ced-ae0e-fa0b4de75aca)
268163
)
269-
(wire (pts (xy 166.37 73.66) (xy 176.53 73.66))
270-
(stroke (width 0) (type default))
271-
(uuid f3627e85-27db-4178-ab45-ee4f7a187e6a)
272-
)
273164
274165
(text "The PMOS circuit for reverse protection can be used without a Zener diode. \nHowever, in that case you need ensure that the Vgs (gate-source voltage) does not exceed the maximum rating of the PMOS transistor to prevent damage. "
275166
(at 77.47 106.68 0)
@@ -295,62 +186,11 @@
295186
(effects (font (size 1.27 1.27)) (justify left))
296187
(uuid a47934db-1933-4fca-a88e-84db51cda995)
297188
)
298-
(hierarchical_label "gnd" (shape input) (at 135.89 91.44 180) (fields_autoplaced)
189+
(hierarchical_label "gnd" (shape input) (at 154.94 81.28 180) (fields_autoplaced)
299190
(effects (font (size 1.27 1.27)) (justify right))
300191
(uuid ffdf205e-8c01-42f5-9c74-59c89b39b0dd)
301192
)
302193
303-
(symbol (lib_id "Device:R") (at 154.94 86.36 0) (unit 1)
304-
(in_bom yes) (on_board yes) (dnp no)
305-
(uuid 11d043ae-68aa-42cf-8f1f-28f159fc26c5)
306-
(property "Reference" "res" (at 156.21 83.82 0)
307-
(effects (font (size 1.27 1.27)) (justify left))
308-
)
309-
(property "Value" "~" (at 157.48 87.6299 0)
310-
(effects (font (size 1.27 1.27)) (justify left))
311-
)
312-
(property "Footprint" "" (at 153.162 86.36 90)
313-
(effects (font (size 1.27 1.27)) hide)
314-
)
315-
(property "Datasheet" "~" (at 154.94 86.36 0)
316-
(effects (font (size 1.27 1.27)) hide)
317-
)
318-
(pin "1" (uuid b02e1948-9b37-4cb6-bf64-0c78c0d46648))
319-
(pin "2" (uuid ee2b34a0-a4b8-49c0-8f51-691ed039f813))
320-
(instances
321-
(project "PmosReverseProtection"
322-
(path "/b55f6c44-5d5d-4524-bb86-893662f64598"
323-
(reference "res") (unit 1)
324-
)
325-
)
326-
)
327-
)
328-
329-
(symbol (lib_id "power:GND") (at 154.94 93.98 0) (unit 1)
330-
(in_bom yes) (on_board yes) (dnp no)
331-
(uuid 249a0bbc-9f7c-4275-b4f3-393dbf37d48b)
332-
(property "Reference" "#PWR0101" (at 154.94 100.33 0)
333-
(effects (font (size 1.27 1.27)) hide)
334-
)
335-
(property "Value" "GND" (at 152.4 93.98 0)
336-
(effects (font (size 1.27 1.27)))
337-
)
338-
(property "Footprint" "" (at 154.94 93.98 0)
339-
(effects (font (size 1.27 1.27)) hide)
340-
)
341-
(property "Datasheet" "" (at 154.94 93.98 0)
342-
(effects (font (size 1.27 1.27)) hide)
343-
)
344-
(pin "1" (uuid 93cb6b9d-dc3c-4212-bdb2-14b9fbce5dfd))
345-
(instances
346-
(project "PmosReverseProtection"
347-
(path "/b55f6c44-5d5d-4524-bb86-893662f64598"
348-
(reference "#PWR0101") (unit 1)
349-
)
350-
)
351-
)
352-
)
353-
354194
(symbol (lib_id "Device:Q_PMOS_DGS") (at 154.94 76.2 90) (unit 1)
355195
(in_bom yes) (on_board yes) (dnp no)
356196
(uuid 39f44928-01d2-4e2e-9e28-a7bb035b6c2b)
@@ -378,31 +218,6 @@
378218
)
379219
)
380220
381-
(symbol (lib_id "power:GND") (at 138.43 91.44 0) (unit 1)
382-
(in_bom yes) (on_board yes) (dnp no)
383-
(uuid bc23023a-7276-47fe-a42c-9a7cdbf61866)
384-
(property "Reference" "#PWR0102" (at 138.43 97.79 0)
385-
(effects (font (size 1.27 1.27)) hide)
386-
)
387-
(property "Value" "GND" (at 142.24 92.71 0)
388-
(effects (font (size 1.27 1.27)))
389-
)
390-
(property "Footprint" "" (at 138.43 91.44 0)
391-
(effects (font (size 1.27 1.27)) hide)
392-
)
393-
(property "Datasheet" "" (at 138.43 91.44 0)
394-
(effects (font (size 1.27 1.27)) hide)
395-
)
396-
(pin "1" (uuid fcb25af1-9e79-4795-8ac6-618ea9d6ddb8))
397-
(instances
398-
(project "PmosReverseProtection"
399-
(path "/b55f6c44-5d5d-4524-bb86-893662f64598"
400-
(reference "#PWR0102") (unit 1)
401-
)
402-
)
403-
)
404-
)
405-
406221
(sheet_instances
407222
(path "/" (page "1"))
408223
)

0 commit comments

Comments
 (0)