Scott still has problems with the toilet, and because of his limited communication, he takes off his clothes when he is in his room. This does not end, every time, very well. We always keep an eye on him, but I thought it would be useful to be promptly informed when he undresses.
The challenge, as always with projects for children with special needs, is to build a safe device that will not hurt them and that they cannot swallow anything.
The Idea is to sew a transmitter module in each of his sleep trousers and attach a cord with Velcro between the electronic and the shirt. If he try's to remove the shirt or the pants, the switch will be pulled over the an the receiver will beep. The whole thing will work over 433Mhz. I will design a small PCB witch will be driven by a Cr2032 3V battery. It must be so small that it does not bother when Scott sleeps.
The prototype will be built with a Digispark USB Development Board - Digistump based on an Attiny85 and a 433Mhz RF module. What will happen, when you have not noticed that he has pulled off his clothes? You have to clean the whole room. We have already installed a security cam, but in night mode, it's difficult to see, if he is still dressed. I think this little device will make our life again a little bit easier.
As mentioned in the title, yeah, it works.So what are the first Results:Each time the pants were removed, the system informed us.Two times, it did not work, but I saw it on the camera, so nothing happened. First, I thought, that there is a problem with the transmission, so I installed a second receiver near the room, but this was not the problem.
It's a mechanical problem. When he removes the pants, with the left hand at the back, the tension to activate the switch is too weak. It's not really a problem, because 10 times out of twelve it worked.
I've already started to build the portable receiver. It won't win a beauty contest, but it works.
Working now on the enclosure and a clean wiring. Will update the receiver part in the "BUILD INSTRUCTIONS" after that.
This version is sewed to an old pants for test and and my son carried it, in the night. I got 3 alarms.Two in the evening and one this morning at eight o'clock. Each time I was there in time, to change his diaper or to put him on the toilet, to avoid a catastrophe.
Even if this works like it should, it's not a good idea to attached it this way to the pants. I would need to put one transmitter on each one, and they had to be water proved and washing machine resistant.
So I think, some kind of belt will be the solution. I will now transform a pair of pants with this system, so that it will help us for the next days, and I will concentrate on this belt stuff.
I sew a small tube out of fabric. First I used jeans from an old pants, but is not very elastic, so I switched to an old shirt.
The electronic was hot glued on a small piece of foam an with the help of duct tape isolated.
the elastic band was fixed on the other side. The tension was just not big enough to handle the switch.
Then the tube was sewed to the pants. same here, the tension did just not activate the switch.
My first Idea was, to use a micro switch and I came back to this Idea.
I just changed the design, to make it simpler to use and my son will not detect that we there is something manipulated by us. I analysed, what happens, when he removes his pants, and I saw on the surveillance video, when he removes his clothes or when he goes to the toilet, that he has to pull sideways on the pants to remove them, so I decided to try something with a pull switch.
Seems to work.
I use a micro switch, and put a small protection over it, so that the cord will not be blocked in the foam and fabric. A small piece of PVC bend with heat will do the job.
I modified the software and the transmitter works now on interrupt. On interrupt it transmits two times the code, and goes to sleep, until the next interrupt. The circuit takes in standby 0.14uA. I can live with that and the CR2031 should last for 10 years ins standby. Transmitting takes about 0,7mA for a very short period
The attiny85 runs now at 1Mhz. I removed all the parts of the digistump, so I could use it as simple attiny.e
The pillowpart should be attached to the pants, and the 2 neodyms with the Shirt in between. The basic idea behind this was, that when the shirt or the pants are removed, the 2 contacts jump together and the microprocessor transmits a code. then it goes to sleep.
The Idea was not bad, but I forgot en unknown variable in the scenario: My son :)
He saw, that I attached something to his shirt and immidatly he pulled on the two straps, so that the system was disarmed. Now I know, that was not the best plan. So let me sleep a night over it.
We still have the problem and now it's really time for this project. Even if it sounds not complicated, I had first to learn a little bit more about Arduino programming and to understand the fuse bits and boot-loader stuff.
The Digitump Attiny has the fusebit set to lock the pin 5. This pin is needed for ISP programming. So I used this Instructable "Fuse Reset Attiny" to reset the fusebits with 12V.
After the reset , I could finally upload a 1Mhz Boolloader and I make the Digistump run on 3V
It's based on an Attiny85 running at 1Mhz on his internal oscillator. A cheap 433Mhz RF module for the wireless transmission in the house,a end switch and a CR2032 battery.
The circuit is in normal state in sleep mode, and use about 0.14uA. When the switch is activated, it generates an interrupt, and the Attiny is powering up the RF module over Pb3 and starts transmitting a code, with the help of the RCSwitch library, over Pb4. In this short moment, it pulls 0.7mA. I think on normal use, the battery should be good for 5-8 years. The RCSwitch library is for cheap power plugs, but it's exactly what I need for this project. The modules i used can be found here.
I can not tell you in meters, what distance they transmit, but it works through our house made of concrete over the 3 floors.
The receiver Part. You can add a display, but I think some kind of pager design will be more than enough.
This part is under construction. for the moment, I use my Arduino QP project