I am a new user of the PSoC family and i'm trying my luck at a small hardware node for temperature and motion monitoring. I was wondering if it is possible to drive the sensor (a DS18B) from the psoc itself onto the breadboard and if so how to do it or where I can read about it.
You could use the 5V from the USB line to power the sensor and the PSoC (assuming you're running the PSoC at 5V). Depends on your current draw of your system though, I think the limit for USB 2.0 is 500mA?
You can find a demo project and explanation here:
The current draw by DS18 is low, so you can source it directly from PSoC pin set to HIGH.
Hello. Yes that's exactly what I am using but because this is my first time ever using this platform I guess I don't understand some basic things. When you say you can source it directly from the PSoC does that mean that I just have to wire the vdda from the psoc to the sensor? Or do I have to drag a VDAC to the schematic, pin it and wire it from there?
Thank you for your answer. Would you mind if I pm you to clarify some other doubts related to that sensor interface?
I advise you to first read the DS18 component datasheet in the link above, it describes connection of the DS18B20 to the PSoC. The current drawn by DS18 is very small (<4ma peak), you can draw power either from Vddd on the prototyping KIT-059, or even from any pin, which is set to digital output HIGH. The DS18 is a digital sensor - no need for any ADC/DAC, and the custom component (above) does all reading/processing for you.
I understand that. I chose it specifically for being digital and not needing an ADC. I just don't understand how exactly to draw that tension. Do I just wire the vddd pin to the sensor? no need to create a voltage source in the diagram? If so how is it regulated?
Thank you once again.
If using KIT-059 you can draw the power for DS18 from e.g. the Vdd (red arrow). The DS18B20 can accept 3.0-5.5V, all "regulation" is done inside the sensor.
look at the schematic, read the datasheet and run the example project. To learn how to swim you have to eh ...start swimming.
Thanks for the updated example but im still having trouble getting it to work because the data ready flag is always at 1 and I'm not quite sure why. It messes up the logic from the main loop and it just gets stuck in the if clauses because the timer flag never gets changed.
Thank you. It's definitely nothing on the layout im using with the breadboard as it works fine with an arduino, maybe something related to the psoc 5 lp as this was done in a different version?
Once again thanks for putting in your time to help me out.
Thank you once again, but it is still not working here. All I get is the counter, there is nothing on the temperature value.
I'm still not getting a bus presence, when I call the function to send a temperature request it returns 0. Do I need to change anything in the clock value?
EDIT: nevermind any of this. If you happen to be an idiot like me you don't actually need to connect both tx's from the kitprog and the psoc itself, they are already connected. I was shorting my connection to the sensor hence not being able to read anything. It is working fine now, thank you so much for your time.