Kajilkree On the positive side the debouncing works just perfect with the chosen component values. Even less pretty but problem solved anyway. The entire initialization sequence needs to be written in one single I2C transmission. On the schematic the wire touched the respective pin but there was no connection.
|Published (Last):||8 April 2005|
|PDF File Size:||8.95 Mb|
|ePub File Size:||12.65 Mb|
|Price:||Free* [*Free Regsitration Required]|
Niktilar Furthermore the encoder signals must assume a high impedance state when the user interface is disabled. I ended up soldering a thin wire accross the digipot to a resistor that is connected to VCC on the upper end. The size of the board is mainly given by the size of the display so there is plenty of board space.
With rotary encoders things get much trickier. The error was soon datashet. Using the spare gate to supply the rest of the circuit with power was not as good an idea than I thought. So the enable dqtasheet only controls the input of that gate. Nothing was powered on. There are various contrast settings that must be set properly via I2C commands but there is very little information on those commands in the data sheet.
That way I get a quite universal, easy to use user interface that I can use for other projects as well. One then needs to wait for 5ms before the initialization sequence is sent. If you use a time constant of a few milliseconds like with the push button you will not be able to detect when the encoder is turned quickly. As long as the push button is not pressed, no power flows there so the only power consuming device is the 74HC The mistake was corrected by cutting the ground connection and conecting the respective pin to the enable singal itself which was available from the pin right next to it.
So you face the challenge of debouncing the signal while still letting relatively fast transitions pass. And PWM control of the backlight would require a great deal of I2C communication which puts a burdon on the microcontroller. Not pretty see below but problem solved. So the measurement works and it seems that the 8 microamps given in the data sheet are just a very conservative worst case. But getting them initialized with the right settings is always a lengthy trial-and-error process.
More on that later. The backlight brightness is controlled by the other digipot via an op-amp and a n-channel mosfet. SGS Thomson Microelectronics — datasheet pdf But with the hardware debouncing applied here we get a clean, digital output singal nevertheless. While it can supply up to 35mA according to the data sheet, its output voltage is nowhere near its positive supply rail when it supplies that much current.
Another issue I noticed was that the LM op amp I had chosen is not a rail-to-rail op amp. I wrote an email to their customer support asking if there is a list of commands the display supports. While the display got its own little board, the encoder connected directly with the solar charger where its signals aredebounced in hardware and then routed to the PIC.
Testing First of all nothing worked at all. Its datasheet specifies a maximum static current consumption of 8 microamps worst at room temperature. My final solution was as follows: But I like the look and feel of this universal user interface and think the overall concept is good. While that was really hard to notice on the schematic I should have noticed the problem when I laid out the board. Like in the solar charger designa 74HC quad tri-state buffer is used together with some resistors and capacitors.
First of all nothing worked at all. Even less pretty but problem solved anyway. And it was not very elegant that the display was powered off by just cutting the entire power supply.
When the enable signal is datqsheet, the display is on, when enable is low, the user interface goes into its low-power state. Just use a relatively long time constant i. That will introduce some delay in the output signal but as a rule of thumb anything below 50ms is not noticable. I then decided to design an new board that also includes the rotary encoder with all the necessary debouncing.
Very low standby power consumption was one of the key design goals. The logic is pretty much the same here except that I use different non-inverting gates here. They make nice, pretty and affordable displays. This was a bit harder to fix than the previous error. Toghether with the positive feedback via the k resistors that works very well. Related Articles.
74HC126 DATASHEET PDF