Hello, I'm sure if I made my title clear so I'll try to explain what I would like to do if it's possible.
I have an interface designed in unity3d (Not related to Arduino I know)
But we connect this interface to Arduino using the serial port to send information to the Arduino.
We currently are using an LDR to to send information to our Unity3d Interface that adjust an on screen slider that adjusts to the light values the LDR is receiving.
Now my question is this:
Is it possible to do a similar thing but in reverse where you can have an on screen slider or indicator send information to the Arduino to control a Voltage output?
I'm not clear what that image is supposed to show or how it helps explain your request.
Question: why do you (think) you want to control a voltage output?
What I mean to say is control a voltage out put in a similar way you would use a potentiometer to dim a light, only in this case to increase and decrease current.
Sorry about that.
Well the idea is kind of like an electric joy buzzer if you catch my meaning.
My guess is you might not be too familiar with the 80's TV series Knight Rider.
Well anyways, in the episode "Knight of the Drones" Michael had to get information out of a body guard so what he did was attach jumper cables to an iron gate, and applied voltage. When the body guard grabbed hold of the electrified gate he could not let go because of the current. Michael then requested KITT to crank up the juice to make the guy talk.
So similar idea.
My first initial thought was to have each color block on the scale send out a character to the Arduino and have that activate a relay connected to a voltage regulator so each block would step up or down the voltage levels. something like 9V all the way up 12 or 13V
Not sure if any of that makes sense? But I figured there might be a better way that having it trip a whole bunch of relays and voltage regulators
NP Paul,
Thanks for chiming in though
There is something called a boost converter that uses a child of magnetic wire and runs that through a capacitor to step up the voltage it steps.
I found a video on you Tube.
I guess what I could do is just have the Unity3D app send a character to the Arduino that can trigger the activation button like in the video which would then step up the voltage output in steps.
I guess then I would need a way to discharge the capacitor is small stages.
I just figure there is probably a more robust way of doing this... I'll keep looking.
But if anyone has any guidance I would love to hear it.
Knightriderguy:
attach jumper cables to an iron gate, and applied voltage. When the body guard grabbed hold of the electrified gate he could not let go because of the current. Michael then requested KITT to crank up the juice to make the guy talk.
Well, the getting stuck is the only part they got right there. Cranking up the voltage won't make the person talk. Dead people generally don't talk much. 12V is not a voltage that would normally cause this to happen. You'd need 40-60V and with DC that's getting deadly, fast.
Anyway, other than that, it's pretty easy to have an Arduino read an input (a light level - through LDR or one of many other light sensors) and control an output based on what it reads.
Note that Arduinos can only put out digital signals, the closest you can get to variable voltage is a PWM signal. For actual voltages you need an external DAC. For currents >20 mA you need a transistor to amplify the signal (BJT or MOSFET type depending on your application).
Thanks for chiming in. Forgive my ignorance with a lot of stuff electrical... this whole project has been a learning experience far outside of my comfort zone, but gotta dig into it if I want to get certain things done
But yeah basically looking for a safe way to make the electric "Joy Buzzer" effect preferably without killing anyone.
But also have the feature useful for situations where you needed to supply a certain level of voltage for any number of applications.
The Knight Rider episode is just one possible example.
Buzzing someone with electricity is dangerous - you have to really know what you're doing to make that safe.
The most common ways of giving a safe electrical shock actually use much higher voltages, in the 5-20kV range. Think electric fences, static electrical shocks and the tazer (the last one is maybe not that great an example as tazers actually can kill). The safety is in that the currents are extremely small in those applications. It's the current that kills, not the voltage.
You never know the risk that the subject may have a pacemaker or a heart condition. Also current path through the body is critical, can make the difference between a prank and a fatality.
Thanks.... well that is part of my dilemma. I want to make the application safe to use as a prank (With of course the warning NOT to be used with anyone with a Heart condition or PaceMaker)
BUT, yet also have the application useful for generating different levels of voltage output.
Incase someone needed a battery boost, to something as simple as charging a USB device.
Knightriderguy:
Incase someone needed a battery boost, to something as simple as charging a USB device.
It's dead easy to get any voltage from an power supply. Just look at the [USB killer[/url, which produces 200V pulses. Going to higher voltages is easy.
Making it safe, not so much. The safest way is to just not do it - unless you're happy with the thought that your product may kill someone, even with all warnings in place, because a prank doesn't work well if you first have to ask about whether someone has a pacemaker or so, and because not all heart conditions are known.](https://usbkill.com/)