ATtiny10 Shed Urinal

Yes, a Urinal for the shed.. do to views of the other neighbors and I don't want to offend them. But still want to Piss out side without tracking in dirt into the house.

What is so unique about this? Well, I uses the ATtiny10 for the electronic flush (turns on 12v pump for 1.0 seconds) using about 4-6 table spoons of water per flush. The tank gets filled with water from a unique rain catchment system. It also has an over flow. The pump is powered with 3 14650 Lithium Ion Batteries with a small BMS. I use a very small 12v solar panel to keep them charged, since there is only very brief moments of use per flush. The batteries have no problem staying charged.

The Drain is 3d printed French drain type, under ground with silicone tube used as drain and for flush and rain catchment system (also 3d printed).

The Urinal itself is 3d printed and works GREAT... It has a drain and flush connector for the tubes (see photo).

To Do:

Will need to print 3d case for electronics.

Updated 5/15/24 Updated the Rain Catchment System and it works Much better and has filter and over flow.

Rain Catchment System v2.0 with filter and over flow. Works Great.

/* * ATtiny10-Urinal-flush-timer.c * * Created: 4/20/2024 07:54:15 * Author : Sherman Stebbins * * PB2 is switch * PB1 is motor */ 

#define F_CPU 1000000UL#include <avr/io.h>#include <avr/interrupt.h>#include <util/delay.h>
void goToSleep(void);
int main(void){
EICRA=0b00000010; //detect falling edge ext int on ISC0 0 and 1 EIMSK=0b00000001; // turn on INT0
DDRB=0b00000010; PUEB=0b00000100; //enable pullup attiny10 //PORTB|=(1<<PB2); //enable pullup NOT ON ATTINY10 sei(); while(1){ PORTB |=(1<<PB1); _delay_ms(1000); PORTB &= ~(1<<PB1); goToSleep(); }}
// Interrupt Service RoutineISR(INT0_vect){ //PORTB ^=(1<<1); //_delay_ms(400); // was for debounce but went with .1uf Cap from gnd to PB2 that worked great. //EIFR=0b00000001; // clear the external interrupt flag // it says: The flag is cleared when the interrupt routine is executed. Alternatively, the flag can be //cleared by writing a logical one to it. This flag is always cleared when INT0 is configured as a level //interrupt.}
void goToSleep(void){ SMCR |= (1<<2); //SMCR.SM bit 2 (010) Power-down SMCR |= (1<<0); //SMCR.SE =1; SET JUST before Sleep starts __asm__ __volatile__ ( "sei" "\n\t" :: ); //Sleep instruction to put controller to sleep (found this syntax later, probably more proper) __asm__ __volatile__ ( "sleep" "\n\t" :: ); //Sleep instruction to put controller to sleep (found this syntax later, probably more proper) }