element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum How to solder fairy light strings
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 14 replies
  • Subscribers 663 subscribers
  • Views 6141 views
  • Users 0 members are here
Related

How to solder fairy light strings

scottiebabe
scottiebabe over 3 years ago

I have been experimenting with tri-state multiplexing with the Rp2040's PIO statemachine and have found good success.

The PIO code is quite interesting in that its quite different from how I might write it in c-code in a repeating ISR. I may write a blog about it in the future, but here is the code:

# Tri-state multiplexing with done with PIO statemachine
# -scottiebabe 2022
import time
from machine import Pin
import rp2

# Ensure pin pull-ups and pull-downs are disabled
# So pin is Hi-Z when set as input
Pin(0,Pin.IN)
Pin(1,Pin.IN)
Pin(2,Pin.IN)

@rp2.asm_pio(out_shiftdir=rp2.PIO.SHIFT_RIGHT,set_init=[rp2.PIO.OUT_LOW]*3,out_init=[rp2.PIO.OUT_LOW]*3)
def charlie():
    pull(noblock)
    mov(x,osr)
    # Set Pin0 & Pin1 as outputs
    in_(null,2)
    in_(osr,1) # output state of LED0 on Pin0
    out(null,1)
    set(pindirs, 0b011)
    mov(pins, isr) [7]
    in_(null,1)
    in_(osr,1) # output state of LED1 on Pin1
    in_(null,1)
    out(null,1)
    mov(pins, isr) [7]
    
    # Set Pin0 & Pin2 as outputs
    in_(null,2)
    in_(osr,1) # output state of LED2 on Pin0
    out(null,1)
    set(pindirs, 0b101)
    mov(pins, isr) [7]
    in_(osr,1) # output state of LED3 on Pin2
    in_(null,2)
    out(null,1)
    mov(pins, isr) [7]

    # Set Pin1 & Pin2 as outputs
    in_(null,1)
    in_(osr,1) # output state of LED4 on Pin1
    in_(null,1)
    out(null,1)
    set(pins,0)
    set(pindirs, 0b110)
    mov(pins, isr) [7]
    in_(osr,1) # output state of LED5 on Pin2
    in_(null,2)
    out(null,1)
    mov(pins, isr) [7]


# Create the StateMachine with the charlie program, outputting on Pins 0-2.
sm = rp2.StateMachine(0, charlie, freq=20000, set_base=Pin(0),out_base=Pin(0))

# Put bitmap into pio statemachine
sm.put(0b101)

# Start the StateMachine.
sm.active(1)

i = 0
while True:
    i += 1
    sm.put(i % 64)
    time.sleep(0.1)

I would like to try and make my own fairly light strings with three wires and 6 LEDs, similar to these

image

What do you think the best way to solder the LEDs to wires would be?

I'm thinking maybe use a piece of perfboard to hold everything in place while soldering

image

  • Sign in to reply
  • Cancel
Parents
  • Jameswalter
    0 Jameswalter over 3 years ago

    LED fairy light strings come in two main types. The commonest sort run off low voltage AC, supplied by a small transformer. The transformer is capable of running the string it was supplied with, and not much more. The LEDs are wired in parallel strings of series lamps, and the voltage from the transformer doesn't get supplied to the end of the string. No amount of soldering will permit another string to be tacked on the end successfully.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Jameswalter
    0 Jameswalter over 3 years ago

    LED fairy light strings come in two main types. The commonest sort run off low voltage AC, supplied by a small transformer. The transformer is capable of running the string it was supplied with, and not much more. The LEDs are wired in parallel strings of series lamps, and the voltage from the transformer doesn't get supplied to the end of the string. No amount of soldering will permit another string to be tacked on the end successfully.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
No Data
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube