CRTGND is not the same as GND, CRTGND connects to the mostfet drain/schottky diode. There is a downside to this circuit which is that there is a voltage drop when running from the USB side due to the diode. The USB voltage can vary between 4. 75V to 5. 25V and the good news is that our ATtiny85 can run fine at 16. 5MHz whilst at 4. 0V. If the USB voltage was really 4. 75V,
Click here to download the full size of the above Circuit.
we would just make it to 4. 05V but we want the best possible voltage even if it was 4. 75V. Instead of using just a standard diode we`ll use a schottky diode which can provide a lower voltage drop of 0. 3V instead of the 0. 7V from standard diodes. We could just wire it all up and run it but we have a problem. If we insert the battery, by default we are running at 16MHz (using the PLL clock) which is outside of the safe frequency range of 3V when powered by the battery. Before we go any further please take a look at my video called Change the ATtiny85 clock speed on the fly which will give you an idea of how we can change the clock speed using the clock prescaler. What we`ll need to do is somehow have the ATtiny85 reduce it`s clock speed when powered on. When the ATtiny85 comes out of the factory it`s clock speed is 1MHz even though it uses the internal 8MHz oscillator. It does this by setting a fuse bit (CKDIV8) to divide the clock by 8 which gives us the 1MHz. So let`s just set this CKDIV8 fuse bit on again (we turned it off when we were playing around with V-USB and set our clock to PLL) which will make it run at 2MHz (16MHz / 8 ) when power is applied to it. After it`s powered on, we could then reduce the clock even more to give our desired clock of 1MHz and just ramp back up to 16MHz when we detect that the USB is connected. void setup(void) { // Change 2MHz to 1 MHz by changing clock prescaler to 16 CLKPR =...
This project fits more for custom made battery casing that can have more space to hide things inside. This switch with few alterations can be used for any other project as well but is designed based on e-bike needs! This project use a clever functionality of....
The circuit described here uses ultrasonic oscillations and operates based on the propagation velocity of these oscillations in the air. Thus, we can easily determine the distance of two points if the time within which the wave travels this distance is....
Sometimes the precious metals are hidden too deep and are not detected except with complicated devices. In many cases, however, small pieces of precious metal buried near the surface can be detected by relatively simple means. Everyone is very attractive to....
Many times for various reasons we forget or can not water the plants that we have in our homes. And many humidity sensors units just notify us with a beeping sound or with a flashing light, that the pot needs watering. But what if we are away from home? This....
The principle behind a metal detector is really very simple. Proof of this is the circuit that follows, in which it proves that the construction of a metal detector can be done in the minute, with few components that we find very easily everywhere. With the....
The sub-harmonic bass generator is a sound producing unit for guitars. The sound it produces looks very much like that of the bass guitar. The octave generator is sometimes quite unusual since it does not produce any of the usual ways of coloring the sound,....
In the past the sounding (sea bottom measurement) was done with the "bullet", that is, with a heavy lead object that the seamen plucked into the sea hung from a calibrated rope. As soon as the "bullet" reached the bottom, the depth appeared directly from the....
This Amplifier was designed to have the following specifications: Distortion less than 0.1% at full power of 100W even at 20KHz. Power has to be attributed to an extended bandwidth. The output transistors must be protected against short circuits. The power....
A series of LEDs serve to alert the gardener when plants need water. Using two conventional digital integrated LEDs and a series of LEDs, we make a very useful device for gardening. The device detects the amount of water in the pot and alerts the grower.....
characters left: