Humans don’t survive long without water, and most people walk around in a chronic state of mild dehydration even if they have access to plenty of drinking water. It’s hard to stay properly hydrated, and harder still to keep track of your intake, which is the idea behind this water-intake monitoring IoT drinking straw.
Dehydration is a particularly acute problem in the elderly, since the sense of thirst tends to diminish with age. [jflaschberger]’s Hackaday Prize entry seeks to automate the tedious and error-prone job of recording fluid intake, something that caregivers generally have to take care of by eyeballing that half-empty glass and guessing. The HydrObserve uses a tiny turbine flowmeter that can mount to a drinking straw or water bottle cap. A Hall sensor in the turbine sends flow data to a Cypress BLE SoC module, which totalizes the volume sipped and records a patient identifier. A caregiver can then scan the data from the HydrObserve at the end of the day for charting and to find out if anyone is behind on their fluids.
There are problems to solve, not least being the turbine, which doesn’t appear to be food safe. But that’s a small matter that shouldn’t stand in the way of an idea as good as this one. We’ve seen a lot of good entries in the Assistive Technology phase of the 2017 Hackaday Prize, like a walker that works on stairs or sonic glasses for the blind. There are only a couple of days left in this phase — got any bright ideas?
Wow. [Dmitry Grinberg] just broke into the SROM on Cypress’ PSoC 4 chips. The supervisory read-only memory (SROM) in question is a region of proprietary code that runs when the chip starts up, and in privileged mode. It’s exactly the kind of black box that’s a little bit creepy and a horribly useful target for hackers if the black box can be broken open. What’s inside? In the manual it says “The user has no access to read or modify the SROM code.” Nobody outside of Cypress knows. Until now.
This matters because the PSoC 4000 chips are among the cheapest ARM Cortex-M0 parts out there. Consequently they’re inside countless consumer devices. Among [Dmitry]’s other tricks, he’s figured out how to write into the SROM, which opens the door for creating an undetectable rootkit on the chip that runs out of each reset. That’s the scary part.
The cool parts are scattered throughout [Dmitry]’s long and detailed writeup. He also found that the chips that have 8 K of flash actually have 16 K, and access to the rest of the memory is enabled by setting a single bit. This works because flash is written using routines that live in SROM, rather than the usual hardware-level write-to-register-and-wait procedure that we’re accustomed to with other micros. Of course, because it’s all done in software, you can brick the flash too by writing the wrong checksums. [Dmitry] did that twice. Good thing the chips are inexpensive.
The device that [Alex] is learning on is a Cypress PSoC 5LP, or more specifically their (cheap) prototyping kit for the part. The chip itself is an ARM microprocessor core with a CPLD and some analog tidbits onboard to make interfacing the micro with the outside world a lot easier. [Alex] doesn’t even mess around with the microprocessor, he’s interested in learning the CPLD side of things.
He starts off with a 24 MHz carrier and a 1 kHz tone signal, and combines them with a logical AND function. When the tone is on, the carrier plays through; that’s AM radio at its most elemental. Everything is logic (square waves) so it’s a messy radio signal, but it’ll get the job done.
Adding a multiplexer up front allows [Alex] to play two tones over his “radio” station. Not bad for some simple logic, and a fantastic Hello World project for a CPLD. We can’t wait to see what [Alex] is up to next!
If you’re interested in getting your feet wet with either CPLDs in general or a CPLD + micro system like Cypress’s, the development kit that [Alex] is using looks like a cheap and painless way to start. (Relatively speaking — PSoCs are a step or two up a steep learning curve from the simpler 8-bit micros or an Arduino.) Hackaday’s own [Bil Herd] has a video on getting started with another member of the Cypres PSoC family, so you should also check that out.
Ever since I received my PSOC 4 Pioneer kit from Cypress I have wanted to play with this little mixed-signal Programmable System-on-Chip (PSOC) developer board. I love developer boards, providing that they are priced in a way to entice me to not only open my wallet but also make time in a busy schedule. I think my kit was free after winning a swag bag from Adafruit that they themselves obtained at the Open Hardware Summit and gave away on their weekly streamcast. Ultimately it was the invitation to beta test datasheet.net which also was included in that pile of swag that led to my getting involved with Hackaday.
What is Programmable System On Chip?
So what is a PSOC 4? A quick summary is that it’s based on an ARM Cortex reduced instruction set processor (RISC) and is somewhat capable of supporting shields based on the Arduino footprint, and it also uses a bright red PCB that I have come to associate with a Sparkfun PCB. What doesn’t show is the fact that this programmable system on chip has programmable analog function blocks in addition to programmable digital logic blocks. There is also some supporting input/output circuitry such as a multicolored LED and a capacitive touch sensor directly on the PCB.
This is an intriguing amount of programmability, so much so that Newark/Element 14 highlighted a “100 projects in 100 days” event on it.
Enter the IDE
Over the years I have had to create or install many Integrated Development Environments (IDE) that linked hardware to software. Knowing that you had to, and how to, implement an IDE was part of being an engineer. Nowadays with the Arduino type environment the user has an IDE pretty much as soon as they click on the executable which I find to be one of the best aspects of the genre. It was so quick in fact that I was able to get my teenaged son into writing his first program even before he remembered to do massive eye-rolls and make sounds of utter disdain. He did give up however, just shy of learning how to have the Arduino make sounds of disdain on his behalf.
Open source test equipment has to be one of the best gifts open source hardware has given back to the community. Nowhere is this more true than in the case of [Nick’s] Re:Load Pro over on Kickstarter. Unlike resistors or similar dummy loads, an active load will always draw the set amount of current regardless of voltage. Active loads are often used to test power supplies and batteries. Is that 2500 mAh LiPo battery overstating it’s capacity? Can the power supply you just designed handle 2.5A at 12V? Both of these are jobs where active loads would come in handy.
The Re:Load Pro is actually the third version of the Re:Load. [Nick] designed the original Re:Load after becoming frustrated at the lack of a cheap active load for testing a power supply. Plenty of people showed interest in the Re:Load, but they wanted more features. That’s where the Re:Load Pro comes in. More than a straight analog design, the Pro has a Cypress PSOC 4 Arm Cortex M0 processor running the system.