hasersecure.blogg.se

Digipod lay flat
Digipod lay flat












digipod lay flat
  1. #Digipod lay flat how to
  2. #Digipod lay flat serial
  3. #Digipod lay flat full
  4. #Digipod lay flat software
  5. #Digipod lay flat code
digipod lay flat

So, while it is exciting that I got the system to operate this well, I think that the that the Arduino Uno isn't quite fast enough.

#Digipod lay flat serial

If the Arduino is running flat-out just to maintain a high update rate, it probably wouldn't have enough spare cycles to service the serial port. For example, the Arduino will need to listen to its Serial port so that it can receive commands as to what values to use for the pot. In my envisioned hack for Polysix, however, my Arduino would need to do a few other tasks, as well. The Need for Margin: In achieving this 62.5 kHz result, the Arduino is doing nothing but updating the value of the pot over and over endlessly. I am a little uncomfortable with the fact that there is no margin. So that's good, right? Well, no, not exactly. How Fast is It? The picture above shows that the digipot is only being updated every 16 usec, which means it has an update rate of 62.5 kHz. A screenshot from the oscilloscope is shown below.

#Digipod lay flat full

The full setup is shown at the picture at the top of this post. To see how fast my system was actually running, I connected the output of the digipot to an oscilloscope. This means that the Arduino + digipot must support an update rate of 50-67 kHz, which seems pretty fast for an Arduino.

digipod lay flat

If used in my Polysix, there will only be 15-20 microseconds (usec) to change value of the digipot. I commented out the delay() and println() commands and restarted the system. Testing for Speed: Now for the full speed test. It successfully created a voltage half-way between 0-5V. Given that I expected (125/255*5) = 2.45V, I got pretty decent agreement. For the picture below, the digipot was at a value of 125 (out of 255), which resulted in an output voltage being 2.47V. Because the input of my digipot is connected to +5V, my output will be between 0V and 5V. It stops at each step for three seconds, which gives me enough time to confirm that its output is correct. Initial Test: My test program steps through a range of the digipot values. After Googling around, I found the correct Arduino commands to control the SPI bus speed and I wrote my test program (SPI mode is zero!). Speed is critical for using this in my Polysix, so this detail was worth a little effort.

#Digipod lay flat code

While that code is simple and easy to understand, I wasn't sure if it runs the SPI bus as the fastest possible setting. I started with the Arduino's built-in example called " DigitalPotControl". Writing the Arduino Software: To change the value of the digipot, I had to write some Arduino code to send commands to the digipot via the Arduino's SPI pins. Wiring an Arduino Uno to the my digipot via a solderless breadboard.

#Digipod lay flat software

Once I got the Arduino software working, the wiring of the hardware worked on the first try! It also made the wiring process more reliable. This extra "design" effort really made the wiring process much easier. Since I am usually prone to error when doing my wiring, I choose to draw up a little picture to fully illustrate to myself how I should use my solderless breadboard to make all of these connections. Wiring to the Arduino: The wiring plan shown above requires 12 connections. Signals to use for testing the digipot with an Arduino, which uses 5V logic. Finally, for the pot's input, I'll simply apply 5V, which means that my output will be a DC voltage that is scaled between 0-5V. Commands are sent via the SPI bus, so there are also the three SPI connections (theSDO line is not needed as there is no communication needed back to the Arduino). As you can see, there are a bunch of 5V and Gnd connections.

digipod lay flat

All connections were going to my Arduino. Below is a picture from the digipot's datasheet with my own labels added to show what I would connect to each pin.

#Digipod lay flat how to

Using a solderless breadboard keeps everything aligned while you solder.ĭeciding How to Connect: With the digipot's adapter board finished, I had to figure out how to wire up the device. Soldering the pins to the breakout board so that I can easily prototype with the digipot.














Digipod lay flat