Skip to main content

Posts

Showing posts from December, 2013

DIY 3W constant current LED driver

This is quick post about 3W constant current LED driver which I was design to combine with some homemade furniture piece. The main components of this system is LM311 voltage comparator and IRF9 5 40 P-Channel MOSFET. Schematic of 3W LED driver module This module is design to drive maximum of two 3W high power LEDs and it requires 8V - 10V DC (500mA) power source. In this given configuration this module may not need any heat-sink (for IRF9540) and consume maximum of 500mA of power. Breadboard version of 3W LED driver At prototyping stages we test this module using 9V DC (1A) power supply with two 3W LEDs (EDEX-3LA1-E1). I developed final version of this module using piece of strip-board and PCB design is not done.

ParseGen - parser generator for FPC

ParseGen is rule driven, parser generator for FPC / Lazarus . ParseGen is design using FPC, FCL and Lazarus and it mainly supports for Windows and Linux operating systems. ParserGen scanner is slight DFA (deterministic finite automaton) state machine. This scanner can operate on case sensitive or case-insensitive modes and it can easily configure/extend through given class structure. The parser of the ParseGen is recursive descent parser. ParseGen generate this parser using high-level source language and this language is logically similar to EBNF grammar. For example, in ParseGen, definition for "term" and "expression" can be written like this: define: expression   optional: "-","+"   end          term          loop: "-","+"     term   end   end define: term   factor   loop: "*","/"     factor   end   end This parser generator is mainly design for  FPC / Lazarus, but it can use with Delphi with