Basically, I want to read a sensor in my car (0-5v) and reduce it by a value of 'x' then put the reduced value BACK to the car computer. I can do all this fine and my board is all wired up and everything works I just don't want to power my arduino via my laptop USB and have THAT voltage go to the computer so I'm wondering if there is a way to use the car voltage as in out while still using the USB to power Mr.Duino?
Not really making a lot of sense, but you can use the car's power to run the Arduino, but you will need to regulate the voltage first.
I don't know why it doesn't make sense.
Lets just pretend I'm using an arduino as a voltage divider, the voltage out would be from the same source as the voltage in obviously.
Using an arduino the (sensor)voltage in is from one source (car sensor) and the voltage out would be from a different source... laptop USB (or whatever) power.
I just don't want to power my arduino via my laptop USB and have THAT voltage go to the computer so I'm wondering if there is a way to use the car voltage as in out while still using the USB to power Mr.Duino?
Sorry, I don't understand that at all.
Typically in a car you're going to power the Arduino from the 12V car power, either using the Arduino's on-board regulator, or an external regulator. (I have one in a car with 12V into the barrel jack.)
Basically, I want to read a sensor in my car (0-5v) and reduce it by a value of 'x' then put the reduced value BACK to the car computer. I can do all this fine and my board is all wired up and everything works
What Arduino do you have? Most Arduino's don't have a DAC, so no true analog output.
Is "x" variable or fixed? Are you sure you need a microcontroller and software? It sounds like an analog project. Maybe all you need is a voltage divider or a pot?
I remember an Arduino can take 12 V. But a car might have 14 V, when the alternator is working. I wouldn't connect the car voltage directly to an Arduino without a regulator. Maybe some Arduinos are better than others in running on too high voltages.
Sorry if I have wasted everyone's precious time. Simple answer could have been yes or no.
I am not using my arduino as a voltage divider, it was an example.
"x" is variable based on sensor reading.
My arduino (nano this time, UNO before, many teensy's etc) may or may not be powered by the car power and be on laptop power.
I may or may not understand a few things about how electricity works, heck, I'm only a master electrician so I understand 'simple' principles perhaps not everything related to electronics but I think I have a clue.
So simple answer is NO, I can not use a sensor input reading change it and have that same sensor signal (changed or otherwise) go back out. It is strictly arduino 0-5v that it can output. Thank you for me answering my own question.
A further problem you will have is the “analog “ output from the Arduino isn’t ! It’s a pulse width modulated signal , the pulse width is change such that an average voltage is created to a value you desire.
Look up PWM and arduino
hammy:
A further problem you will have is the “analog “ output from the Arduino isn’t ! It’s a pulse width modulated signal , the pulse width is change such that an average voltage is created to a value you desire.Look up PWM and arduino
Did not think I would have to mention I have an Adafruit DAC attached and when I bench test my in/out everything is bang on.
Thank you for your concern.
ericmlaing:
Simple answer could have been yes or no.
That is only possible if the question is clear and simple.
I still have no idea what you are enquiring about. Maybe a diagram would help.
...R
Is there still an unanswered question hanging around? I never figured out what the original question was.
ericmlaing:
Did not think I would have to mention I have an Adafruit DAC attached and when I bench test my in/out everything is bang on.
Ah, I understand now. You are simply on the wrong forum. This is the Arduino forum. Not the Pyscic forum. An easy mistake to make.
Thank you all for your responses. I love that instead of helping someone with a question you bash their knowledge, common sense etc. I could have posted a huge chunk of code with my layout on a circuit board and perhaps had a decent response? Instead you all insult my intelligence because you are 'arduino gods' I forgot. I hope one day, when your house power goes out you ask a simple question to an electrician like me, they totally berate you. I, however, would not. I am not that type of person. A problem/question is a question. You don't understand the question? I explained, then I get bashed for other people pointing out things that are irrelevant (ie: my setup is not a DAC) does it matter to my original question? No, it does not.
When somebody new asks a question, answer with some civility and insight rather than look down on them because they may not know as much as you.
So simple answer is NO, I can not use a sensor input reading change it and have that same sensor signal (changed or otherwise) go back out. It is strictly arduino 0-5v that it can output. Thank you for me answering my own question.
You can read a 0-5 V signal with Arduino. With a common ground the voltage sources can be different (car battery powers the sensor, laptop produces power to Arduino).
You can output a PWM signal to your DAC, which will further output a true analog signal 0-5 V to the car computer. The DAC and the car computer need a common ground.
If your sensor signal range is not 0-5 V, but 0-12 V, have a voltage divider there so you won't toast your Arduino analog input pin. But then you need a level shifter to shift the DAC output range from 0-5 V to 0-12 V.
When all this works, you can power your Arduino with your laptop USB, a 4xAA battery pack, a 9 V battery, a cell phone charger connected to the cigarette lighter thing. Makes no difference.
Hi,
Welcome to the forum.
Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
A simple circuit diagram will help.
Thanks.. Tom..
Delta_G:
Nobody is insulting your intelligence. I tried to figure out what you were talking about. Maybe you do know your stuff really well and just didn't communicate well. That's fine. But from what you wrote it sounded like you had a tenuous grasp on how electricity works. I would have expected someone who is a master electrician to use slightly different terms. I still don't know what your concern is with where the particular electrons on the wire come from.You could always get one of those cigarette lighter adapters with a USB plug on it and power your Arduino from that. Would that solve your problem?
+1
Especially for the first sentence.
...R